'use strict';

var index = require('./index-p7cvUYAE.js');
var index_esm = require('./index.esm-BNETBIV_.js');
var parts = require('./parts-BXshb_S-.js');
require('./_commonjsHelpers-BJu3ubxk.js');

const AdditionalStatementSchema = index_esm.create$3({
    additional_statement: index_esm.create$6().nullable(),
});

var DisputeResponseFormStep;
(function (DisputeResponseFormStep) {
    DisputeResponseFormStep["disputeReason"] = "dispute_reason";
    DisputeResponseFormStep["productOrService"] = "product_or_service";
    DisputeResponseFormStep["customerDetails"] = "customer_details";
    DisputeResponseFormStep["cancellationPolicy"] = "cancellation_policy";
    DisputeResponseFormStep["refundPolicy"] = "refund_policy";
    DisputeResponseFormStep["duplicateCharge"] = "duplicate_charge";
    DisputeResponseFormStep["electronicEvidence"] = "electronic_evidence";
    DisputeResponseFormStep["shippingDetails"] = "shipping_details";
    DisputeResponseFormStep["additionalStatement"] = "additional_statement";
})(DisputeResponseFormStep || (DisputeResponseFormStep = {}));

var DisputeEvidenceDocumentType;
(function (DisputeEvidenceDocumentType) {
    DisputeEvidenceDocumentType["activity_log"] = "activity_log";
    DisputeEvidenceDocumentType["cancellationPolicy"] = "cancellation_policy";
    DisputeEvidenceDocumentType["customerCommunication"] = "customer_communication";
    DisputeEvidenceDocumentType["customerSignature"] = "customer_signature";
    DisputeEvidenceDocumentType["duplicateChargeDocumentation"] = "duplicate_charge_documentation";
    DisputeEvidenceDocumentType["receipt"] = "receipt";
    DisputeEvidenceDocumentType["refundPolicy"] = "refund_policy";
    DisputeEvidenceDocumentType["serviceDocumentation"] = "service_documentation";
    DisputeEvidenceDocumentType["shippingDocumentation"] = "shipping_documentation";
    DisputeEvidenceDocumentType["uncategorizedFile"] = "uncategorized_file";
})(DisputeEvidenceDocumentType || (DisputeEvidenceDocumentType = {}));
class DisputeEvidenceDocument {
    set presignedUrl(url) {
        this._presignedUrl = url;
    }
    get presignedUrl() {
        return this._presignedUrl;
    }
    async getFileString() {
        const fileDataPromise = new Promise((resolve, reject) => {
            const reader = new FileReader();
            reader.onload = (e) => {
                resolve(e.target.result);
            };
            reader.onerror = () => {
                reject(new Error('Error reading file'));
            };
            reader.readAsArrayBuffer(this._file);
        });
        return await fileDataPromise;
    }
    ;
    constructor(file, dispute_evidence_type) {
        this._file = file;
        this.file_name = file.name;
        this.file_type = file.type;
        this.dispute_evidence_type = dispute_evidence_type;
    }
}

const fileInputHandler = (e, documentState) => {
    const target = e.target;
    const name = target.name;
    const files = target.files;
    documentState[name] = [];
    for (const file of files) {
        documentState[name].push(new DisputeEvidenceDocument(file, name));
    }
};

const AdditionalStatement = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.documentErrors = {};
        this.errors = {};
        this.acceptedTerms = false;
        this.documents = { uncategorized_file: [] };
        this.inputHandler = (name, value) => {
            this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
        };
    }
    async validateAndSubmit(onSuccess) {
        const documentList = Object.values(this.documents).flat();
        this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.additionalStatement));
    }
    ;
    componentWillLoad() {
        this.form = new index_esm.FormController(AdditionalStatementSchema);
    }
    componentDidLoad() {
        this.form.errors.subscribe(errors => {
            this.errors = Object.assign({}, errors);
        });
    }
    render() {
        var _a, _b;
        return (index.h("div", { key: 'fc937111b48c5141d31085bb6282fb58cc2d000a' }, index.h("div", { key: 'c24bc0ce7a89b8c138abed0d7bcf8a81cc910a71', class: "row gy-3" }, index.h("div", { key: 'ec340664ce128f61c231e8545ae69b1561f704bb', class: "col-12" }, index.h("h2", { key: '37369432e8ab4d6d871127e8535a675f91f2b07e', class: "h5", part: parts.heading5 }, "Additional Evidence")), index.h("div", { key: 'f96c72ebf7aaed5c757ca31c251abdbcf09684ae', class: "col-12" }, index.h("form-control-textarea", { key: '30f0bb97c38ed8782d23f72563d2c679640defea', label: "Is there anything else you would like to say about this dispute?", name: "additional_statement", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.additional_statement, inputHandler: this.inputHandler, errorText: this.errors.additional_statement })), index.h("div", { key: '5fd9944de7b9bc0395dc8d791e0d138398162e45', class: "col-12" }, index.h("form-control-file-v2", { key: '37200d108ab06c455de1469746e122a125d57d75', label: "Additional files", name: "uncategorized_file", multiple: true, helpText: "Upload any additional pieces of evidence that have not already been provided.", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_b = this.documentErrors) === null || _b === void 0 ? void 0 : _b.uncategorized_file })))));
    }
};

const CancellationPolicySchema = index_esm.create$3({
    cancellation_policy_disclosure: index_esm.create$6().nullable(),
    cancellation_rebuttal: index_esm.create$6().nullable(),
});

const CancellationPolicy = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.documentErrors = {};
        this.errors = {};
        this.documents = { cancellation_policy: [] };
        this.inputHandler = (name, value) => {
            this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
        };
    }
    async validateAndSubmit(onSuccess) {
        const documentList = Object.values(this.documents).flat();
        this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.cancellationPolicy));
    }
    ;
    componentWillLoad() {
        this.form = new index_esm.FormController(CancellationPolicySchema);
    }
    componentDidLoad() {
        this.form.errors.subscribe(errors => {
            this.errors = Object.assign({}, errors);
        });
    }
    render() {
        var _a, _b, _c;
        return (index.h("div", { key: '8812e04b5497b1b75d4afcc18084ff224efe11e0' }, index.h("div", { key: 'fd414b2ebd443b490ec68bb1788efce0824877e6', class: "row gy-3" }, index.h("div", { key: '300e7b1afa78dac54bd3240af7ad1bdd6f386134', class: "col-12" }, index.h("h2", { key: 'c85c78cf40224ad06db9746c929d312d6ac53613', class: "h5", part: parts.heading5 }, "Cancellation Policy")), index.h("div", { key: 'fab79ca4fb6f343674698b87fd5e713c6028ce8b', class: "col-12" }, index.h("form-control-textarea", { key: '106094d74237d258091a60d14e0bdeecf1106584', label: "Cancellation Policy Disclosure", name: "cancellation_policy_disclosure", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.cancellation_policy_disclosure, inputHandler: this.inputHandler, errorText: this.errors.cancellation_policy_disclosure })), index.h("div", { key: 'ac5d1d534d30176483fc490947e3bf65fe41afa3', class: "col-12" }, index.h("form-control-textarea", { key: 'd0972bf1837f9f23de6925517756ec18e1fac3fe', label: "Cancellation Rebuttal", name: "cancellation_rebuttal", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.cancellation_rebuttal, inputHandler: this.inputHandler, errorText: this.errors.cancellation_rebuttal })), index.h("div", { key: '135463253e19c6a2d5ff86b04413e6838f824a89', class: "col-12" }, index.h("form-control-file-v2", { key: 'ef0a3a1d1113f5cb4e97bbf1017841b75463f690', label: "Upload Cancellation Policy", name: "cancellation_policy", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.cancellation_policy })))));
    }
};

const CustomerDetailsSchema = index_esm.create$3({
    customer_name: index_esm.create$6().nullable(),
    customer_email_address: index_esm.create$6().nullable(),
    customer_billing_address: index_esm.create$6().nullable(),
});

const CustomerDetails = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.documentErrors = {};
        this.errors = {};
        this.documents = { customer_signature: [], customer_communication: [] };
        this.inputHandler = (name, value) => {
            this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
        };
    }
    async validateAndSubmit(onSuccess) {
        const documentList = Object.values(this.documents).flat();
        this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.customerDetails));
    }
    ;
    componentWillLoad() {
        this.form = new index_esm.FormController(CustomerDetailsSchema);
    }
    componentDidLoad() {
        this.form.errors.subscribe(errors => {
            this.errors = Object.assign({}, errors);
        });
    }
    render() {
        var _a, _b, _c, _d, _e;
        return (index.h("div", { key: '91b627ab79cff98fc4bb2b76e9e9159b99bcdc44' }, index.h("div", { key: 'ddb074202926fca96c40fba3724b1a603ef29bf8', class: "row gy-3" }, index.h("div", { key: '680d03bb31e19a1ab7aa560195a802dc2a7f1bcf', class: "col-12" }, index.h("h2", { key: 'b9e47dc34c931a18373053384dac93ccd45e4823', class: "h5", part: parts.heading5 }, "Customer Details")), index.h("div", { key: '286716947b073de829fe525eb855864f51d72234', class: "col-12" }, index.h("form-control-text", { key: '2b9369bfbb55fa87ee8448324f6ff8480679ba58', label: "Full Name", name: "customer_name", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_name, inputHandler: this.inputHandler, errorText: this.errors.customer_name })), index.h("div", { key: '89f384a11dcac912a189b4909586a3e1db603f25', class: "col-12" }, index.h("form-control-text", { key: 'c6dfbeb68b117d840a39bfe4e96be7d18d5395b7', label: "Email", name: "customer_email_address", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.customer_email_address, inputHandler: this.inputHandler, errorText: this.errors.customer_email_address })), index.h("div", { key: '29c2e48fabafe27b878294e3267a9ec04a91a2a4', class: "col-12" }, index.h("form-control-textarea", { key: 'ec734cbef65f6263e462b86332be24c92a1173ad', label: "Billing Address", name: "customer_billing_address", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.customer_billing_address, inputHandler: this.inputHandler, errorText: this.errors.customer_billing_address })), index.h("div", { key: 'f944aca1e6594cdcc20bb69bd1aa625536d05ac0', class: "col-12" }, index.h("form-control-file-v2", { key: 'f227a8b81e6b8409152f61ae6906319577663dd3', label: "Customer Signature", name: "customer_signature", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_d = this.documentErrors) === null || _d === void 0 ? void 0 : _d.customer_signature })), index.h("div", { key: '4804ef68cc6f5d0006568aca8bc57086243af4de', class: "col-12" }, index.h("form-control-file-v2", { key: 'a0dba5cfa046de4bca065d7bb20ec2a5abd57fc9', label: "Customer Communication", name: "customer_communication", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_e = this.documentErrors) === null || _e === void 0 ? void 0 : _e.customer_communication })))));
    }
};

const DuplicateChargeSchema = index_esm.create$3({
    duplicate_charge_original_payment_id: index_esm.create$6().nullable(),
    duplicate_charge_explanation: index_esm.create$6().nullable(),
});

const DuplicateCharge = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.documentErrors = {};
        this.errors = {};
        this.documents = { duplicate_charge_documentation: [] };
        this.inputHandler = (name, value) => {
            this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
        };
    }
    async validateAndSubmit(onSuccess) {
        const documentList = Object.values(this.documents).flat();
        this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.duplicateCharge));
    }
    ;
    componentWillLoad() {
        this.form = new index_esm.FormController(DuplicateChargeSchema);
    }
    componentDidLoad() {
        this.form.errors.subscribe(errors => {
            this.errors = Object.assign({}, errors);
        });
    }
    render() {
        var _a, _b, _c;
        return (index.h("div", { key: 'ec4cfa15f2830ec56dfd9184728c1badeb9e1dfd' }, index.h("div", { key: '0e107461e759478735aecabea93baf060169dd14', class: "row gy-3" }, index.h("div", { key: '22b9223c3e92d2183d65d9125a3ebefd341c140f', class: "col-12" }, index.h("h2", { key: 'cf386e687b18a4f232b935a847270d8ad463db32', class: "h5", part: parts.heading5 }, "Duplicate Charge")), index.h("div", { key: 'dd8cc52b7b6cfe955a09e29c145f70761db87068', class: "col-12" }, index.h("form-control-text", { key: 'ff024fd4e90adc3a991036eb535258bad98ab199', label: "Original Payment ID", name: "duplicate_charge_original_payment_id", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.duplicate_charge_original_payment_id, inputHandler: this.inputHandler, errorText: this.errors.duplicate_charge_original_payment_id })), index.h("div", { key: '0df77b3c8d8a8a777c8258cd0ca075df73552ee4', class: "col-12" }, index.h("form-control-textarea", { key: '27bfe00c3bdab393b35f3ca26360db65f487d789', label: "Duplicate Charge Explanation", name: "duplicate_charge_explanation", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.duplicate_charge_explanation, inputHandler: this.inputHandler, errorText: this.errors.duplicate_charge_explanation })), index.h("div", { key: '8420318e367111cb73c1235c363973d7f34aa25c', class: "col-12" }, index.h("form-control-file-v2", { key: '71717a0c8d02e2c8198b365f61b1a6727a619e6b', label: "Duplicate Charge Documentation", name: "duplicate_charge_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.duplicate_charge_documentation })))));
    }
};

const ElectronicEvidenceSchema = index_esm.create$3({
    customer_purchase_ip_address: index_esm.create$6().nullable(),
});

const ElectronicEvidence = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.documentErrors = {};
        this.errors = {};
        this.documents = { activity_log: [] };
        this.inputHandler = (name, value) => {
            this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
        };
    }
    async validateAndSubmit(onSuccess) {
        const documentList = Object.values(this.documents).flat();
        this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.electronicEvidence));
    }
    ;
    componentWillLoad() {
        this.form = new index_esm.FormController(ElectronicEvidenceSchema);
    }
    componentDidLoad() {
        this.form.errors.subscribe(errors => {
            this.errors = Object.assign({}, errors);
        });
    }
    render() {
        var _a, _b;
        return (index.h("div", { key: 'cf4615613589be984c7d5b6b50f0b5239895d81d' }, index.h("div", { key: '1f96c50146d009cc4d0d0ccbee41c31144e7f746', class: "row gy-3" }, index.h("div", { key: '3a671ff5c959efaee8dc57dda073de113489f0a6', class: "col-12" }, index.h("h2", { key: '3b73879b357d3465c6c76b27db17b6dbdce7c538', class: "h5", part: parts.heading5 }, "Electronic Evidence")), index.h("div", { key: '35c0ff43bc1dcdba8916b51da636347395c98901', class: "col-12" }, index.h("form-control-text", { key: 'cdabf70034babf41ba227f66936f8b340f104ca3', label: "Purchase IP Address", name: "customer_purchase_ip_address", helpText: "The IP address used by the customer during the purchase.", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_purchase_ip_address, inputHandler: this.inputHandler, errorText: this.errors.customer_purchase_ip_address })), index.h("div", { key: 'd9920bf1548e14c6adadbc63dc41a1a90cc1a3cc', class: "col-12" }, index.h("form-control-file-v2", { key: '8eec5b79872eeeda77702d9f4cc9003a627e6682', label: "Activity Logs", name: "activity_log", helpText: "Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_b = this.documentErrors) === null || _b === void 0 ? void 0 : _b.activity_log })))));
    }
};

const ProductOrServiceSchema = index_esm.create$3({
    product_description: index_esm.create$6().nullable(),
    service_date: index_esm.create$6().nullable(),
});

const ProductOrService = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.documentErrors = {};
        this.errors = {};
        this.documents = { service_documentation: [] };
        this.inputHandler = (name, value) => {
            this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
        };
    }
    async validateAndSubmit(onSuccess) {
        const documentList = Object.values(this.documents).flat();
        this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.productOrService));
    }
    ;
    componentWillLoad() {
        this.form = new index_esm.FormController(ProductOrServiceSchema);
    }
    componentDidLoad() {
        this.form.errors.subscribe(errors => {
            this.errors = Object.assign({}, errors);
        });
    }
    render() {
        var _a, _b, _c;
        return (index.h("div", { key: 'befcaee1dd5343ec47a55f27dc51c1d18cd57a71' }, index.h("div", { key: '56005c7449374963a548ea89250cc8ebbf2e75e4', class: "row gy-3" }, index.h("div", { key: 'ba5cdd019cb69288b49570d59317079665bf2b81', class: "col-12" }, index.h("h2", { key: '494feff3a2bb645653c77c7d7b031e761ed8c253', class: "h5", part: parts.heading5 }, "Product & Service Details")), index.h("div", { key: '84db8064cd1c110e64b56961838f62f8676aed19', class: "col-12" }, index.h("form-control-text", { key: '98e82b9ca4b27476bc9e523afaf13ce55df9cce5', label: "Product Description", name: "product_description", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.product_description, inputHandler: this.inputHandler, errorText: this.errors.product_description })), index.h("div", { key: 'da06d2ef195dbc8cee8680e3a4c9107849836ab3', class: "col-12" }, index.h("form-control-date", { key: '3d2fb41fccfddb65d92468a78e3f5a4cfd9a67b5', label: "Service Date", name: "service_date", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.service_date, inputHandler: this.inputHandler, errorText: this.errors.service_date })), index.h("div", { key: '824410485b182d8e309468506a9c8ae19ce1461f', class: "col-12" }, index.h("form-control-file-v2", { key: 'f8f5d542260b88754c05b61f0d50374d1f66a93e', label: "Service Documentation", name: "service_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.service_documentation })))));
    }
};

const RefundPolicySchema = index_esm.create$3({
    refund_policy_disclosure: index_esm.create$6().nullable(),
    refund_refusal_explanation: index_esm.create$6().nullable(),
});

const RefundPolicy = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.documentErrors = {};
        this.errors = {};
        this.documents = { refund_policy: [], receipt: [] };
        this.inputHandler = (name, value) => {
            this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
        };
    }
    async validateAndSubmit(onSuccess) {
        const documentList = Object.values(this.documents).flat();
        this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.refundPolicy));
    }
    ;
    componentWillLoad() {
        this.form = new index_esm.FormController(RefundPolicySchema);
    }
    componentDidLoad() {
        this.form.errors.subscribe(errors => {
            this.errors = Object.assign({}, errors);
        });
    }
    render() {
        var _a, _b, _c, _d;
        return (index.h("div", { key: 'd5419f7dc7ca4e66522437969b451c7adfda6b06' }, index.h("div", { key: 'f74344edd56fe88d481f3c428aee3f7a3170ef1a', class: "row gy-3" }, index.h("div", { key: 'ad826fd7a497664e8a9a97bf4f749ddd5f4899a4', class: "col-12" }, index.h("h2", { key: 'f792af239a7df56d2a7289fae8ee487048343851', class: "h5", part: parts.heading5 }, "Refund Policy and Receipt")), index.h("div", { key: '5a159d8fbb74d7580a9d6ef34d1a752b68525251', class: "col-12" }, index.h("form-control-textarea", { key: '8fdcac1c9336874635d955f651b44389ddc3d576', label: "Refund Policy Disclosure", name: "refund_policy_disclosure", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.refund_policy_disclosure, inputHandler: this.inputHandler })), index.h("div", { key: 'ca0d7a0c5161d572a27459ec5847bd6aedda8552', class: "col-12" }, index.h("form-control-textarea", { key: '7dde3212e5453772afbc4dfff8de5285d29ec3b3', label: "Refund Refusal Explanation", name: "refund_refusal_explanation", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.refund_refusal_explanation, inputHandler: this.inputHandler })), index.h("div", { key: 'ec5615813cceb9b2eaaf327e4a4fb2785f341ce8', class: "col-12" }, index.h("form-control-file-v2", { key: '38d6901b619eb353da9b6066957579caa97064e3', label: "Upload Refund Policy", name: "refund_policy", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.refund_policy })), index.h("div", { key: '64245ce028bff37a6f9852e75d1b2e6ba27fd3ef', class: "col-12" }, index.h("form-control-file-v2", { key: '126ce22ff40995cfc0d4f059b2463a98a6dfcb50', label: "Upload Receipt", name: "receipt", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_d = this.documentErrors) === null || _d === void 0 ? void 0 : _d.receipt })))));
    }
};

const ShippingDetailsSchema = index_esm.create$3({
    shipping_carrier: index_esm.create$6().nullable(),
    shipping_tracking_number: index_esm.create$6().nullable(),
    shipping_date: index_esm.create$6().nullable(),
    shipping_address: index_esm.create$6().nullable(),
});

const ShippingDetails = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.documentErrors = {};
        this.errors = {};
        this.documents = { shipping_documentation: [] };
        this.documentList = [];
        this.inputHandler = (name, value) => {
            this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
        };
    }
    async validateAndSubmit(onSuccess) {
        const documentList = Object.values(this.documents).flat();
        this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.shippingDetails));
    }
    ;
    componentWillLoad() {
        this.form = new index_esm.FormController(ShippingDetailsSchema);
    }
    componentDidLoad() {
        this.form.errors.subscribe(errors => {
            this.errors = Object.assign({}, errors);
        });
    }
    render() {
        var _a, _b, _c, _d, _e;
        return (index.h("div", { key: 'dabe709653579ef5c19806146e149fdbfa65686c' }, index.h("div", { key: '07d9f91a68d770daed48f84678ffa2f2182b4625', class: "row gy-3" }, index.h("div", { key: '6052cb801e0e8cfc73a946e32d37a35e4726f8aa', class: "col-12" }, index.h("h2", { key: '8cea7d2ac9d5e53a01d4e8f3a14b3b6947e72f19', class: "h5", part: parts.heading5 }, "Shipping Details")), index.h("div", { key: '79adf032e4435f8e89e5d848e397c8389c35ee99', class: "col-12" }, index.h("form-control-text", { key: '4dd59285b595b33944168e5a959fbf7686b71c4c', label: "Shipping Carrier Name", name: "shipping_carrier", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.shipping_carrier, inputHandler: this.inputHandler, errorText: this.errors.shipping_carrier })), index.h("div", { key: 'e25cb74edb5133cfaa1c8abb6194a43104d51e80', class: "col-12" }, index.h("form-control-text", { key: 'bdb47ebe63e9717db4308d89e890bdd01ecad9fc', label: "Tracking Number", name: "shipping_tracking_number", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.shipping_tracking_number, inputHandler: this.inputHandler, errorText: this.errors.shipping_tracking_number })), index.h("div", { key: 'ccb5a0facc6aa6f7c311f3d1a395faa214b4c099', class: "col-12" }, index.h("form-control-date", { key: 'a2e1a7af287b7afae6ba7451bd4f51292e2e14fa', label: "Date Shipped", name: "shipping_date", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.shipping_date, inputHandler: this.inputHandler, errorText: this.errors.shipping_date })), index.h("div", { key: 'ce176cd89d1c2fbf4cb3e1a84d84fb38e7f77ae9', class: "col-12" }, index.h("form-control-textarea", { key: '5f09d91a79081a8dea6eb44b44e6500f5f9b547b', label: "Shipping Address", name: "shipping_address", defaultValue: (_d = this.disputeResponse) === null || _d === void 0 ? void 0 : _d.shipping_address, inputHandler: this.inputHandler, errorText: this.errors.shipping_address })), index.h("div", { key: 'b41048055f1fc82bb383d300f32e13efa2a4f0fc', class: "col-12" }, index.h("form-control-file-v2", { key: '2fda26e5404c3a2a0c10261ffc1e005b688e057a', label: "Shipping Documentation", name: "shipping_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_e = this.documentErrors) === null || _e === void 0 ? void 0 : _e.shipping_documentation })))));
    }
};

exports.additional_statement = AdditionalStatement;
exports.cancellation_policy = CancellationPolicy;
exports.customer_details = CustomerDetails;
exports.duplicate_charge = DuplicateCharge;
exports.electronic_evidence = ElectronicEvidence;
exports.product_or_service = ProductOrService;
exports.refund_policy = RefundPolicy;
exports.shipping_details = ShippingDetails;
