import{r as t,d as i,h as s,a as e}from"./p-a599f720.js";import{e as a,i as n}from"./p-9811c98c.js";import{i as r,r as o,e as c,a as h}from"./p-3974d97a.js";import{S as l}from"./p-af705ed1.js";var f=function(t,i,s,e){var a,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(n<3?a(r):n>3?a(i,s,r):a(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const d=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=n(),this.fullScreenActive=!1,this.isFullScreenSupported=!0,this.onFullScreenchange=()=>{this.fullScreenActive=r()},this.toggleFullScreen=()=>{let t=this.targetElement||document.querySelector("rtk-meeting");t&&(this.fullScreenActive?(c(),this.fullScreenActive=!1):(o(t),this.fullScreenActive=!0),this.stateUpdate.emit({activeMoreMenu:!1}))}}connectedCallback(){this.isFullScreenSupported=h(),this.onFullScreenchange(),window.addEventListener("webkitfullscreenchange",this.onFullScreenchange),window.addEventListener("fullscreenchange",this.onFullScreenchange)}disconnectedCallback(){window.removeEventListener("webkitfullscreenchange",this.onFullScreenchange),window.removeEventListener("fullscreenchange",this.onFullScreenchange)}render(){return this.isFullScreenSupported?s(e,{title:this.t("full_screen")},s("rtk-controlbar-button",{size:this.size,iconPack:this.iconPack,onClick:this.toggleFullScreen,icon:this.fullScreenActive?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize,label:this.t(this.fullScreenActive?"full_screen.exit":"full_screen"),variant:this.variant})):s(e,{"data-hidden":!0})}};f([l()],d.prototype,"states",void 0),f([l()],d.prototype,"iconPack",void 0),f([l()],d.prototype,"t",void 0),d.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}:host([data-hidden]){display:none}";export{d as rtk_fullscreen_toggle}