import { h } from "@stencil/core";
export class BpSdkVehicleEditButton {
    constructor() {
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-vehicle-edit-button');
        customElements.whenDefined('bp-sdk-external-vehicle-edit-button').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-vehicle-edit-button", null);
    }
    renderInternal() {
        return (h("button", { type: "button", class: "bp-sdk-vehicle-edit-button" }, "Edit"));
    }
    static get is() { return "bp-sdk-vehicle-edit-button"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-vehicle-edit-button.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-vehicle-edit-button.css"]
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
