var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
        r = Reflect.decorate(decorators, target, key, desc);
    else
        for (var i = decorators.length - 1; i >= 0; i--)
            if (d = decorators[i])
                r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Host, h } from "@stencil/core";
import { createDefaultConfig } from "../../lib/default-ui-config";
import { defaultIconPack } from "../../lib/icons";
import { useLanguage } from "../../lib/lang";
import debounce from "lodash/debounce";
import { Render } from "../../lib/render";
import { isLiveStreamViewer } from "../../utils/livestream";
import { SyncWithStore } from "../../utils/sync-with-store";
import { defaultGridSize } from "../../lib/grid";
const MASS_ACTIONS_DEBOUNCE_TIMER = 50; // In ms
/**
 * The main grid component which abstracts all the grid handling logic and renders it for you.
 */
export class RtkGrid {
    constructor() {
        this.hideSelf = false;
        this.participants = [];
        this.pinnedParticipants = [];
        this.screenShareParticipants = [];
        this.plugins = [];
        this.emptyStage = false;
        this.showLiveStreamPlayer = false;
        this.canCurrentPeerHost = false;
        this.pipSupported = false;
        this.pipEnabled = false;
        this.hidden = false;
        /** Grid Layout */
        this.layout = 'row';
        /** The aspect ratio of each participant */
        this.aspectRatio = '16:9';
        /** Gap between participants */
        this.gap = 8;
        /** Config object */
        this.config = createDefaultConfig();
        /** Icon pack */
        this.iconPack = defaultIconPack;
        /** Language */
        this.t = useLanguage();
        /** Grid size */
        this.gridSize = defaultGridSize;
        /** @deprecated  */
        this.overrides = {};
        this.invalidRoomStates = ['init', 'waitlisted', 'ended', 'kicked', 'rejected'];
        // TODO(@madhugb): Temp hack, remove this when we ship manual subscription
        this.filterParticipants = (participants) => {
            var _a;
            // Only filter for non recorders
            if (this.overrides && ((_a = this.overrides) === null || _a === void 0 ? void 0 : _a.videoUnsubscribed)) {
                const presetFilters = this.overrides.videoUnsubscribed.preset;
                if (presetFilters.length > 0) {
                    // Filter out unsubscribed participants
                    participants = participants.filter((p) => {
                        const unsubscribed = presetFilters.some((regex) => {
                            if (p.presetName === undefined)
                                return false;
                            return p.presetName.match(regex);
                        });
                        return !unsubscribed;
                    });
                }
            }
            return participants;
        };
        this.onViewModeChanged = () => {
            if (!this.meeting)
                return;
            this.updateActiveParticipants();
        };
        this.onParticipantJoined = debounce(() => {
            this.updateActiveParticipants();
        }, MASS_ACTIONS_DEBOUNCE_TIMER);
        this.onParticipantLeft = debounce(() => {
            this.updateActiveParticipants();
        }, MASS_ACTIONS_DEBOUNCE_TIMER);
        this.stageStatusListener = () => {
            this.updateActiveParticipants();
            this.showLiveStreamPlayer = isLiveStreamViewer(this.meeting);
            if (this.meeting.stage.status !== 'ON_STAGE') {
                this.removeScreenShare(this.meeting.self);
            }
        };
        this.peerStageStatusListener = (participant) => {
            this.updateActiveParticipants();
            if (this.meeting.stage.status !== 'ON_STAGE') {
                this.removePinned(participant);
                this.removeScreenShare(participant);
            }
        };
        this.onScreenShareUpdate = (participant) => {
            if (participant.screenShareEnabled) {
                this.addScreenShare(participant);
            }
            else {
                this.removeScreenShare(participant);
            }
        };
        this.onSelfScreenShareUpdate = ({ screenShareEnabled, }) => {
            if (screenShareEnabled) {
                this.addScreenShare(this.meeting.self);
            }
            else {
                this.removeScreenShare(this.meeting.self);
            }
        };
        this.toggleTileListener = ({ hidden }) => {
            this.hidden = hidden;
            this.updateActiveParticipants();
        };
        this.onPluginStateUpdate = (plugin, { active }) => {
            if (active) {
                if (!this.plugins.some((p) => p.id === plugin.id)) {
                    this.plugins = [...this.plugins, plugin];
                }
            }
            else {
                this.plugins = this.plugins.filter((p) => p.id !== plugin.id);
            }
        };
        this.onParticipantPinned = () => {
            this.updateActiveParticipants();
        };
        this.onParticipantUnpinned = () => {
            this.updateActiveParticipants();
        };
        this.updateRoomStateListener = () => {
            this.roomState = this.meeting.self.roomState;
        };
    }
    connectedCallback() {
        this.meetingChanged(this.meeting);
    }
    disconnectedCallback() {
        this.disconnectMeeting(this.meeting);
    }
    disconnectMeeting(meeting) {
        var _a;
        if (!meeting)
            return;
        this.participants = [];
        this.plugins = [];
        const { self, participants, plugins } = meeting;
        self.removeListener('pinned', this.onParticipantPinned);
        self.removeListener('unpinned', this.onParticipantUnpinned);
        self.removeListener('roomLeft', this.updateRoomStateListener);
        self.removeListener('roomJoined', this.updateRoomStateListener);
        self.removeListener('screenShareUpdate', this.onSelfScreenShareUpdate);
        self.removeListener('toggleTile', this.toggleTileListener);
        plugins === null || plugins === void 0 ? void 0 : plugins.all.removeListener('stateUpdate', this.onPluginStateUpdate);
        (_a = meeting.stage) === null || _a === void 0 ? void 0 : _a.removeListener('stageStatusUpdate', this.stageStatusListener);
        participants.removeListener('viewModeChanged', this.onViewModeChanged);
        participants.active.removeListener('participantLeft', this.onParticipantLeft);
        participants.active.removeListener('participantJoined', this.onParticipantJoined);
        participants.pinned.removeListener('participantJoined', this.onParticipantPinned);
        participants.pinned.removeListener('participantLeft', this.onParticipantUnpinned);
        participants.joined.removeListener('screenShareUpdate', this.onScreenShareUpdate);
        participants.joined.removeListener('stageStatusUpdate', this.peerStageStatusListener);
    }
    meetingChanged(meeting, oldMeeting) {
        var _a, _b, _c, _d;
        if (oldMeeting !== null)
            this.disconnectMeeting(oldMeeting);
        if (meeting != null) {
            const { self, participants, plugins, stage } = meeting;
            // Check if PiP is supported and enabled
            this.pipSupported =
                ((_a = this.meeting.participants.pip) === null || _a === void 0 ? void 0 : _a.isSupported()) && ((_b = meeting.self.config) === null || _b === void 0 ? void 0 : _b.pipMode);
            if (this.pipSupported) {
                this.meeting.participants.pip.init();
            }
            // Initialize values
            const { permissions } = self;
            this.roomState = self.roomState;
            const isOffStage = this.meeting.stage.status !== 'ON_STAGE';
            const isRecorder = permissions === null || permissions === void 0 ? void 0 : permissions.isRecorder;
            this.hideSelf = isOffStage || isRecorder || permissions.hiddenParticipant;
            this.participants = this.filterParticipants([
                ...participants.active.toArray(),
                ...(!self.isPinned && !this.hideSelf ? [self] : []),
            ]);
            this.pinnedParticipants = [
                ...participants.pinned.toArray(),
                ...(self.isPinned && !this.hideSelf ? [self] : []),
            ];
            this.screenShareParticipants = participants.joined
                .toArray()
                .filter((participant) => participant.screenShareEnabled);
            this.plugins = (plugins === null || plugins === void 0 ? void 0 : plugins.active.toArray()) || [];
            if (permissions === null || permissions === void 0 ? void 0 : permissions.stageEnabled) {
                this.canCurrentPeerHost =
                    permissions.acceptStageRequests ||
                        permissions.canProduceAudio === 'ALLOWED' ||
                        permissions.canProduceVideo === 'ALLOWED' ||
                        permissions.canProduceScreenshare === 'ALLOWED';
                this.updateStage();
            }
            this.hidden = meeting.self.hidden;
            // Add all listeners
            self.addListener('roomLeft', this.updateRoomStateListener);
            self.addListener('roomJoined', this.updateRoomStateListener);
            self.addListener('screenShareUpdate', this.onSelfScreenShareUpdate);
            self.addListener('pinned', this.onParticipantPinned);
            self.addListener('unpinned', this.onParticipantUnpinned);
            self.addListener('toggleTile', this.toggleTileListener);
            stage === null || stage === void 0 ? void 0 : stage.addListener('stageStatusUpdate', this.stageStatusListener);
            plugins === null || plugins === void 0 ? void 0 : plugins.all.addListener('stateUpdate', this.onPluginStateUpdate);
            participants.addListener('viewModeChanged', this.onViewModeChanged);
            participants.active.addListener('participantLeft', this.onParticipantLeft);
            (_c = participants === null || participants === void 0 ? void 0 : participants.joined) === null || _c === void 0 ? void 0 : _c.on('stageStatusUpdate', this.peerStageStatusListener);
            participants.joined.addListener('screenShareUpdate', this.onScreenShareUpdate);
            participants.active.addListener('participantJoined', this.onParticipantJoined);
            participants.pinned.addListener('participantJoined', this.onParticipantPinned);
            participants.pinned.addListener('participantLeft', this.onParticipantUnpinned);
            if ((_d = meeting.stage) === null || _d === void 0 ? void 0 : _d.status) {
                this.stageStatusListener();
            }
        }
    }
    overridesChanged(_overrides) {
        this.updateActiveParticipants();
    }
    screenShareParticipantsChanged(participants) {
        const activeScreenShare = participants.length > 0;
        if (!!this.states.activeScreenShare === activeScreenShare)
            return;
        this.stateUpdate.emit({ activeScreenShare });
        this.states.activeScreenShare = activeScreenShare;
    }
    pluginsChanged(plugins) {
        const activePlugin = plugins.length > 0;
        if (!!this.states.activePlugin === activePlugin)
            return;
        this.stateUpdate.emit({ activePlugin });
        this.states.activePlugin = activePlugin;
    }
    pinnedParticipantsChanged(participants) {
        const activeSpotlight = participants.length > 0;
        if (!!this.states.activeSpotlight === activeSpotlight)
            return;
        this.stateUpdate.emit({ activeSpotlight });
        this.states.activeSpotlight = activeSpotlight;
    }
    updateActiveParticipants() {
        var _a;
        const { self, participants, stage } = this.meeting;
        // NOTE(ishita1805): checking hiddenParticipant for v2 meetings.
        this.hideSelf =
            this.hidden ||
                stage.status !== 'ON_STAGE' ||
                ((_a = self.permissions) === null || _a === void 0 ? void 0 : _a.isRecorder) ||
                self.permissions.hiddenParticipant;
        this.participants = this.filterParticipants([
            ...participants.active.toArray().filter((p) => p.id !== self.id),
            ...(participants.viewMode === 'ACTIVE_GRID' && !self.isPinned && !this.hideSelf
                ? [self]
                : []),
        ]);
        this.pinnedParticipants = [
            ...participants.pinned.toArray().filter((p) => p.id !== self.id),
            ...(self.isPinned && !this.hideSelf ? [self] : []),
        ];
        this.screenShareParticipants = participants.joined
            .toArray()
            .filter((participant) => participant.screenShareEnabled);
        if (self.screenShareEnabled) {
            this.screenShareParticipants = this.screenShareParticipants.concat([self]);
        }
        this.updateStage();
    }
    updateStage() {
        var _a;
        const { self } = this.meeting;
        if (!this.meeting)
            return;
        if ((_a = self === null || self === void 0 ? void 0 : self.permissions) === null || _a === void 0 ? void 0 : _a.stageEnabled) {
            this.emptyStage = this.participants.length === 0 && this.pinnedParticipants.length === 0;
        }
        else {
            this.emptyStage = false;
        }
    }
    addScreenShare(participant) {
        if (!this.screenShareParticipants.some((p) => p.id === participant.id)) {
            this.screenShareParticipants = [...this.screenShareParticipants, participant];
        }
    }
    removeScreenShare(participant) {
        this.screenShareParticipants = this.screenShareParticipants.filter((p) => p.id !== participant.id);
    }
    removePinned(participant) {
        this.pinnedParticipants = this.pinnedParticipants.filter((p) => p.id !== participant.id);
    }
    render() {
        var _a, _b, _c, _d;
        const defaults = {
            meeting: this.meeting,
            size: this.size,
            states: this.states,
            config: this.config,
            iconPack: this.iconPack,
            t: this.t,
        };
        if (this.invalidRoomStates.includes(this.roomState)) {
            return (h(Host, null, h("div", { class: "offline-grid" }, h("rtk-icon", { icon: this.iconPack.join_stage, size: "xl" }), h("h3", null, this.t('disconnected')), h("p", null, this.t('disconnected.description')))));
        }
        if (this.roomState === 'disconnected') {
            /**
             * NOTE(ravindra-cloudflare): When disconnected but WebRTC transports are
             * still healthy, skip the offline screen — media is still flowing.
             * The grid stays visible for seamless reconnection.
             */
            const mediaState = (_b = (_a = this.meeting) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.mediaState;
            const transportsHealthy = ((_c = mediaState === null || mediaState === void 0 ? void 0 : mediaState.send) === null || _c === void 0 ? void 0 : _c.state) === 'connected' && ((_d = mediaState === null || mediaState === void 0 ? void 0 : mediaState.recv) === null || _d === void 0 ? void 0 : _d.state) === 'connected';
            if (!transportsHealthy) {
                return (h(Host, null, h("div", { class: "offline-grid" }, h("rtk-icon", { icon: this.iconPack.disconnected, size: "xl" }), h("h3", null, this.t('offline')), h("p", null, this.t('offline.description')))));
            }
        }
        if (this.roomState === 'failed') {
            return (h(Host, null, h("div", { class: "offline-grid" }, h("rtk-icon", { icon: this.iconPack.disconnected, size: "xl" }), h("h3", null, this.t('failed')), h("p", null, this.t('failed.description')))));
        }
        if (this.showLiveStreamPlayer) {
            return (h(Host, null, h("rtk-livestream-player", { meeting: this.meeting, size: this.size }), h("rtk-livestream-indicator", { meeting: this.meeting, size: "sm", t: this.t }), h("rtk-viewer-count", { meeting: this.meeting, variant: "embedded", t: this.t })));
        }
        if (this.emptyStage) {
            return (h(Host, null, h("div", { class: "webinar-stage" }, h("div", { class: "center" }, this.canCurrentPeerHost && (h("div", { class: "ctr", part: "container" }, h("p", { class: "message", part: "message" }, this.t('stage.empty_host')), h("span", { class: "description", part: "description" }, this.t('stage.empty_host_summary')))), !this.canCurrentPeerHost && (h("div", { class: "ctr", part: "container" }, h("p", { class: "message", part: "message" }, this.t('stage.empty_viewer'))))))));
        }
        return (h(Host, null, h(Render, { element: "rtk-grid", defaults: defaults, childProps: {
                participants: this.participants,
                screenShareParticipants: this.screenShareParticipants,
                plugins: this.plugins,
                pinnedParticipants: this.pinnedParticipants,
                aspectRatio: this.aspectRatio,
                gap: this.gap,
                layout: this.layout,
                gridSize: this.gridSize,
            }, onlyChildren: true }), h("rtk-livestream-indicator", { meeting: this.meeting, size: "sm", t: this.t }), h("rtk-viewer-count", { meeting: this.meeting, variant: "embedded", t: this.t })));
    }
    static get is() { return "rtk-grid"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["rtk-grid.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["rtk-grid.css"]
        };
    }
    static get properties() {
        return {
            "layout": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "GridLayout",
                    "resolved": "\"column\" | \"row\"",
                    "references": {
                        "GridLayout": {
                            "location": "local",
                            "path": "/home/runner/work/realtimekit-ui/realtimekit-ui/packages/core/src/components/rtk-grid/rtk-grid.tsx",
                            "id": "src/components/rtk-grid/rtk-grid.tsx::GridLayout"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Grid Layout"
                },
                "getter": false,
                "setter": false,
                "attribute": "layout",
                "reflect": true,
                "defaultValue": "'row'"
            },
            "aspectRatio": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The aspect ratio of each participant"
                },
                "getter": false,
                "setter": false,
                "attribute": "aspect-ratio",
                "reflect": true,
                "defaultValue": "'16:9'"
            },
            "meeting": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "Meeting",
                    "resolved": "Client",
                    "references": {
                        "Meeting": {
                            "location": "import",
                            "path": "../../types/rtk-client",
                            "id": "src/types/rtk-client.ts::Meeting"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Meeting object"
                },
                "getter": false,
                "setter": false
            },
            "gap": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Gap between participants"
                },
                "getter": false,
                "setter": false,
                "attribute": "gap",
                "reflect": true,
                "defaultValue": "8"
            },
            "size": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "Size",
                    "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
                    "references": {
                        "Size": {
                            "location": "import",
                            "path": "../../types/props",
                            "id": "src/types/props.ts::Size"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Size"
                },
                "getter": false,
                "setter": false,
                "attribute": "size",
                "reflect": true
            },
            "states": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "States",
                    "resolved": "States",
                    "references": {
                        "States": {
                            "location": "import",
                            "path": "../../types/props",
                            "id": "src/types/props.ts::States"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "States"
                },
                "getter": false,
                "setter": false
            },
            "config": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "UIConfig",
                    "resolved": "UIConfig",
                    "references": {
                        "UIConfig": {
                            "location": "import",
                            "path": "../../types/ui-config",
                            "id": "src/types/ui-config/index.ts::UIConfig"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Config object"
                },
                "getter": false,
                "setter": false,
                "defaultValue": "createDefaultConfig()"
            },
            "iconPack": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "IconPack",
                    "resolved": "{ people: string; people_checked: string; chat: string; poll: string; participants: string; rocket: string; call_end: string; share: string; mic_on: string; mic_off: string; video_on: string; video_off: string; share_screen_start: string; share_screen_stop: string; share_screen_person: string; clock: string; dismiss: string; send: string; search: string; more_vertical: string; chevron_down: string; chevron_up: string; chevron_left: string; chevron_right: string; settings: string; wifi: string; speaker: string; speaker_off: string; download: string; full_screen_maximize: string; full_screen_minimize: string; copy: string; attach: string; image: string; emoji_multiple: string; image_off: string; disconnected: string; wand: string; recording: string; subtract: string; stop_recording: string; warning: string; pin: string; pin_off: string; spinner: string; breakout_rooms: string; add: string; shuffle: string; edit: string; delete: string; back: string; save: string; web: string; checkmark: string; spotlight: string; join_stage: string; leave_stage: string; pip_off: string; pip_on: string; signal_1: string; signal_2: string; signal_3: string; signal_4: string; signal_5: string; start_livestream: string; stop_livestream: string; viewers: string; debug: string; info: string; devices: string; horizontal_dots: string; ai_sparkle: string; meeting_ai: string; captionsOn: string; captionsOff: string; play: string; pause: string; fastForward: string; minimize: string; maximize: string; }",
                    "references": {
                        "IconPack": {
                            "location": "import",
                            "path": "../../lib/icons",
                            "id": "src/lib/icons/index.ts::IconPack"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Icon pack"
                },
                "getter": false,
                "setter": false,
                "defaultValue": "defaultIconPack"
            },
            "t": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "RtkI18n",
                    "resolved": "(key: \"pin\" | \"unpin\" | \"kick\" | \"ended\" | \"disconnected\" | \"failed\" | \"type\" | \"end\" | \"joined\" | \"pinned\" | \"join\" | \"participants\" | \"logo\" | \"audio\" | \"search\" | \"video\" | \"image\" | \"chat\" | \"polls\" | \"leave\" | \"close\" | \"plugins\" | \"screenshare\" | \"(you)\" | (string & {}) | \"about_call\" | \"screen\" | \"camera\" | \"dismiss\" | \"page\" | \"more\" | \"page.prev\" | \"page.next\" | \"layout\" | \"layout.auto\" | \"settings\" | \"file\" | \"connection\" | \"leave_confirmation\" | \"cancel\" | \"yes\" | \"you\" | \"everyone\" | \"to\" | \"mute\" | \"accept\" | \"pip_on\" | \"pip_off\" | \"viewers\" | \"create\" | \"ask\" | \"activate\" | \"requests\" | \"mic_off\" | \"disable_mic\" | \"mic_on\" | \"enable_mic\" | \"test\" | \"minimize\" | \"maximize\" | \"mute_all\" | \"mute_all.description\" | \"mute_all.header\" | \"mute_all.allow_unmute\" | \"video_off\" | \"disable_video\" | \"video_on\" | \"enable_video\" | \"offline\" | \"offline.description\" | \"failed.description\" | \"disconnected.description\" | \"participants.errors.empty_results\" | \"participants.empty_list\" | \"participants.no_pending_requests\" | \"participants.turn_off_video\" | \"polls.by\" | \"polls.question\" | \"polls.question.placeholder\" | \"polls.answers\" | \"polls.option\" | \"polls.option.placeholder\" | \"polls.results.anon\" | \"polls.results.hide\" | \"polls.create\" | \"polls.cancel\" | \"polls.empty\" | \"polls.errors.question_required\" | \"polls.errors.empty_option\" | \"screenshare.min_preview\" | \"screenshare.max_preview\" | \"screenshare.shared\" | \"screenshare.start\" | \"screenshare.stop\" | \"screenshare.error.unknown\" | \"screenshare.error.max_count\" | \"plugins.empty\" | \"perm_denied\" | \"perm_denied.audio\" | \"perm_denied.video\" | \"perm_denied.screenshare\" | \"perm_denied.audio.chrome.message\" | \"perm_denied.video.chrome.message\" | \"perm_denied.screenshare.chrome.message\" | \"perm_denied.audio.safari.message\" | \"perm_denied.video.safari.message\" | \"perm_denied.screenshare.safari.message\" | \"perm_denied.audio.edge.message\" | \"perm_denied.video.edge.message\" | \"perm_denied.screenshare.edge.message\" | \"perm_denied.audio.microsoft edge.message\" | \"perm_denied.video.microsoft edge.message\" | \"perm_denied.screenshare.microsoft edge.message\" | \"perm_denied.audio.firefox.message\" | \"perm_denied.video.firefox.message\" | \"perm_denied.screenshare.firefox.message\" | \"perm_denied.audio.others.message\" | \"perm_denied.video.others.message\" | \"perm_denied.screenshare.others.message\" | \"perm_sys_denied\" | \"perm_sys_denied.audio\" | \"perm_sys_denied.video\" | \"perm_sys_denied.screenshare\" | \"perm_sys_denied.audio.macos.message\" | \"perm_sys_denied.video.macos.message\" | \"perm_sys_denied.screenshare.macos.message\" | \"perm_sys_denied.audio.ios.message\" | \"perm_sys_denied.video.ios.message\" | \"perm_sys_denied.screenshare.ios.message\" | \"perm_sys_denied.audio.windows.message\" | \"perm_sys_denied.video.windows.message\" | \"perm_sys_denied.screenshare.windows.message\" | \"perm_sys_denied.audio.android.message\" | \"perm_sys_denied.video.android.message\" | \"perm_sys_denied.screenshare.android.message\" | \"perm_sys_denied.audio.others.message\" | \"perm_sys_denied.video.others.message\" | \"perm_sys_denied.screenshare.others.message\" | \"perm_could_not_start\" | \"perm_could_not_start.audio\" | \"perm_could_not_start.video\" | \"perm_could_not_start.screenshare\" | \"perm_could_not_start.audio.message\" | \"perm_could_not_start.video.message\" | \"perm_could_not_start.screenshare.message\" | \"full_screen\" | \"full_screen.exit\" | \"waitlist.header_title\" | \"waitlist.body_text\" | \"waitlist.deny_request\" | \"waitlist.accept_request\" | \"waitlist.accept_all\" | \"stage_request.header_title\" | \"stage_request.deny_request\" | \"stage_request.accept_request\" | \"stage_request.accept_all\" | \"stage_request.deny_all\" | \"stage_request.approval_pending\" | \"stage_request.denied\" | \"stage_request.request\" | \"stage_request.requested\" | \"stage_request.cancel_request\" | \"stage_request.leave_stage\" | \"stage_request.request_tip\" | \"stage_request.leave_tip\" | \"stage_request.pending_tip\" | \"stage_request.denied_tip\" | \"stage.empty_host\" | \"stage.empty_host_summary\" | \"stage.empty_viewer\" | \"stage.remove_from_stage\" | \"stage.invited_notification\" | \"stage.add_to_stage\" | \"stage.join_title\" | \"stage.join_summary\" | \"stage.join_cancel\" | \"stage.join_confirm\" | \"setup_screen.join_in_as\" | \"setup_screen.your_name\" | \"stage.reconnecting\" | \"recording.label\" | \"recording.indicator\" | \"recording.started\" | \"recording.stopped\" | \"recording.paused\" | \"recording.error.start\" | \"recording.error.stop\" | \"recording.error.resume\" | \"recording.start\" | \"recording.stop\" | \"recording.resume\" | \"recording.starting\" | \"recording.stopping\" | \"recording.loading\" | \"recording.idle\" | \"audio_playback\" | \"audio_playback.title\" | \"audio_playback.description\" | \"breakout_rooms\" | \"breakout_rooms.room_config_header\" | \"breakout_rooms.join_breakout_header\" | \"breakout_rooms.empty\" | \"breakout_rooms.delete\" | \"breakout_rooms.switch\" | \"breakout_rooms.main_room\" | \"breakout_rooms.shuffle_participants\" | \"breakout_rooms.deselect\" | \"breakout_rooms.selected\" | \"breakout_rooms.num_of_rooms\" | \"breakout_rooms.approx\" | \"breakout_rooms.participants_per_room\" | \"breakout_rooms.division_text\" | \"breakout_rooms.start_breakout\" | \"breakout_rooms.close_breakout\" | \"breakout_rooms.update_breakout\" | \"breakout_rooms.discard_changes\" | \"breakout_rooms.room\" | \"breakout_rooms.rooms\" | \"breakout_rooms.room_name\" | \"breakout_rooms.edit_room_name\" | \"breakout_rooms.save_room_name\" | \"breakout_rooms.add_room\" | \"breakout_rooms.add_room_brief\" | \"breakout_rooms.select_all\" | \"breakout_rooms.unassign_all\" | \"breakout_rooms.assign\" | \"breakout_rooms.assign_participants\" | \"breakout_rooms.none_assigned\" | \"breakout_rooms.drag_drop_participants\" | \"breakout_rooms.click_drop_participants\" | \"breakout_rooms.status.assign_multiple\" | \"breakout_rooms.status.select_room\" | \"breakout_rooms.ephemeral_status.participants_assigned\" | \"breakout_rooms.ephemeral_status.participants_assigned_randomly\" | \"breakout_rooms.ephemeral_status.changes_discarded\" | \"breakout_rooms.confirm_modal.start_breakout.header\" | \"breakout_rooms.confirm_modal.start_breakout.content\" | \"breakout_rooms.confirm_modal.start_breakout.cancelText\" | \"breakout_rooms.confirm_modal.start_breakout.ctaText\" | \"breakout_rooms.confirm_modal.close_breakout.header\" | \"breakout_rooms.confirm_modal.close_breakout.content\" | \"breakout_rooms.confirm_modal.close_breakout.ctaText\" | \"breakout_rooms.move_reason.started_msg\" | \"breakout_rooms.move_reason.started_desc\" | \"breakout_rooms.move_reason.closed_msg\" | \"breakout_rooms.move_reason.closed_desc\" | \"breakout_rooms.move_reason.switch_room\" | \"breakout_rooms.move_reason.switch_main_room\" | \"breakout_rooms.all_assigned\" | \"breakout_rooms.empty_main_room\" | \"breakout_rooms.leave_confirmation\" | \"breakout_rooms.leave_confirmation.main_room_btn\" | \"ai\" | \"ai.meeting_ai\" | \"ai.home\" | \"ai.transcriptions\" | \"ai.personal\" | \"ai.caption_view\" | \"ai.chat.tooltip\" | \"ai.chat.summarize\" | \"ai.chat.agenda\" | \"ai.transcriptions.search_placeholder\" | \"ai.transcriptions.no_transcripts_found\" | \"ai.transcriptions.no_transcripts_yet\" | \"search.could_not_find\" | \"search.empty\" | \"end.all\" | \"ended.rejected\" | \"ended.left\" | \"ended.kicked\" | \"ended.disconnected\" | \"ended.network\" | \"ended.unauthorized\" | \"network\" | \"network.reconnecting\" | \"network.delay_extended\" | \"network.disconnected\" | \"network.leaving\" | \"network.restored\" | \"network.delay\" | \"network.lost\" | \"network.lost_extended\" | \"network.troubleshoot\" | \"join.network_error\" | \"join.media_error\" | \"join.media_firewall_error\" | \"join.default_error\" | \"join.error_code\" | \"livestream\" | \"livestream.indicator\" | \"livestream.skip\" | \"livestream.idle\" | \"livestream.starting\" | \"livestream.stopping\" | \"livestream.waiting_on_manual_ingestion\" | \"livestream.error.not_supported\" | \"livestream.error.not_found\" | \"livestream.error.unknown\" | \"livestream.error.sync\" | \"livestream.error.start\" | \"livestream.error.stop\" | \"livestream.go_live\" | \"livestream.end_live\" | \"livestream.error\" | \"cta.help\" | \"cta.continue\" | \"cta.reload\" | \"cta.confirmation\" | \"cta.system_settings\" | \"remote_access.empty\" | \"remote_access.requests\" | \"remote_access.allow\" | \"remote_access.grant\" | \"remote_access.indicator\" | \"chat.new\" | \"chat.max_limit_warning\" | \"chat.rate_limit_error\" | \"chat.member_name\" | \"chat.add_members\" | \"chat.delete_msg\" | \"chat.edit_msg\" | \"chat.send_msg\" | \"chat.send_attachment\" | \"chat.send_img\" | \"chat.send_file\" | \"chat.send_emoji\" | \"chat.update_msg\" | \"chat.img.loading\" | \"chat.error.img_not_found\" | \"chat.error.empty_results\" | \"chat.img.shared_by\" | \"chat.reply\" | \"chat.message_placeholder\" | \"chat.click_to_send\" | \"chat.search_msgs\" | \"chat.search_conversations\" | \"chat.start_conversation\" | \"chat.empty_search\" | \"chat.empty_chat\" | \"chat.cancel_upload\" | \"chat.view_chats\" | \"chat.everyone\" | \"chat.pinned_msgs\" | \"chat.toggle_pinned_msgs\" | \"date.today\" | \"date.yesterday\" | \"date.sunday\" | \"date.monday\" | \"date.tuesday\" | \"date.wednesday\" | \"date.thursday\" | \"date.friday\" | \"date.saturday\" | \"list.empty\" | \"grid.listening\" | \"transcript.off\" | \"transcript.on\" | \"settings.notification_sound\" | \"settings.microphone_input\" | \"settings.speaker_output\" | \"settings.mirror_video\" | \"settings.camera_off\" | \"dialog.close\" | \"notifications.joined\" | \"notifications.left\" | \"notifications.requesting_to_join_meeting\" | \"notifications.requested_to_join_stage\" | \"notifications.joined_stage\" | \"notifications.request_to_join_accepted\" | \"notifications.request_to_join_rejected\" | \"notifications.accept\" | \"notifications.new_poll_created_by\" | \"notifications.connected_to\" | \"notifications.plugin_switched_to\" | \"notifications.remote_control_requested\" | \"notifications.remote_control_request_sent\" | \"notifications.remote_control_request_accepted\" | \"notifications.remote_control_granted\" | \"notifications.remote_control_terminated\" | \"debugger.troubleshooting.label\" | \"debugger.quality.good\" | \"debugger.quality.average\" | \"debugger.quality.poor\" | \"debugger.stats.bitrate.label\" | \"debugger.stats.bitrate.description\" | \"debugger.stats.packet_loss.label\" | \"debugger.stats.packet_loss.description\" | \"debugger.stats.jitter.label\" | \"debugger.stats.jitter.description\" | \"debugger.stats.cpu_limitations.label\" | \"debugger.stats.cpu_limitations.description\" | \"debugger.stats.bandwidth_limitations.label\" | \"debugger.stats.bandwidth_limitations.description\" | \"debugger.audio.label\" | \"debugger.audio.troubleshooting.label\" | \"debugger.audio.messages.generating_report\" | \"debugger.audio.messages.enable_media\" | \"debugger.audio.sections.network_media\" | \"debugger.video.label\" | \"debugger.video.troubleshooting.label\" | \"debugger.video.messages.generating_report\" | \"debugger.video.messages.enable_media\" | \"debugger.video.sections.network_media\" | \"debugger.screenshare.label\" | \"debugger.screenshare.troubleshooting.label\" | \"debugger.screenshare.sections.network_media\" | \"debugger.screenshare.messages.generating_report\" | \"debugger.screenshare.messages.enable_media\" | \"debugger.system.label\" | \"debugger.system.troubleshooting.label\" | \"debugger.system.sections.battery\" | \"debugger.system.battery.level.label\" | \"debugger.system.battery.level.description\" | \"debugger.system.battery.charging.label\" | \"debugger.system.battery.charging.description\" | \"debugger.system.battery.charging.is_charging\" | \"debugger.system.battery.charging.is_not_charging\") => string",
                    "references": {
                        "RtkI18n": {
                            "location": "import",
                            "path": "../../lib/lang",
                            "id": "src/lib/lang/index.ts::RtkI18n"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Language"
                },
                "getter": false,
                "setter": false,
                "defaultValue": "useLanguage()"
            },
            "gridSize": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "GridSize",
                    "resolved": "GridSize",
                    "references": {
                        "GridSize": {
                            "location": "local",
                            "path": "/home/runner/work/realtimekit-ui/realtimekit-ui/packages/core/src/components/rtk-grid/rtk-grid.tsx",
                            "id": "src/components/rtk-grid/rtk-grid.tsx::GridSize"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Grid size"
                },
                "getter": false,
                "setter": false,
                "defaultValue": "defaultGridSize"
            },
            "overrides": {
                "type": "any",
                "mutable": false,
                "complexType": {
                    "original": "any",
                    "resolved": "any",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "deprecated",
                            "text": undefined
                        }],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "attribute": "overrides",
                "reflect": false,
                "defaultValue": "{}"
            }
        };
    }
    static get states() {
        return {
            "participants": {},
            "pinnedParticipants": {},
            "screenShareParticipants": {},
            "plugins": {},
            "emptyStage": {},
            "showLiveStreamPlayer": {},
            "canCurrentPeerHost": {},
            "pipSupported": {},
            "pipEnabled": {},
            "hidden": {},
            "roomState": {}
        };
    }
    static get events() {
        return [{
                "method": "stateUpdate",
                "name": "rtkStateUpdate",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emits updated state data"
                },
                "complexType": {
                    "original": "States",
                    "resolved": "States",
                    "references": {
                        "States": {
                            "location": "import",
                            "path": "../../types/props",
                            "id": "src/types/props.ts::States"
                        }
                    }
                }
            }];
    }
    static get watchers() {
        return [{
                "propName": "meeting",
                "methodName": "meetingChanged"
            }, {
                "propName": "overrides",
                "methodName": "overridesChanged"
            }, {
                "propName": "screenShareParticipants",
                "methodName": "screenShareParticipantsChanged"
            }, {
                "propName": "plugins",
                "methodName": "pluginsChanged"
            }, {
                "propName": "pinnedParticipants",
                "methodName": "pinnedParticipantsChanged"
            }];
    }
}
__decorate([
    SyncWithStore()
], RtkGrid.prototype, "meeting", void 0);
__decorate([
    SyncWithStore()
], RtkGrid.prototype, "states", void 0);
__decorate([
    SyncWithStore()
], RtkGrid.prototype, "config", void 0);
__decorate([
    SyncWithStore()
], RtkGrid.prototype, "iconPack", void 0);
__decorate([
    SyncWithStore()
], RtkGrid.prototype, "t", void 0);
