'use strict';

var index = require('./index-feA4skrY.js');
var attributes = require('./attributes-Cp0kpySW.js');

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

exports.bal_step_item = StepItem;
