import type { TopLevelDataSchema } from '../context/StateContext/types'; import type { VerificationError } from '../core/models/api/verification-error'; import type { FormConfiguration } from '../types/form-configuration'; import type { FormRules } from '../types/form-rules'; interface CalculateLinkedRequiredFieldsOptions { field: Extract; formId: Extract; customRules: FormRules; scenarioConfiguration: FormConfiguration; dataMissingErrors: VerificationError[]; formFieldsWithExistingData: string[]; } /** * This function is used to process fields linked to other fields that have custom rules that can return either REQUIRED or OPTIONAL * depending on the value of their links. An example of this is the Vat number, this will be REQUIRED when exemption is false but OPTIONAL when exemption is true. * This needs to be done due to functions like isFieldRequiredToRemediateDataMissingError, which do not take into account the custom rules and instead mark * these fields as required regardless of the rule. * * @param field - Field being processed * @param formId - Form this field is associated to * @param customRules - The rules associated to the form flow * @param scenarioConfiguration - The static configuration returned from the scenario, i.e. L1, L, etc * @param dataMissingErrors - Missing data problems on the LE response * @param formFieldsWithExistingData - The current fields that have existing data within the LE response */ export declare function calculateLinkedRequiredFields({ field, formId, customRules, scenarioConfiguration, dataMissingErrors, formFieldsWithExistingData, }: CalculateLinkedRequiredFieldsOptions): { isRequiredFromLinkedField: boolean; isOptionalFromLinkedField: boolean; }; export {};