import { h } from "@stencil/core";
export class BpSdkSendToExchangeButton {
    constructor() {
        this.text = '';
        this.buttonDisabled = false;
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-send-to-exchange-button');
        customElements.whenDefined('bp-sdk-external-send-to-exchange-button').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-send-to-exchange-button", { buttonDisabled: this.buttonDisabled, text: this.text });
    }
    renderInternal() {
        return h("bp-sdk-button", { buttonDisabled: this.buttonDisabled, text: this.text });
    }
    static get is() { return "bp-sdk-send-to-exchange-button"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-send-to-exchange-button.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-send-to-exchange-button.css"]
        };
    }
    static get properties() {
        return {
            "text": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Text to be displayed"
                },
                "attribute": "text",
                "reflect": false,
                "defaultValue": "''"
            },
            "buttonDisabled": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Controls disabled state of button"
                },
                "attribute": "button-disabled",
                "reflect": false,
                "defaultValue": "false"
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
