import { h } from "@stencil/core";
export class BpSdkVehiclePanelLabel {
    constructor() {
        this.vehicleLabel = 'Add new vehicle';
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-vehicle-panel-label');
        customElements.whenDefined('bp-sdk-external-vehicle-panel-label').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-vehicle-panel-label", { vehicleLabel: this.vehicleLabel });
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-vehicle-panel-label__container" }, h("span", null, this.vehicleLabel)));
    }
    static get is() { return "bp-sdk-vehicle-panel-label"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-vehicle-panel-label.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-vehicle-panel-label.css"]
        };
    }
    static get properties() {
        return {
            "vehicleLabel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The name of the vehicle. Defaults to \"Add new vehicle\""
                },
                "attribute": "vehicle-label",
                "reflect": false,
                "defaultValue": "'Add new vehicle'"
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
