import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { a as bankAccountTypeOptions } from './business-form-options.js';
import './event-types2.js';
import { n as numberOnlyHandler } from './utils4.js';
import { d as defineCustomElement$5 } from './bank-account-read-only-value2.js';
import { d as defineCustomElement$4 } from './custom-popper2.js';
import { d as defineCustomElement$3 } from './form-control-select2.js';
import { d as defineCustomElement$2 } from './form-control-text2.js';
import { d as defineCustomElement$1 } from './form-control-tooltip2.js';

const BankAccountFormInputs = /*@__PURE__*/ proxyCustomElement(class BankAccountFormInputs extends HTMLElement {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
    }
    render() {
        var _a, _b, _c, _d, _e, _f;
        return (h("div", { key: 'd3445ce89732e19baea2e8f224c42011d5a03998', class: "row gy-3" }, h("div", { key: '966e1d8ba6043b4f9b57ae0061ae94c177c12b48', class: "col-12" }, this.formDisabled ? (h("bank-account-read-only-value", { label: "Bank Name", value: (_a = this.defaultValue) === null || _a === void 0 ? void 0 : _a.bank_name })) : (h("form-control-text", { name: "bank_name", label: "Bank Name", defaultValue: this.defaultValue.bank_name, errorText: this.errors.bank_name, inputHandler: this.inputHandler }))), h("div", { key: '314a4f7e181b978b2ff1fdbfdfc8d9484089829a', class: "col-12" }, this.formDisabled ? (h("bank-account-read-only-value", { label: "Nickname", value: (_b = this.defaultValue) === null || _b === void 0 ? void 0 : _b.nickname })) : (h("form-control-text", { name: "nickname", label: "Nickname", defaultValue: this.defaultValue.nickname, errorText: this.errors.nickname, inputHandler: this.inputHandler }))), h("div", { key: '45ac55707ce44b208adaf72e944ea3056810183a', class: "col-12" }, this.formDisabled ? (h("bank-account-read-only-value", { label: "Account Owner Name", value: (_c = this.defaultValue) === null || _c === void 0 ? void 0 : _c.account_owner_name })) : (h("form-control-text", { name: "account_owner_name", label: "Account Owner Name", defaultValue: this.defaultValue.account_owner_name, errorText: this.errors.account_owner_name, inputHandler: this.inputHandler }))), h("div", { key: '74ce58b36eb3a425d900d7bb0858bda18b2e341c', class: "col-12" }, this.formDisabled ? (h("bank-account-read-only-value", { label: "Account Type", value: (_d = this.defaultValue) === null || _d === void 0 ? void 0 : _d.account_type })) : (h("form-control-select", { name: "account_type", label: "Account Type", options: bankAccountTypeOptions, defaultValue: this.defaultValue.account_type, errorText: this.errors.account_type, inputHandler: this.inputHandler }))), h("div", { key: '2562105aaaae00d9c46eb61d931a43927d96a8ce', class: "col-6" }, this.formDisabled ? (h("bank-account-read-only-value", { label: "Account Number", value: ((_e = this.defaultValue) === null || _e === void 0 ? void 0 : _e.account_number_last4) ? `**** ${this.defaultValue.account_number_last4}` : '' })) : (h("form-control-text", { name: "account_number", label: "Account Number", defaultValue: this.defaultValue.account_number, maxLength: 17, errorText: this.errors.account_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, helpText: "Please copy the account number as shown on your statement/check. Do not include spaces or dashes." }))), h("div", { key: '4c7e6cba0ee1e2567dc5b608559b13ebd3fddd07', class: "col-6" }, this.formDisabled ? (h("bank-account-read-only-value", { label: "Routing Number", value: ((_f = this.defaultValue) === null || _f === void 0 ? void 0 : _f.routing_number) || '' })) : (h("form-control-text", { name: "routing_number", label: "Routing Number", defaultValue: this.defaultValue.routing_number, maxLength: 9, errorText: this.errors.routing_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, helpText: "A valid routing number is nine digits. Please include any leading or trailing zeroes." })))));
    }
}, [256, "bank-account-form-inputs", {
        "defaultValue": [8, "default-value"],
        "errors": [8],
        "inputHandler": [16],
        "formDisabled": [4, "form-disabled"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["bank-account-form-inputs", "bank-account-read-only-value", "custom-popper", "form-control-select", "form-control-text", "form-control-tooltip"];
    components.forEach(tagName => { switch (tagName) {
        case "bank-account-form-inputs":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, BankAccountFormInputs);
            }
            break;
        case "bank-account-read-only-value":
            if (!customElements.get(tagName)) {
                defineCustomElement$5();
            }
            break;
        case "custom-popper":
            if (!customElements.get(tagName)) {
                defineCustomElement$4();
            }
            break;
        case "form-control-select":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "form-control-text":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "form-control-tooltip":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}
defineCustomElement();

export { BankAccountFormInputs as B, defineCustomElement as d };
