import{r as t,d as i,h as s,a as e}from"./p-a599f720.js";import{e as n,i as o}from"./p-9811c98c.js";import{S as a}from"./p-af705ed1.js";var r=function(t,i,s,e){var n,o=arguments.length,a=o<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,s,e);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(o<3?n(a):o>3?n(i,s,a):n(i,s))||a);return o>3&&a&&Object.defineProperty(i,s,a),a};const l=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=n,this.t=o(),this.canDisable=!1,this.permissionsUpdateListener=()=>{var t;this.canDisable=!!(null===(t=this.meeting)||void 0===t?void 0:t.self.permissions.canDisableParticipantAudio)},this.onMuteAll=()=>{this.stateUpdate.emit({activeMuteAllConfirmation:!0})}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t,i,s;null===(s=null===(i=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===i?void 0:i.permissions)||void 0===s||s.removeListener("permissionsUpdate",this.permissionsUpdateListener)}meetingChanged(t){t&&(this.canDisable=!!(null==t?void 0:t.self.permissions.canDisableParticipantAudio),t.self.permissions.addListener("permissionsUpdate",this.permissionsUpdateListener))}render(){if(!this.meeting)return null;if(!this.canDisable)return null;const t=this.t("mute_all");return s(e,{title:t},s("rtk-tooltip",{kind:"block",label:t,part:"tooltip"},s("rtk-controlbar-button",{part:"controlbar-button",icon:this.iconPack.speaker_off,label:t,size:this.size,iconPack:this.iconPack,variant:this.variant,onClick:this.onMuteAll})))}static get watchers(){return{meeting:["meetingChanged"]}}};r([a()],l.prototype,"meeting",void 0),r([a()],l.prototype,"iconPack",void 0),r([a()],l.prototype,"t",void 0),l.style=":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}";export{l as rtk_mute_all_button}