'use strict';

var index = require('./index-BEF5cZxd.js');
var string_utils = require('./string.utils-BG4pUfEi.js');
var template = require('./template-Cj6PcLmR.js');
var constants = require('./constants-Dmmp9FHy.js');
require('./utils-NnC78QR3.js');
require('./sizes-D5zsw2g5.js');
require('./colors-DgrrxjsX.js');

const GovTabsItem = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        /**
         * Item disable state
         */
        this.disabled = false;
        /**
         * Default selected tab
         */
        this.default = false;
        this.isActive = false;
        this.h = template.govHost(this.host);
        this.contentId = string_utils.createID('GovTabContent');
        this.triggerId = string_utils.createID('GovTabTrigger');
    }
    rerenderParent() {
        const element = this.h.getParent(constants.TabsClass.root);
        if (element) {
            element.rerender().catch();
        }
    }
    render() {
        return (index.h(index.Host, { key: '7de42fde0ca4e787967c76a14aa2498367f66a1c', class: this.h.classes(constants.TabsItemClass.root), default: this.default }, index.h("div", { key: '89f6bf8f5505ed17e5a9c46f60dfbf34353a75e6', class: constants.TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": template.toBoolAttrIfDefined(!this.isActive) }, index.h("slot", { key: '690b06566e645ce22ec34c47c56852a75ac1069b' }))));
    }
    /**
     * Returns a unique tab content identifier
     */
    async getIdentifier() {
        return this.identifier || this.contentId;
    }
    /**
     * Returns a unique tab trigger identifier
     */
    async getTriggerIdentifier() {
        return this.triggerIdentifier || this.triggerId;
    }
    /**
     * Returns a unique tab trigger identifier
     */
    async getDisableState() {
        return this.disabled;
    }
    /**
     * Set status of tab-item
     */
    async setActiveStatus(status) {
        this.isActive = status;
    }
    get host() { return index.getElement(this); }
    static get watchers() { return {
        "label": ["rerenderParent"],
        "disabled": ["rerenderParent"]
    }; }
};

exports.gov_tabs_item = GovTabsItem;
//# sourceMappingURL=gov-tabs-item.entry.cjs.js.map

//# sourceMappingURL=gov-tabs-item.cjs.entry.js.map