{% import '_includes/forms.twig' as forms %}

<p>Provide a Service Account file path OR paste the content inside the text area:</p>

{{ forms.autosuggestfield({
    label: 'Google Cloud Service Account file path',
    name: 'googleServiceAccountFilePath',
    instructions: 'File path to the Service Account data from your [Google Cloud Console](https://console.cloud.google.com/iam-admin/serviceaccounts)',
    suggestEnvVars: true,
    value: settings.googleServiceAccountFilePath ?? '',
}) }}

<h3>OR:</h3>

{{ forms.textAreaField({
    label: 'Google Cloud Service Account',
    name: 'googleServiceAccount',
    instructions: 'Paste the Service Account data from your [Google Cloud Console](https://console.cloud.google.com/iam-admin/serviceaccounts)',
    value: settings.googleServiceAccount ?? '',
    rows: 3,
}) }}

{{ forms.textfield({
    label: "Location",
    instructions: "Location (optional)",
    id: "googleLocation",
    name: "googleLocation",
    value: settings.googleLocation ?? '',
    placeholder: 'global (default)',
}) }}

{{ forms.textfield({
    label: "Translation model",
    instructions: "[Translation model](https://docs.cloud.google.com/translate/docs/advanced/compare-models) (format: projects/PROJECT_ID/locations/REGION_NAME/models/MODEL_ID) (optional)",
    id: "googleModel",
    name: "googleModel",
    value: settings.googleModel ?? '',
    placeholder: 'default',
}) }}
