'use strict';

var Business = require('./Business-oBifyXkW.js');

const updateFormValues = (formController, newValues) => {
    formController.setValues(Object.assign(Object.assign({}, formController.values.getValue()), newValues));
};
const updateAddressFormValues = (formController, newValues) => {
    updateFormValues(formController, {
        address: Object.assign(Object.assign({}, formController.values.getValue().address), newValues),
    });
};
const updateDateOfBirthFormValues = (event, formController) => {
    const dob_values = Business.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 }));
};

exports.updateAddressFormValues = updateAddressFormValues;
exports.updateDateOfBirthFormValues = updateDateOfBirthFormValues;
exports.updateFormValues = updateFormValues;
