import { h } from "@stencil/core";
/**
 * This component is used internally by `limel-tooltip`.
 *
 * @private
 */
export class TooltipContent {
    render() {
        let isLabelsTextLong = false;
        if (this.helperLabel && this.maxlength) {
            isLabelsTextLong =
                this.label.length + this.helperLabel.length > this.maxlength;
        }
        const props = {};
        if (this.maxlength) {
            props.style = {
                '--tooltip-max-width-of-text': `${this.maxlength}` + 'ch',
            };
        }
        return [
            h("text", Object.assign({ key: 'c19e656075b926d26447a5620a0a779686445129', class: { 'has-column-layout': isLabelsTextLong } }, props), h("div", { key: '3e6c1220fde6121d6da548c48c776cbfbb83f4cd', class: "label" }, this.label), h("div", { key: 'e0dd60dc54481586a4af70a6c133ded3b32bb688', class: "helper-label" }, this.helperLabel)),
        ];
    }
    static get is() { return "limel-tooltip-content"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["tooltip-content.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["tooltip-content.css"]
        };
    }
    static get properties() {
        return {
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Read more in tooltip.tsx"
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "label"
            },
            "helperLabel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Read more in tooltip.tsx"
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "helper-label"
            },
            "maxlength": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Read more in tooltip.tsx"
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "maxlength"
            }
        };
    }
}
