import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { d as defineCustomElement$5 } from './custom-popper2.js';
import { d as defineCustomElement$4 } from './form-address-fields2.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 IdentityAddressForm = /*@__PURE__*/ proxyCustomElement(class IdentityAddressForm extends HTMLElement {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.address = {};
        this.inputHandler = (name, value) => {
            this.address[name] = value;
            this.address = Object.assign({}, this.address);
        };
    }
    handleAddressChange(newValues) {
        this.handleFormUpdate(newValues);
    }
    render() {
        return (h(Host, { key: '71100bc3742c3efaa9c3a948bf3ac5c69281c559' }, h("form-address-fields", { key: 'e5e5399686aa272a9cbe45d6914ebeda6a1966f4', country: this.country, errors: this.errors, defaultValues: this.defaultValues, inputHandler: this.inputHandler })));
    }
    static get watchers() { return {
        "address": ["handleAddressChange"]
    }; }
}, [256, "identity-address-form", {
        "handleFormUpdate": [16],
        "errors": [8],
        "defaultValues": [8, "default-values"],
        "country": [1],
        "address": [32]
    }, undefined, {
        "address": ["handleAddressChange"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["identity-address-form", "custom-popper", "form-address-fields", "form-control-select", "form-control-text", "form-control-tooltip"];
    components.forEach(tagName => { switch (tagName) {
        case "identity-address-form":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, IdentityAddressForm);
            }
            break;
        case "custom-popper":
            if (!customElements.get(tagName)) {
                defineCustomElement$5();
            }
            break;
        case "form-address-fields":
            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 { IdentityAddressForm as I, defineCustomElement as d };
