import { p as proxyCustomElement, H, h } from './p-ae373651.js';
import { h as hasOnlyEmojis } from './p-efabd2ce.js';
import { d as defineCustomElement$1 } from './p-549ab58f.js';

const rtkTextMessageViewCss = ":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.text{word-break:break-word;display:block;overflow-wrap:break-word;line-height:1.375}.text.emoji{font-size:24px}";
const RtkTextMessageViewStyle0 = rtkTextMessageViewCss;

const RtkTextMessageView = /*@__PURE__*/ proxyCustomElement(class RtkTextMessageView extends H {
    constructor() {
        super();
        this.__registerHost();
        /** Renders text as markdown (default = true) */
        this.isMarkdown = false;
    }
    render() {
        return (h("p", { key: '45d7cc7d147e74609251f6ab3c2918d42ec6aaea', class: { text: true, emoji: hasOnlyEmojis(this.text) } }, this.isMarkdown ? h("rtk-markdown-view", { text: this.text }) : this.text));
    }
    static get style() { return RtkTextMessageViewStyle0; }
}, [0, "rtk-text-message-view", {
        "text": [1],
        "isMarkdown": [4, "is-markdown"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["rtk-text-message-view", "rtk-markdown-view"];
    components.forEach(tagName => { switch (tagName) {
        case "rtk-text-message-view":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, RtkTextMessageView);
            }
            break;
        case "rtk-markdown-view":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}
defineCustomElement();

export { RtkTextMessageView as R, defineCustomElement as d };
