package cz.moneta.test.dsl.util.data;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.DateUtils;
import cz.moneta.test.dsl.util.data.client.Address;
import cz.moneta.test.dsl.util.data.client.Employer;
import cz.moneta.test.dsl.util.data.client.NonClient;

import java.util.Date;

public final class ClientUtils {

    public static NonClient getRiskDefaultClient(Harness harness) {
        Date driverLicenceExpiryDate = DateUtils.getSpecificDayRaw(29, 12, 2026);

        Date currentAddressSinceRaw = DateUtils.getRawTodayDateIncrementedByDays(-5 * 365);
        Date employmentFromRaw = DateUtils.getRawTodayDateIncrementedByDays(-5 * 365);
        String birthNumber = harness.tasks().common().getRcMinMaxAge(20, 35);

        return harness.data()
                .newNonClient()
                .withEmployer(new Employer("Raiffeisenbank a.s.", "49240901", Address.builder().street("Hvězdova").descriptiveNumber("1716").orientationNumber("2b").city("Praha").zip("14000").country("CZ").build(), "222123456"))
                .withBirthNumber(birthNumber)
                .withDriverLicenceId("EP033460")
                .withDriveLicenceExpiryDateRaw(driverLicenceExpiryDate)
                .withEmail(birthNumber + "@moneta.cz")
                .withOccupationEmploymentFromRaw(employmentFromRaw)
                .withCurrentAddressSinceRaw(currentAddressSinceRaw)
                .withPassportExpiryDateRaw(driverLicenceExpiryDate);
    }

}