import { h, Host } from "@stencil/core";
import { inheritTrackingAttributes } from "../../../utils/attributes";
export class StepItem {
    constructor() {
        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' })));
    }
    static get is() { return "bal-step-item"; }
    static get properties() {
        return {
            "active": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Tells if this route is active and overrides the bal-tabs value property."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "active",
                "defaultValue": "false"
            },
            "value": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "This is the key of the tab."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "value",
                "defaultValue": "''"
            },
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Label for the tab."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "label",
                "defaultValue": "''"
            },
            "href": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Link to path."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "href",
                "defaultValue": "''"
            },
            "rel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string | undefined",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Specifies the relationship of the target object to the link object.\nThe value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "rel"
            },
            "target": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BalProps.BalButtonTarget",
                    "resolved": "\" _parent\" | \"_blank\" | \"_self\" | \"_top\"",
                    "references": {
                        "BalProps": {
                            "location": "global",
                            "id": "global::BalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Specifies where to display the linked URL.\nOnly applies when an `href` is provided."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "target",
                "defaultValue": "'_self'"
            },
            "disabled": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "If `true` the tab is disabled."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "disabled",
                "defaultValue": "false"
            },
            "done": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "If `true` the step is marked as done."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "done",
                "defaultValue": "false"
            },
            "invisible": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "If `true` the step is hidden."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "invisible",
                "defaultValue": "false"
            },
            "failed": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "If `true` the step is marked as failed."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "failed",
                "defaultValue": "false"
            },
            "prevent": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Tell's if the linking is done by a router."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "prevent",
                "defaultValue": "false"
            }
        };
    }
    static get states() {
        return {
            "isActive": {}
        };
    }
    static get events() {
        return [{
                "method": "balNavigate",
                "name": "balNavigate",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the link element has clicked"
                },
                "complexType": {
                    "original": "BalEvents.BalStepItemNavigateDetail",
                    "resolved": "MouseEvent",
                    "references": {
                        "BalEvents": {
                            "location": "global",
                            "id": "global::BalEvents"
                        }
                    }
                }
            }];
    }
    static get methods() {
        return {
            "getOptions": {
                "complexType": {
                    "signature": "() => Promise<BalStepOption>",
                    "parameters": [],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        },
                        "BalStepOption": {
                            "location": "import",
                            "path": "../bal-step.type",
                            "id": "src/components/bal-steps/bal-step.type.ts::BalStepOption"
                        }
                    },
                    "return": "Promise<BalStepOption>"
                },
                "docs": {
                    "text": "Options of the tab like label, value etc.",
                    "tags": []
                }
            },
            "setActive": {
                "complexType": {
                    "signature": "(active: boolean) => Promise<void>",
                    "parameters": [{
                            "name": "active",
                            "type": "boolean",
                            "docs": ""
                        }],
                    "references": {
                        "Promise": {
                            "location": "global",
                            "id": "global::Promise"
                        }
                    },
                    "return": "Promise<void>"
                },
                "docs": {
                    "text": "Sets the tab active.",
                    "tags": []
                }
            }
        };
    }
    static get elementRef() { return "el"; }
}
