export default class FSModalFormResponse {
    constructor(rawResponse, form) {
        this.rawResponse = null;
        this.parentForm = null;
        this.canceled = false;
        this.data = {};
        this.rawResponse = rawResponse;
        this.parentForm = form;
        this.canceled = this.rawResponse.canceled;
        if (!this.canceled) {
            this.data = {};
            for (const key of Object.keys(this.parentForm.fieldMap)) {
                const value = this.parentForm.fieldMap[key];
                this.data[key] = this.rawResponse.formValues[value];
            }
        }
        else {
        }
    }
    finish(keyedByFormId = false) {
        if (this.parentForm._navController) {
            return this.parentForm._navController.finish(keyedByFormId);
        }
        else {
            console.error("Can not finish this form because no associated nav controller.");
            return {};
        }
    }
    getResponseData(keyedByFormId = false) {
        if (this.parentForm._navController) {
            return this.parentForm._navController.getResponseData(keyedByFormId);
        }
        else {
            console.error("Can not finish this form because no associated nav controller.");
            return {};
        }
    }
}

//# sourceMappingURL=../../../../../../../_SBUNK_BPDebug/fs_sbunk/fs/libs/forms/resps/FSModalFormResp.js.map
