import { h } from "@stencil/core";
export class BpSdkDeleteButton {
    constructor() {
        this.useExternal = false;
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-delete-button');
        customElements.whenDefined('bp-sdk-external-delete-button').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-delete-button", null);
    }
    renderInternal() {
        return (h("button", { class: "bp-sdk-delete-button" }, h("bp-sdk-icon-container", { name: "trashcan" }, h("slot", null, "Delete"))));
    }
    static get is() { return "bp-sdk-delete-button"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-delete-button.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-delete-button.css"]
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
