import { r as registerInstance, h } from './index-CV0Pyo1O.js';
import { C as CountryCode } from './Business-BcNb9bVO.js';
import { B as BusinessFormClickActions } from './event-types-XYgDHrVL.js';
import { B as Button } from './button-BvzOzV4l.js';
import './event-types-CZfYo5-1.js';
import './parts-CPKMvyV_.js';

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

const PaymentProvisioningFormSteps = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.allowOptionalFields = false;
        this.country = CountryCode.USA;
        this.componentStepMapping = {
            0: () => 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: () => h("legal-address-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[1] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            2: () => h("additional-questions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[2] = el, allowOptionalFields: this.allowOptionalFields }),
            3: () => h("business-representative-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[3] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            4: () => h("business-owners-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[4] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            5: () => 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: () => h("document-upload-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[6] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
            7: () => 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 (h("div", { key: 'a249d66ac8348900e21998c4cf89bd02cfeec7c1', class: 'col-12 mb-4' }, this.currentStepComponent));
    }
};

export { PaymentProvisioningFormButtons as payment_provisioning_form_buttons, PaymentProvisioningFormSteps as payment_provisioning_form_steps };
