import { h } from "@stencil/core";
/**
 * This component is used to display the number of items in a group
 * that will be affected by a mention. This is displayed on the
 * list items of the mention picker.
 *
 * @private
 */
export class MentionGroupCounter {
    constructor() {
        this.tooltipId = 'a' + crypto.randomUUID();
    }
    render() {
        const label = this.getLabel();
        return [
            h("span", { key: 'b2dca0d50a70b8c7bf187ef2f6c29960c4caf563', id: this.tooltipId }, label),
            h("limel-tooltip", { key: '97adc0a2b91b830a6fe040712cbdfc1d9839c8f8', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
        ];
    }
    getLabel() {
        const localname = this.limetype.localname;
        const limetypeLabel = this.count === 1 ? localname.singular : localname.plural;
        return `${this.count} ${limetypeLabel}`;
    }
    static get is() { return "limebb-mention-group-counter"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["mention-group-counter.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["mention-group-counter.css"]
        };
    }
    static get properties() {
        return {
            "count": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Number of items in the group"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "count"
            },
            "limetype": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "LimeType",
                    "resolved": "LimeType",
                    "references": {
                        "LimeType": {
                            "location": "import",
                            "path": "@limetech/lime-web-components",
                            "id": "node_modules::LimeType",
                            "referenceLocation": "LimeType"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The limetype to show group count for"
                },
                "getter": false,
                "setter": false
            },
            "helperLabel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Will be used to construct a more descriptive tooltip\nIn English, this could be `will be notified!`"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "helper-label"
            }
        };
    }
}
