import { useTranslation } from 'react-i18next'; import { Button, Form, Input, InputNumber, Radio, Select, Space, Switch } from 'antd'; import { MinusOutlined, PlusOutlined, ReloadOutlined } from '@ant-design/icons'; import { ALPN_OPTION, TLS_CIPHER_OPTION, TLS_VERSION_OPTION, USAGE_OPTION, UTLS_FINGERPRINT, } from '@/schemas/primitives'; const { TextArea } = Input; interface TlsFormProps { saving: boolean; setCertFromPanel: (certName: number) => void; clearCertFiles: (certName: number) => void; generateRandomPinHash: () => void; getNewEchCert: () => void; clearEchCert: () => void; } export default function TlsForm({ saving, setCertFromPanel, clearCertFiles, generateRandomPinHash, getNewEchCert, clearEchCert, }: TlsFormProps) { const { t } = useTranslation(); return ( <> ({ value: v, label: v }))} /> ({ value: fp, label: fp })), ]} /> ) : ( <> typeof v === 'string' ? v.split('\n') : v} getValueProps={(v) => ({ value: Array.isArray(v) ? v.join('\n') : v, })} >