/*!
 * Custom elements for Nanopore-Digital Web applications
 */
import { Host, } from "@stencil/core";
import { h } from "../../utils/renderer";
let id = 0;
/**
 * Used inside [tab groups](/components/tab-group) to display content.
 *
 * @version 1.0
 * @status stable
 *
 * @slot - The tab panel's content.
 */
export class NanoTabContent {
    tabContentId = `nano-tab-content-${++id}`;
    ready = false;
    host;
    /** The tab panel's name. */
    name = '';
    /** When true, the tab content will be shown. */
    active = false;
    componentDidLoad() {
        requestAnimationFrame(() => (this.ready = true));
    }
    render() {
        return (h(Host, { key: 'd6b4670c20b4ba1434561d9ca12fa31da1a0e20d', id: this.host.id || this.tabContentId, style: { display: this.active ? 'block' : 'none' }, role: "tabpanel", "aria-hidden": this.active ? 'false' : 'true', class: {
                ready: this.ready,
                'nano-tab-content': true,
            } }, h("div", { key: 'c7c7a56f8942451a8a9beca4b9126c5f6533f9e3', part: "base", class: "nano-tab-content" }, h("slot", { key: '662b14c342f751f9d7a4bcbfecb82ae8207ee219' }))));
    }
    static get is() { return "nano-tab-content"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["tab-content.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["tab-content.css"]
        };
    }
    static get properties() {
        return {
            "name": {
                "type": "string",
                "attribute": "name",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The tab panel's name."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "defaultValue": "''"
            },
            "active": {
                "type": "boolean",
                "attribute": "active",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "When true, the tab content will be shown."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "defaultValue": "false"
            }
        };
    }
    static get states() {
        return {
            "ready": {}
        };
    }
    static get elementRef() { return "host"; }
}
