"use strict";(self.webpackChunk_1js_people_in_taskbar=self.webpackChunk_1js_people_in_taskbar||[]).push([[5488],{61110:(e,n,t)=>{t.r(n),t.d(n,{default:()=>B});var a=t(76799),o=t(13214),i=t(85612),s=t(8529),l=t(96707),r=t(1559),c=t(85824),d=t(76992),p=t(82207),u=t(6878),b=t(37832),m=t(49003),v=t(50504),H=t(24099),E=t(47911),C=t(78126),k=t(74662),h=t(10516),y=t(77642),L=t(71124),f=t(93526),w=t(98157);function _(e){var n,t,a;const{presenceData:o,isLoading:i,hasError:s}=e,l=(0,d.U)(),_="ExpandedView"===(0,H.xZ)(),x=(0,E._)(),N=(0,m.u)(),B=_?(0,f.G)(x):(0,f.$)(x),{isHybridLocationEnabled:I,isNextAvailabilityEnabled:g,isPresenceInContactEnabled:A,isWorkingHoursEnabledLPCv2:O,isTimeZoneEnabled:Z}=l,[D,W]=A?[(0,C.J)(o),(0,C.N)(o)]:[void 0,void 0],z=_&&W||D,P={workLocation:I?null==o?void 0:o.workLocation:void 0},T=Boolean(A&&(null==o?void 0:o.presence)&&(null==o?void 0:o.presenceText)),j=Boolean(I&&(null===(n=P.workLocation)||void 0===n?void 0:n.location)),q={properties:{hybridLocationIsEnabled:I,hybridLocationHasContent:j,hybridLocationHasBuildingContent:Boolean(I&&(null===(a=P.workLocation)||void 0===a||null===(t=a.approximateDetails)||void 0===t?void 0:t.name)),nextAvailabilityIsEnabled:g,nextAvailabilityHasContent:!1,presenceIsEnabled:A,presenceHasContent:T,timeZoneIsEnabled:Z,timeZoneHasContent:!1,workHoursIsEnabled:O,workHoursHasContent:!1}},G={checkpoints:[{checkpoint:k.Rp,properties:{presenceHasContent:T,nextAvailabilityHasContent:!1,hybridLocationHasContent:j,workHoursHasContent:!1,timeZoneHasContent:!1}},{checkpoint:k.qd,properties:{presenceHasContent:T,nextAvailabilityHasContent:!1,hybridLocationHasContent:j,workHoursHasContent:!1,timeZoneHasContent:!1}}]};return(0,h.K)(v.w,q,G,Boolean(s)),i?L.createElement(p.bJ,null,L.createElement(u.c,null)):L.createElement("section",{"aria-label":N,className:B.container,"data-log-name":"HybridPresence"},L.createElement("div",{className:B.header,role:"presentation"},L.createElement("div",{className:B.headerContentLeft},A?L.createElement(b.z,{className:B.presenceIcon,isOutOfOffice:Boolean(null==o?void 0:o.isOutOfOffice),presence:(0,w.d)(null==o?void 0:o.presence),size:y.WH.size40}):null,L.createElement("div",{className:B.innerHeader},L.createElement("h2",{className:B.text},z||""))),_?L.createElement(r._,{hybridLocation:P,variant:"Wide",className:B.locationContainer}):L.createElement(c.H,{hybridLocation:P,className:B.locationIcon})))}var x=t(41893),N=t(59453);function B(e){let{queryKey:n,identifiers:t}=e;const r=(0,x.BB)(),c=N.sl.select({Teams:(0,s.g)(n,t),Default:(0,l.y)(r,t)}),d=(0,a.EW)(c),p=(0,i.G)(n,t),u="not_asked"===c.state,b="error"===c.state;return p||!d||(null==d?void 0:d.presence)===o.As.none?null:L.createElement(_,{isLoading:u,hasError:b,presenceData:d})}}}]);