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: '3d96f1730668d689661312967b858e93497699c3', class: { 'has-column-layout': isLabelsTextLong } }, props), h("div", { key: 'd1bad177a97b5f57011aaa7691d8ef99b6dfe3ee', class: "label" }, this.label), h("div", { key: '6b593758bc01dd59b6b192cf000bc1dfbe9db3b2', 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"
            }
        };
    }
}
