import { EInputComponentType, EInputType } from '@/UI-kit/types';
import { getLicencePlateValidator } from '@/modules/documents/constants';
import { IDocsSchemaType } from '@/modules/form/types';
import { ILicensePlateFieldsOptions } from '@/modules/documents/type';
import { uiKitI18n } from '@/configs';

export function useLicensePlateFieldsScheme(
    options?: ILicensePlateFieldsOptions,
): IDocsSchemaType[] {
    return [
        {
            name: 'number',
            label: uiKitI18n?.global.t('moduleDocuments.forms.licence_plate.licence_plate.label'),
            type: EInputType.text,
            validateOnChange: false,
            validator: getLicencePlateValidator(),
            components: EInputComponentType.licence_plate,
        },
    ];
}
