'use strict';

var index = require('./index-p7cvUYAE.js');
var Business = require('./Business-oBifyXkW.js');
var eventTypes = require('./event-types-DNOUef41.js');
var button = require('./button-CR9Rl1-o.js');
require('./event-types-YOY5TKUN.js');
require('./parts-BXshb_S-.js');

const PaymentProvisioningFormButtons = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    get showPreviousStepButton() {
        return this.currentStep > 0;
    }
    get showNextStepButton() {
        return this.currentStep < this.totalSteps;
    }
    get showSubmitButton() {
        return this.currentStep === this.totalSteps;
    }
    render() {
        return (index.h("div", { key: '6fac4d1e92b732da3e7e867c091f23e9e3b7d6ab', class: 'd-flex gap-2' }, index.h(button.Button, { key: 'a96025bed24ade707d7f28561a12a9bcf62401e8', variant: "secondary", type: "button", onClick: () => this.previousStepButtonOnClick(), disabled: this.formDisabled, hidden: !this.showPreviousStepButton }, "Previous"), index.h(button.Button, { key: 'c4bd0d4a7f79942b307a4587e77c73158d4b704d', variant: "primary", type: "button", onClick: (e) => this.nextStepButtonOnClick(e, eventTypes.BusinessFormClickActions.nextStep), disabled: this.formDisabled, isLoading: this.formLoading, hidden: !this.showNextStepButton }, "Next"), index.h(button.Button, { key: '5fa56e168646f4fa266fde124c78dc2564a6c311', variant: "primary", type: "submit", onClick: (e) => this.nextStepButtonOnClick(e, eventTypes.BusinessFormClickActions.submit), disabled: this.formDisabled, isLoading: this.formLoading, hidden: !this.showSubmitButton }, "Submit")));
    }
};

const PaymentProvisioningFormSteps = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.allowOptionalFields = false;
        this.country = Business.CountryCode.USA;
        this.componentStepMapping = {
            0: () => index.h("business-core-info-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[0] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            1: () => index.h("legal-address-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[1] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            2: () => index.h("additional-questions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[2] = el, allowOptionalFields: this.allowOptionalFields }),
            3: () => index.h("business-representative-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[3] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            4: () => index.h("business-owners-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[4] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            5: () => index.h("business-bank-account-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[5] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            6: () => index.h("document-upload-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[6] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            7: () => index.h("business-terms-conditions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[7] = el, onFormLoading: this.handleFormLoading, allowOptionalFields: this.allowOptionalFields }),
        };
    }
    get currentStepComponent() {
        return this.componentStepMapping[this.currentStep]();
    }
    render() {
        return (index.h("div", { key: 'a249d66ac8348900e21998c4cf89bd02cfeec7c1', class: 'col-12 mb-4' }, this.currentStepComponent));
    }
};

exports.payment_provisioning_form_buttons = PaymentProvisioningFormButtons;
exports.payment_provisioning_form_steps = PaymentProvisioningFormSteps;
