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: 'fafc5e09cabff7714c6ff3f962c75371fa688689', class: { 'has-column-layout': isLabelsTextLong } }, props), h("div", { key: '23b24f6a3d0713721dc1b99e6b2b56ef31353e0c', class: "label" }, this.label), h("div", { key: 'eab1beacbefb439a662e842f8b93c83a173ffa78', 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"
            }
        };
    }
}
