import vine from '@vinejs/vine';
export const complianceStepOneValidator = vine.compile(vine.object({
    phone: vine.string().trim().mobile({ locale: ['en-NG', 'en-GB', 'en-US'] }),
    nationality: vine.string().trim().minLength(2).maxLength(50),
    countryOfBirth: vine.string().trim().minLength(2).maxLength(50),
    dateOfBirth: vine.date({ formats: ['YYYY-MM-DD'] }).before(() => {
        const eighteenYearsAgo = new Date();
        eighteenYearsAgo.setFullYear(eighteenYearsAgo.getFullYear() - 18);
        return eighteenYearsAgo.toISOString().split('T')[0];
    }),
}));
export const complianceStepTwoIndividualValidator = vine.compile(vine.object({
    selectedServices: vine.array(vine.string().trim()).minLength(1),
    employmentDetails: vine.object({
        status: vine.string().trim(),
        employer: vine.string().trim().optional(),
        annualIncome: vine.string().trim(),
        investmentPortfolio: vine.string().trim(),
    }),
    investmentBackground: vine.object({
        yearsActiveInvesting: vine.string().trim(),
        typicalTransactionSize: vine.string().trim(),
    }),
    knowledgeAnswers: vine
        .record(vine.string().trim())
        .optional(),
    evidenceOfSale: vine
        .object({
        tradingFrequencyProof: vine
            .file({ size: '25mb', extnames: ['pdf', 'csv', 'jpg', 'png'] })
            .optional(),
        portfolioSizeProof: vine
            .file({ size: '25mb', extnames: ['pdf', 'csv', 'jpg', 'png'] })
            .optional(),
        professionalExperience: vine
            .file({ size: '25mb', extnames: ['pdf', 'csv', 'jpg', 'png'] })
            .optional(),
    })
        .optional(),
}));
export const complianceStepTwoBusinessValidator = vine.compile(vine.object({
    companyName: vine.string().trim(),
    registrationNumber: vine.string().trim(),
    annualTurnover: vine.string().trim(),
    certificateOfIncorporation: vine.file({ size: '25mb', extnames: ['pdf'] }),
}));
//# sourceMappingURL=compliance_validator.js.map