'use strict';

var index = require('./index-C_OnxXhP.js');

const mentionGroupCounterCss = () => `:host(limebb-mention-group-counter){order:2;margin-right:-0.5rem;box-sizing:border-box;transition:background-color 0.2s ease;min-width:fit-content;font-size:smaller;border-radius:9rem;cursor:help;padding:0.25rem 0.5rem;line-height:1;border:1px solid rgb(var(--contrast-500))}:host(limebb-mention-group-counter:hover){border-color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-600))}`;

const MentionGroupCounter = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.tooltipId = 'a' + crypto.randomUUID();
    }
    render() {
        const label = this.getLabel();
        return [
            index.h("span", { key: 'b2dca0d50a70b8c7bf187ef2f6c29960c4caf563', id: this.tooltipId }, label),
            index.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}`;
    }
};
MentionGroupCounter.style = mentionGroupCounterCss();

exports.limebb_mention_group_counter = MentionGroupCounter;
