import { H as registerInstance, P as createEvent, M as h, N as Host, O as getElement } from './index-PmQf2Yvi.js';
import { a as inheritTrackingAttributes } from './attributes-C4sZQbkT.js';

const StepItem = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.balNavigate = createEvent(this, "balNavigate");
        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: '2c4f197cd8d47db462c0262b01080aff16e1e53f', role: "tabpanel", class: {
                'bal-step-item': true,
                'bal-step-item--active': this.isActive,
            } }, h("slot", { key: 'a4a68d86354b4c4b14c6e35362cfe5a9b7e79b77' })));
    }
    get el() { return getElement(this); }
};

export { StepItem as bal_step_item };
