{% import '_includes/forms' as forms %}
{% import 'verbb-base/_macros' as macros %}

{% set displayName = integration.displayName() %}

{{ macros.proxyField(fieldVariables, 'autosuggestField', {
    label: 'Site Key' | t('formie'),
    name: 'siteKey',
    required: true,
    suggestEnvVars: true,
    value: integration.settings.siteKey ?? '',
    warning: macros.configWarning('siteKey', 'formie'),
}) }}

{{ macros.proxyField(fieldVariables, 'autosuggestField', {
    label: 'Secret Key' | t('formie'),
    name: 'secretKey',
    required: true,
    suggestEnvVars: true,
    value: integration.settings.secretKey ?? '',
    warning: macros.configWarning('secretKey', 'formie'),
}) }}

{{ macros.proxyField(fieldVariables, 'selectField', {
    label: 'Language' | t('formie'),
    instructions: 'Force a specific language when displaying Friendly Captcha. Choose "Auto" for Formie to automatically match your site’s language.' | t('formie'),
    name: 'language',
    value: integration.settings.language ?? 'auto',
    options: languageOptions,
    warning: macros.configWarning('language', 'formie'),
}) }}

{{ macros.proxyField(fieldVariables, 'selectField', {
    label: 'Start Mode' | t('formie'),
    instructions: 'Specify when the captcha should start solving a puzzle. Refer to {link}.' | t('formie', { link: '[docs](https://docs.friendlycaptcha.com/#/widget_api?id=data-start-attribute)' }),
    name: 'startMode',
    value: integration.settings.startMode ?? 'auto',
    options: [
        { label: 'Auto' | t('formie'), value: 'auto' },
        { label: 'Focus' | t('formie'), value: 'focus' },
        { label: 'None' | t('formie'), value: 'none' },
    ],
    warning: macros.configWarning('startMode', 'formie'),
}) }}