import{r as t,h as e,a as r}from"./p-a599f720.js";import{c as a,e as i,i as s}from"./p-9811c98c.js";import{S as o}from"./p-af705ed1.js";var n=function(t,e,r,a){var i,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,a);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o};const c=class{constructor(e){t(this,e),this.config=a(),this.icon=i,this.t=s(),this.iconPack=i,this.message=""}connectedCallback(){this.statesChanged(this.states)}getBreakoutRoomsMessage(t){var e;let r;return"connected-meeting"===(null==t?void 0:t.roomLeftState)&&(r=(null===(e=this.states.activeBreakoutRoomsManager)||void 0===e?void 0:e.destinationMeetingId)===this.meeting.connectedMeetings.parentMeeting.id?"breakout_rooms.move_reason.switch_main_room":"breakout_rooms.move_reason.switch_room"),r}statesChanged(t){if(null!=t)switch(null==t?void 0:t.roomLeftState){case"left":this.message="ended.left";break;case"kicked":this.message="ended.kicked";break;case"disconnected":this.message="ended.disconnected";break;case"rejected":this.message="ended.rejected";break;case"connected-meeting":this.message=this.getBreakoutRoomsMessage(t);break;case"unauthorized":this.message="ended.unauthorized";break;default:this.message="ended"}}renderBreakoutRoomScreen(){return e(r,null,e("div",{class:"ctr",part:"container"},e("rtk-icon",{icon:this.iconPack.breakout_rooms}),e("p",{part:"message",class:"breakout"},this.t(this.message))))}render(){if(!this.meeting)return null;const t=this.states;return"connected-meeting"===t.roomLeftState?this.renderBreakoutRoomScreen():e(r,null,e("div",{class:"ctr",part:"container"},e("rtk-logo",{meeting:this.meeting,config:this.config,part:"logo",t:this.t}),e("p",{part:"message"},this.t(this.message)),"disconnected"===(null==t?void 0:t.roomLeftState)&&e("span",{part:"description"},this.t("ended.network"))))}static get watchers(){return{states:["statesChanged"]}}};n([o()],c.prototype,"config",void 0),n([o()],c.prototype,"states",void 0),n([o()],c.prototype,"t",void 0),n([o()],c.prototype,"iconPack",void 0),n([o()],c.prototype,"meeting",void 0),c.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{height:100%;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;flex-direction:column;align-items:center;justify-content:center}.ctr{display:flex;flex-direction:column;align-items:center;gap:var(--rtk-space-8, 32px)}rtk-logo.loaded{height:var(--rtk-space-12, 48px)}.rejoin-button{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-6, 24px);padding-bottom:var(--rtk-space-6, 24px);padding-left:var(--rtk-space-16, 64px);padding-right:var(--rtk-space-16, 64px)}.rejoin-icon{margin-right:var(--rtk-space-2, 8px)}p{font-size:16px;border-radius:var(--rtk-border-radius-lg, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));padding-left:var(--rtk-space-8, 32px);padding-right:var(--rtk-space-8, 32px);padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}p.breakout{font-size:20px;display:flex;flex-direction:column;align-items:center}p.breakout span{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-0, 0px);color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}span{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);font-size:14px}";export{c as rtk_ended_screen}