import { Host, h } from "@stencil/core";
/**
 * Meta content for menu list items
 *
 * This sub-component is intended to be passed as `primaryComponent`
 * to `limel-list-item`, when it is used in the menu list.
 * It includes command text, badge, and chevron, which are the
 * features of menu list items.
 *
 * @private
 */
export class MenuItemMeta {
    constructor() {
        /**
         * Shows a submenu chevron to indicate nested items
         */
        this.showChevron = false;
    }
    render() {
        return (h(Host, { key: '60731fc2a51315556731654a08616092dc6e44a8' }, this.renderCommandText(), this.renderBadge(), this.renderChevron()));
    }
    renderCommandText() {
        if (!this.commandText) {
            return;
        }
        return h("span", { class: "command-text" }, this.commandText);
    }
    renderBadge() {
        if (this.badge === undefined) {
            return;
        }
        return h("limel-badge", { label: String(this.badge) });
    }
    renderChevron() {
        if (!this.showChevron) {
            return;
        }
        return h("div", { class: "chevron", "aria-hidden": "true" });
    }
    static get is() { return "limel-menu-item-meta"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["menu-item-meta.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["menu-item-meta.css"]
        };
    }
    static get properties() {
        return {
            "commandText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Use to display optional keyboard shortcut or command hint, e.g. `\u2318 + K`"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "command-text"
            },
            "badge": {
                "type": "any",
                "mutable": false,
                "complexType": {
                    "original": "string | number",
                    "resolved": "number | string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Optional badge value"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "badge"
            },
            "showChevron": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Shows a submenu chevron to indicate nested items"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "show-chevron",
                "defaultValue": "false"
            }
        };
    }
}
