import { p as proxyCustomElement, H, e as createEvent, h, c as Host } from './p-ae373651.js';
import { e as defaultIconPack, i as useLanguage } from './p-5b3a7f00.js';
import { S as SyncWithStore } from './p-070aa695.js';
import { d as defineCustomElement$1 } from './p-85587a5c.js';

const rtkMuteAllConfirmationCss = ":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)}:host{display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leave-modal{position:relative;display:flex;flex-direction:column;border-radius:var(--rtk-border-radius-md, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));padding:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.leave-modal .header h2{margin:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-3, 12px)}.leave-modal .content{font-size:14px}.leave-message p{margin-top:var(--rtk-space-3, 12px);margin-bottom:var(--rtk-space-3, 12px)}.leave-meeting{display:flex;flex-direction:row;justify-content:space-between;gap:var(--rtk-space-2, 8px)}.leave-meeting rtk-button{flex:1 1 0%}.end-meeting{margin-top:var(--rtk-space-2, 8px)}.message{margin-bottom:var(--rtk-space-4, 16px)}label{display:flex;align-items:center}input[type='checkbox']{margin-right:var(--rtk-space-2, 8px);accent-color:rgb(var(--rtk-colors-brand-500, 33 96 253))}";
const RtkMuteAllConfirmationStyle0 = rtkMuteAllConfirmationCss;

var __decorate = (undefined && undefined.__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;
};
const RtkMuteAllConfirmation = /*@__PURE__*/ proxyCustomElement(class RtkMuteAllConfirmation extends H {
    constructor() {
        super();
        this.__registerHost();
        this.__attachShadow();
        this.stateUpdate = createEvent(this, "rtkStateUpdate", 7);
        /** Icon pack */
        this.iconPack = defaultIconPack;
        /** Language */
        this.t = useLanguage();
        this.allowUnmute = true;
        this.onClose = () => {
            this.stateUpdate.emit({ activeMuteAllConfirmation: false });
        };
        this.onMuteAll = () => {
            var _a;
            (_a = this.meeting) === null || _a === void 0 ? void 0 : _a.participants.disableAllAudio(this.allowUnmute);
            this.onClose();
        };
    }
    render() {
        return (h(Host, { key: 'e47a9e4e3c89bc1badc85cb76edf522eb8514c58' }, h("div", { key: 'bafee985eb5f1e01d87e509018917473d3723190', class: "leave-modal" }, h("div", { key: 'f21285fa0b0239c9f64a9390599528dfe50a355b', class: "header" }, h("h2", { key: '5201c1d79f1d64e513ef8036b16fd03e27280baf', class: "title" }, this.t('mute_all.header'))), h("p", { key: '5c5af2814146578f3b3c3ae434f45da414b97f15', class: "message" }, this.t('mute_all.description')), h("div", { key: 'cde4bbb5ee289ad5b65a9fb13d0fb5bc5f309a0b', class: "content" }, h("div", { key: '1f034975b9099d8474c3442da08fc79660b74a70', class: "leave-meeting" }, h("rtk-button", { key: '16614bc8443e1e249d0eda46d66227eedf036856', variant: "secondary", title: this.t('close'), onClick: this.onClose }, this.t('cancel')), h("rtk-button", { key: '6f67cf660adcc1d849f5cd090003a5c7ad26947d', variant: "danger", title: this.t('mute_all'), onClick: this.onMuteAll }, this.t('mute_all')))))));
    }
    static get style() { return RtkMuteAllConfirmationStyle0; }
}, [1, "rtk-mute-all-confirmation", {
        "meeting": [16],
        "states": [16],
        "iconPack": [16],
        "t": [16],
        "allowUnmute": [32]
    }]);
__decorate([
    SyncWithStore()
], RtkMuteAllConfirmation.prototype, "meeting", void 0);
__decorate([
    SyncWithStore()
], RtkMuteAllConfirmation.prototype, "states", void 0);
__decorate([
    SyncWithStore()
], RtkMuteAllConfirmation.prototype, "iconPack", void 0);
__decorate([
    SyncWithStore()
], RtkMuteAllConfirmation.prototype, "t", void 0);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["rtk-mute-all-confirmation", "rtk-button"];
    components.forEach(tagName => { switch (tagName) {
        case "rtk-mute-all-confirmation":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, RtkMuteAllConfirmation);
            }
            break;
        case "rtk-button":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}
defineCustomElement();

export { RtkMuteAllConfirmation as R, defineCustomElement as d };
