import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';
import { s as setConfigState } from './config-state.js';

const JustifiConfigProvider$1 = /*@__PURE__*/ proxyCustomElement(class JustifiConfigProvider extends HTMLElement {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.apiOrigin = "https://wc-proxy.justifi.ai";
        this.iframeOrigin = "https://components.justifi.ai";
        this.accountId = '';
    }
    componentWillLoad() {
        setConfigState({
            apiOrigin: this.apiOrigin,
            iframeOrigin: this.iframeOrigin,
            accountId: this.accountId
        });
    }
    render() {
        return null;
    }
}, [256, "justifi-config-provider", {
        "apiOrigin": [1, "api-origin"],
        "iframeOrigin": [1, "iframe-origin"],
        "accountId": [1, "account-id"]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["justifi-config-provider"];
    components.forEach(tagName => { switch (tagName) {
        case "justifi-config-provider":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, JustifiConfigProvider$1);
            }
            break;
    } });
}
defineCustomElement$1();

const JustifiConfigProvider = JustifiConfigProvider$1;
const defineCustomElement = defineCustomElement$1;

export { JustifiConfigProvider, defineCustomElement };
