import { p as proxyCustomElement, H, h, c as Host } from './p-ae373651.js';
import { d as defineCustomElement$7 } from './p-a3bf84d7.js';
import { d as defineCustomElement$6 } from './p-85587a5c.js';
import { d as defineCustomElement$5 } from './p-d6a71424.js';
import { d as defineCustomElement$4 } from './p-3e0452c4.js';
import { d as defineCustomElement$3 } from './p-7dd3acf5.js';
import { d as defineCustomElement$2 } from './p-06bfb00c.js';
import { d as defineCustomElement$1 } from './p-e6245534.js';

const rtkChatHeaderCss = ":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)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n    var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;width:100%;flex-direction:column;gap:var(--rtk-space-2, 8px);font-size:14px;z-index:10;margin-bottom:var(--rtk-space-2, 8px);box-sizing:border-box;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.chat-header{position:relative;margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);gap:var(--rtk-space-2, 8px);padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));border-radius:var(--rtk-border-radius-sm, 4px);overflow:hidden;border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));cursor:pointer}.chat-header-label{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px)}";
const RtkChatHeaderStyle0 = rtkChatHeaderCss;

const RtkChatHeader = /*@__PURE__*/ proxyCustomElement(class RtkChatHeader extends H {
    constructor() {
        super();
        this.__registerHost();
        this.__attachShadow();
        this.onPinnedToggle = async (e) => {
            var _a, _b, _c;
            if ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.open) {
                await ((_c = (_b = this.$chatSelector) === null || _b === void 0 ? void 0 : _b.close) === null || _c === void 0 ? void 0 : _c.call(_b));
            }
        };
        this.onChatToggle = async (e) => {
            var _a, _b, _c;
            if ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.open) {
                await ((_c = (_b = this.$pinnedSelector) === null || _b === void 0 ? void 0 : _b.close) === null || _c === void 0 ? void 0 : _c.call(_b));
            }
        };
    }
    render() {
        return (h(Host, { key: '3cec93546dc5c7eec01df7b1b1a3847a6f004f0d' }, h("rtk-pinned-message-selector", { key: 'f099b29e1fb773bfb2931bec2358dd15819778ce', ref: (el) => (this.$pinnedSelector = el), onRtkDropdownToggle: this.onPinnedToggle }), h("rtk-chat-selector", { key: '0d33e69cf161381dc7598de279147ec9035ef8d7', ref: (el) => (this.$chatSelector = el), onRtkDropdownToggle: this.onChatToggle })));
    }
    static get style() { return RtkChatHeaderStyle0; }
}, [1, "rtk-chat-header"]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["rtk-chat-header", "rtk-avatar", "rtk-button", "rtk-chat-selector", "rtk-icon", "rtk-paginated-list", "rtk-pinned-message-selector", "rtk-spinner"];
    components.forEach(tagName => { switch (tagName) {
        case "rtk-chat-header":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, RtkChatHeader);
            }
            break;
        case "rtk-avatar":
            if (!customElements.get(tagName)) {
                defineCustomElement$7();
            }
            break;
        case "rtk-button":
            if (!customElements.get(tagName)) {
                defineCustomElement$6();
            }
            break;
        case "rtk-chat-selector":
            if (!customElements.get(tagName)) {
                defineCustomElement$5();
            }
            break;
        case "rtk-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$4();
            }
            break;
        case "rtk-paginated-list":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "rtk-pinned-message-selector":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "rtk-spinner":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}
defineCustomElement();

export { RtkChatHeader as R, defineCustomElement as d };
