"use strict";(self.webpackChunk_1js_people_in_taskbar=self.webpackChunk_1js_people_in_taskbar||[]).push([[5933],{75283:(e,s,t)=>{function n(e){return["lpc/presence",e]}t.d(s,{A:()=>n})},8529:(e,s,t)=>{t.d(s,{g:()=>f});var n=t(71317),o=t(50812),a=t(85969),r=t(90838),c=t(66766),i=t(13214),u=t(14130),d=t(93823);const p=(e,s)=>()=>(0,d.w)(new Promise((t=>{e.getRichPresence?e.getRichPresence((0,c.Q)(s),((e,s)=>{t(s?{state:"error",errorCode:"host_app_callback"}:e?{state:"success",data:{oofMessage:e.oofMessage,statusNoteV2:e.statusNoteV2,statusNoteV1:e.statusNote,isOutOfOffice:e.isOutOfOffice,presence:e.presence||i.As.none,presenceText:e.presenceText,presenceTextLong:e.presenceTextLong,presenceStatus:e.presenceStatus,workLocation:e.workLocation}}:{state:"no_data"})})):t({state:"no_data"})})),u.he,{state:"error"});var l=t(75283);function f(e,s){const t=(0,o.us)(),c=(0,r.dW)(a.G)((()=>p(t,s))),i=(0,l.A)(e),[u]=(0,n.st)(c,i,{fetchOnce:!0});return u}},85969:(e,s,t)=>{t.d(s,{G:()=>n,Q:()=>o});const n={scenario:"RichPresence"},o={scenario:"BatchRichPresence"}},13688:(e,s,t)=>{t.r(s),t.d(s,{default:()=>R});var n=t(76799);const o={component:"OofAndQuickReplyRenderPanel"};var a=t(84957),r=t(24099),c=t(74662),i=t(10516),u=t(71124);const d=u.lazy((()=>Promise.all([t.e(3736),t.e(9175),t.e(5654),t.e(8816)]).then(t.bind(t,1774))));var p=t(50812),l=t(12427);var f=t(8235),k=t(42641),g=t(3298),h=t(15770);var M=t(39585),y=t(8529);const R=function(e){const{queryKey:s,identifiers:t}=e,R=function(e,s){return{oofAndStatusNoteResult:(0,y.g)(e,s),headerActionsPolicyResult:(0,M.q)(e,s)}}(s,t),[,C]=(0,a.l)(),P="ExpandedView"===(0,r.xZ)(),v="error"===R.oofAndStatusNoteResult.state,A=(0,n.EW)(R.oofAndStatusNoteResult),_=(0,n.EW)(R.headerActionsPolicyResult),m=_&&!_.disableChat,E={oofMessage:(null==A?void 0:A.oofMessage)||""},b=function(e){const s=(0,p.ML)();return{startChat:e=>{s.startChat&&s.startChat({smtpAddress:"",imAddress:"",imAddressUrl:"",persona:e},((e,s)=>{}))},sendQuickMessage:t=>{s.sendQuickMessage&&s.sendQuickMessage((0,l.L)(e,e.teamsMri||void 0),t,((e,s)=>{}))}}}(t),q=function(){const e=(0,h.U)(),{isConsumer:s}=(0,g.o)(),t=!s,n=(0,f.y)(),o=(0,k.V)(n);return!e&&t&&!("ExtendedDirectory"===o)}(),N=m&&q?{quickMessageTyped:e=>{C(e?"Sticky":"NonSticky")},quickMessageCleanup:()=>{},sendMessageButtonClicked:e=>{C("NonSticky"),b.sendQuickMessage(e)},isExpandedView:P}:void 0,S=Boolean(m&&q),w=S,x=Boolean(null==A?void 0:A.oofMessage),O={properties:{oofMessageIsEnabled:!0,oofMessageHasContent:x,quickReplyIsEnabled:S,quickReplyHasContent:w}},Q={checkpoints:[{checkpoint:c.Rp,properties:{quickReplyHasContent:w}},{checkpoint:c.qd,properties:{oofMessageHasContent:x,quickReplyHasContent:w}}]},H=!S&&!x;return(0,i.K)(o,O,Q,H),u.createElement(u.Suspense,{fallback:u.createElement("div",null)},u.createElement(d,{oofMessageProps:E,statusNoteProps:e,quickMessageProps:N,richPresenceData:A,richPresenceDataHasError:v}))}}}]);