import { r as registerInstance, h, H as Host, g as getElement } from './index-ClISz4NF.js';
import { c as createID } from './string.utils-vN03FcXN.js';
import { g as govHost, t as toBoolAttrIfDefined } from './template-CoD1xawt.js';
import { a as TabsClass, T as TabsItemClass } from './constants-DHvN41Ek.js';
import './utils-CQvUntGY.js';
import './sizes-BcQO4NH2.js';
import './colors-U40vKHrs.js';

const GovTabsItem = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        /**
         * Item disable state
         */
        this.disabled = false;
        /**
         * Default selected tab
         */
        this.default = false;
        this.isActive = false;
        this.h = govHost(this.host);
        this.contentId = createID('GovTabContent');
        this.triggerId = createID('GovTabTrigger');
    }
    rerenderParent() {
        const element = this.h.getParent(TabsClass.root);
        if (element) {
            element.rerender().catch();
        }
    }
    render() {
        return (h(Host, { key: '7de42fde0ca4e787967c76a14aa2498367f66a1c', class: this.h.classes(TabsItemClass.root), default: this.default }, h("div", { key: '89f6bf8f5505ed17e5a9c46f60dfbf34353a75e6', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, 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 getElement(this); }
    static get watchers() { return {
        "label": ["rerenderParent"],
        "disabled": ["rerenderParent"]
    }; }
};

export { GovTabsItem as gov_tabs_item };
//# sourceMappingURL=gov-tabs-item.entry.js.map

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