import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { S as StyledHost } from './styled-host.js';
import './justifi-details2.js';
import './event-types.js';
import './justifi-radio-list-item2.js';
import { d as defineCustomElement$9 } from './bank-account-billing-form-simple2.js';
import { d as defineCustomElement$8 } from './billing-form2.js';
import { d as defineCustomElement$7 } from './billing-form-full2.js';
import { d as defineCustomElement$6 } from './card-billing-form-simple2.js';
import { d as defineCustomElement$5 } from './custom-popper2.js';
import { d as defineCustomElement$4 } from './form-control-select2.js';
import { d as defineCustomElement$3 } from './form-control-text2.js';
import { d as defineCustomElement$2 } from './form-control-tooltip2.js';

const JustifiBillingForm$1 = /*@__PURE__*/ proxyCustomElement(class JustifiBillingForm extends HTMLElement {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.__attachShadow();
    }
    async getValues() {
        var _a, _b;
        return (_b = (_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.getValues()) !== null && _b !== void 0 ? _b : {};
    }
    async validate() {
        var _a, _b;
        return (_b = (_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.validate()) !== null && _b !== void 0 ? _b : { isValid: false, errors: {} };
    }
    render() {
        return (h(StyledHost, { key: '40a8a4342204d1679c9b37fb775184131c68248b' }, h("billing-form", { key: '65156fc636a2196aa2d189ce5c4d66f755deb3f6', legend: this.legend, hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, paymentMethodType: this.paymentMethodType, ref: (el) => (this.billingFormRef = el) })));
    }
}, [257, "justifi-billing-form", {
        "legend": [1025],
        "hideCardBillingForm": [4, "hide-card-billing-form"],
        "hideBankAccountBillingForm": [4, "hide-bank-account-billing-form"],
        "paymentMethodType": [1, "payment-method-type"],
        "getValues": [64],
        "validate": [64]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["justifi-billing-form", "bank-account-billing-form-simple", "billing-form", "billing-form-full", "card-billing-form-simple", "custom-popper", "form-control-select", "form-control-text", "form-control-tooltip"];
    components.forEach(tagName => { switch (tagName) {
        case "justifi-billing-form":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, JustifiBillingForm$1);
            }
            break;
        case "bank-account-billing-form-simple":
            if (!customElements.get(tagName)) {
                defineCustomElement$9();
            }
            break;
        case "billing-form":
            if (!customElements.get(tagName)) {
                defineCustomElement$8();
            }
            break;
        case "billing-form-full":
            if (!customElements.get(tagName)) {
                defineCustomElement$7();
            }
            break;
        case "card-billing-form-simple":
            if (!customElements.get(tagName)) {
                defineCustomElement$6();
            }
            break;
        case "custom-popper":
            if (!customElements.get(tagName)) {
                defineCustomElement$5();
            }
            break;
        case "form-control-select":
            if (!customElements.get(tagName)) {
                defineCustomElement$4();
            }
            break;
        case "form-control-text":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "form-control-tooltip":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
    } });
}
defineCustomElement$1();

const JustifiBillingForm = JustifiBillingForm$1;
const defineCustomElement = defineCustomElement$1;

export { JustifiBillingForm, defineCustomElement };
