import { SettingsFormCard, type SettingFieldDef, } from '@/components/admin/shared/settings-form-card'; import { DocumensoTestButton } from '@/components/admin/documenso/documenso-test-button'; const API_FIELDS: SettingFieldDef[] = [ { key: 'documenso_api_url_override', label: 'API URL override', description: 'Optional. Falls back to DOCUMENSO_API_URL env when blank.', type: 'string', placeholder: 'https://documenso.example.com', defaultValue: '', }, { key: 'documenso_api_key_override', label: 'API key override', description: 'Optional. Falls back to DOCUMENSO_API_KEY env when blank. Stored in plain text.', type: 'password', defaultValue: '', }, ]; const EOI_FIELDS: SettingFieldDef[] = [ { key: 'documenso_eoi_template_id', label: 'EOI Documenso template ID', description: 'Numeric template ID used by the Documenso EOI pathway.', type: 'string', placeholder: '12345', defaultValue: '', }, { key: 'eoi_default_pathway', label: 'Default EOI pathway', description: 'Which pathway is used when an EOI is generated without an explicit choice. Documenso = signed via Documenso, In-app = filled locally with pdf-lib.', type: 'select', options: [ { value: 'documenso-template', label: 'Documenso template' }, { value: 'inapp', label: 'In-app (pdf-lib)' }, ], defaultValue: 'documenso-template', }, ]; export default function DocumensoSettingsPage() { return (

Documenso & EOI

API credentials and default EOI generation pathway. Use the test-connection button to verify a saved configuration before relying on it.

} />
); }