import { deconstructDate } from "./helpers";
export const updateFormValues = (formController, newValues) => {
    formController.setValues(Object.assign(Object.assign({}, formController.values.getValue()), newValues));
};
export const updateAddressFormValues = (formController, newValues) => {
    updateFormValues(formController, {
        address: Object.assign(Object.assign({}, formController.values.getValue().address), newValues),
    });
};
export const updateDateOfBirthFormValues = (event, formController) => {
    const dob_values = deconstructDate(event.detail);
    updateFormValues(formController, Object.assign(Object.assign({}, formController.values.getValue()), { dob_day: dob_values.dob_day, dob_month: dob_values.dob_month, dob_year: dob_values.dob_year }));
};
