import { h } from "@stencil/core";
export class BpSdkMaskedInputButton {
    constructor() {
        this.label = undefined;
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-masked-input-button');
        customElements.whenDefined('bp-sdk-external-masked-input-button').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-masked-input-button", { label: this.label });
    }
    renderInternal() {
        return (h("button", { "aria-label": this.label, class: "bp-sdk-masked-input-button__container" }, h("slot", null)));
    }
    static get is() { return "bp-sdk-masked-input-button"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-masked-input-button.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-masked-input-button.css"]
        };
    }
    static get properties() {
        return {
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Label"
                },
                "attribute": "label",
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
