import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
import { a as inheritTrackingAttributes } from './attributes.js';

const StepItem = /*@__PURE__*/ proxyCustomElement(class StepItem extends HTMLElement {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.balNavigate = createEvent(this, "balNavigate", 7);
        this.inheritAttributes = {};
        this.isActive = false;
        /**
         * Tells if this route is active and overrides the bal-tabs value property.
         */
        this.active = false;
        /**
         * This is the key of the tab.
         */
        this.value = '';
        /**
         * Label for the tab.
         */
        this.label = '';
        /**
         * Link to path.
         */
        this.href = '';
        /**
         * Specifies where to display the linked URL.
         * Only applies when an `href` is provided.
         */
        this.target = '_self';
        /**
         * If `true` the tab is disabled.
         */
        this.disabled = false;
        /**
         * If `true` the step is marked as done.
         */
        this.done = false;
        /**
         * If `true` the step is hidden.
         */
        this.invisible = false;
        /**
         * If `true` the step is marked as failed.
         */
        this.failed = false;
        /**
         * Tell's if the linking is done by a router.
         */
        this.prevent = false;
    }
    componentWillLoad() {
        this.inheritAttributes = inheritTrackingAttributes(this.el);
    }
    /**
     * Options of the tab like label, value etc.
     */
    async getOptions() {
        return this.options;
    }
    /**
     * Sets the tab active.
     */
    async setActive(active) {
        this.isActive = active;
    }
    get options() {
        return {
            value: this.value,
            label: this.label,
            href: this.href,
            rel: this.rel,
            target: this.target,
            active: this.active,
            disabled: this.disabled,
            done: this.done,
            invisible: this.invisible,
            failed: this.failed,
            passed: false,
            prevent: this.prevent,
            navigate: this.balNavigate,
            trackingData: this.inheritAttributes,
        };
    }
    render() {
        return (h(Host, { key: 'a0ddc77150d56b852231c285748de238aeda360a', role: "tabpanel", class: {
                'bal-step-item': true,
                'bal-step-item--active': this.isActive,
            } }, h("slot", { key: 'f79435da222ca19525b56983ef2fc089610a2e0d' })));
    }
    get el() { return this; }
}, [260, "bal-step-item", {
        "active": [516],
        "value": [513],
        "label": [513],
        "href": [513],
        "rel": [1],
        "target": [1],
        "disabled": [516],
        "done": [516],
        "invisible": [516],
        "failed": [516],
        "prevent": [4],
        "isActive": [32],
        "getOptions": [64],
        "setActive": [64]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["bal-step-item"];
    components.forEach(tagName => { switch (tagName) {
        case "bal-step-item":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, StepItem);
            }
            break;
    } });
}

const BalStepItem = StepItem;
const defineCustomElement = defineCustomElement$1;

export { BalStepItem, defineCustomElement };
