import { r as registerInstance, h } from './index-77a9c9e7.js';
import { e as e$ } from './index.esm.min-cd800f97.js';

const bpSdkVehicleVinInputCss = "";
const BpSdkVehicleVinInputStyle0 = bpSdkVehicleVinInputCss;

const BpSdkVehicleVinInput = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.code = undefined;
        this.label = undefined;
        this.pristine = true;
        this.touched = false;
        this.errors = [];
        this.value = undefined;
        this.labelId = e$(8);
        this.useExternal = false;
    }
    resetState() { }
    connectedCallback() {
        this.resetState();
    }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-vehicle-vin-input');
        customElements.whenDefined('bp-sdk-external-vehicle-vin-input').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return (h("bp-sdk-external-vehicle-vin-input", { code: this.code, errors: this.errors, label: this.label, pristine: this.pristine, touched: this.touched }));
    }
    renderInternal() {
        return (h("div", { class: "bp-sdk-vehicle-vin-input__container" }, h("bp-sdk-text-input", { code: this.code, errors: this.errors, fieldType: 'text', label: this.label, labelId: this.labelId, placeholder: "Vin", pristine: this.pristine, questionId: this.labelId, touched: this.touched, text: this.value })));
    }
};
BpSdkVehicleVinInput.style = BpSdkVehicleVinInputStyle0;

export { BpSdkVehicleVinInput as bp_sdk_vehicle_vin_input };
