HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/locationdebateau/wp-content/plugins/leadin/scripts/shared/Form/FormSelector.tsx
import React from 'react';
import HubspotWrapper from '../Common/HubspotWrapper';
import { pluginPath } from '../../constants/leadinConfig';
import AsyncSelect from '../Common/AsyncSelect';
import { __ } from '@wordpress/i18n';

interface IFormSelectorProps {
  loadOptions: Function;
  onChange: Function;
  value: any;
}

export default function FormSelector({
  loadOptions,
  onChange,
  value,
}: IFormSelectorProps) {
  return (
    <HubspotWrapper pluginPath={pluginPath}>
      <p data-test-id="leadin-form-select">
        <b>
          {__(
            'Select an existing form or create a new one from a template',
            'leadin'
          )}
        </b>
      </p>
      <AsyncSelect
        placeholder={__('Search for a form', 'leadin')}
        value={value}
        loadOptions={loadOptions}
        onChange={onChange}
      />
    </HubspotWrapper>
  );
}