"use strict";(self.webpackChunk_1js_people_in_taskbar=self.webpackChunk_1js_people_in_taskbar||[]).push([[8816],{63991:(e,t,a)=>{a.d(t,{cK:()=>o,cV:()=>r,lo:()=>s});var o=function(e){return e[e.keyCodeBackspace=8]="keyCodeBackspace",e[e.keyCodeTab=9]="keyCodeTab",e[e.keyCodeEnter=13]="keyCodeEnter",e[e.keyCodeShift=16]="keyCodeShift",e[e.keyCodeCtrl=17]="keyCodeCtrl",e[e.keyCodeEscape=27]="keyCodeEscape",e[e.keyCodeSpace=32]="keyCodeSpace",e[e.keyCodePageUp=33]="keyCodePageUp",e[e.keyCodePageDown=34]="keyCodePageDown",e[e.keyCodeEnd=35]="keyCodeEnd",e[e.keyCodeHome=36]="keyCodeHome",e[e.keyCodeArrowLeft=37]="keyCodeArrowLeft",e[e.keyCodeArrowUp=38]="keyCodeArrowUp",e[e.keyCodeArrowRight=39]="keyCodeArrowRight",e[e.keyCodeArrowDown=40]="keyCodeArrowDown",e[e.keyCodeDelete=46]="keyCodeDelete",e[e.keyCodeF6=117]="keyCodeF6",e}({});function r(e,t,a){if(e&&t&&(13===e.keyCode||32===e.keyCode)){e.target.hasAttribute("href")||e.preventDefault(),t.apply(a,[e])}}let n;const s=e=>{if(e){if(n)return void(n=e);n=e;const t=function(e){return e.ownerDocument||document}(e).defaultView;t&&t.requestAnimationFrame((()=>{n&&n.focus(),n=void 0}))}}},1774:(e,t,a)=>{a.r(t),a.d(t,{default:()=>R});var o=a(63991),r=a(8618),n=a(72825),s=a(43830),i=a(18226);const l=(0,s.Os)("b63b59ad-5bea-4a02-9b6b-f296cee2fb6a"),c=e=>(0,i.PY)({...e,id:d}),d={name:"QuickMessage",dataContractId:l};var u=a(55648),p=a(74662);const k=(0,s.Os)("b63b59ad-5bea-4a02-9b6b-f296cee2fb6a"),g=e=>(0,u.X)({id:C,...e}),C={name:"SendQuickMessage",type:"InteractiveElement",aggregation:"Multi",checkpoints:[p.qd,p.Rp],expectedPaths:["/QuickMessage"],dataContractId:k},y=function(e){return{dataContractId:k,hasError:e,index:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}};var f=a(96739),m=a(47911),h=a(92908),x=a(63736),b=a(71124),E=a(51634);const w=(0,E.Ex)("lpc-oof-and-quick-reply-ui.quickMessageStrings.inputPlaceholder"),v=(0,E.Ex)("lpc-oof-and-quick-reply-ui.quickMessageStrings.sendMessage"),M=(0,E.Ex)("lpc-oof-and-quick-reply-ui.quickMessageStrings.clearMessage"),S=(0,E.Ex)("lpc-oof-and-quick-reply-ui.quickMessageStrings.quickMessageSent");var q=a(31901),A=a(59453),D=a(42124),P=a(38217);const L=(0,P.J9)((e=>({root:{padding:0,width:"32px"},rootHovered:{background:"transparent"},icon:{margin:0,height:"100%",width:"100%",...A.sl.select({Teams:{selectors:{[`&:hover .${q.ru}`]:{color:e.palette.purple}}},Default:{}})}}))),_=(0,P.J9)(((e,t)=>{const a=t?"12px":"";return(0,D.l8)({container:{flexGrow:1,display:"flex",margin:t?"16px 16px 0px 12px":"12px 12px 0px",height:"32px"},inputContainer:{display:"inline-flex",flexGrow:1,backgroundColor:e.palette.neutralQuaternary,marginRight:"4px",marginLeft:a,borderRadius:"4px",overflow:"hidden",boxSizing:"border-box",border:`1px solid ${e.palette.neutralLighterAlt}`,selectors:{":focus-within":{borderBottom:`2px solid ${e.palette.purple}`}}},textField:{flexGrow:1},textInput:{backgroundColor:e.palette.neutralQuaternary,lineHeight:0},visuallyHidden:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}})}));function N(e){const{sendMessageButtonClicked:t,quickMessageTyped:a,quickMessageCleanup:s,isExpandedView:i}=e,l=(0,m._)(),d=_(l,i),u=L(l),p=(0,r.Lh)(w),k=(0,r.Lh)(v),C=(0,r.Lh)(M),E=(0,r.Lh)(S),q=b.useRef(null),[A,D]=b.useState(""),[P,N]=b.useState(!1);b.useEffect((()=>()=>s()),[s]),b.useEffect((()=>{P&&setTimeout((()=>{q.current&&N(!1)}),1e3)}),[P]);const Q=()=>{D(""),a(""),P&&N(!1),q.current&&(0,o.lo)(q.current)},H=()=>{const e=A.trim();e&&(Q(),t(e),N(!0))};return b.createElement(c,null,b.createElement(h.z,{id:y(!1)}),b.createElement("div",{className:d.container},b.createElement("div",{className:d.inputContainer},b.createElement(x.A,{componentRef:q,"data-log-name":"QuickMessageTextInput",className:d.textField,inputClassName:d.textInput,onKeyPress:e=>{"Enter"===e.key?H():P&&N(!1)},placeholder:p,onChange:(e,t)=>{const o=t||"";D((e=>(t&&e||a(o),o)))},borderless:!0,value:A,autoComplete:"off"}),A&&b.createElement(f.r,{logName:"QuickMessageClearMessageButton",icon:n.o.Clear,onClick:Q,tooltip:C,ariaLabel:C,styles:u})),b.createElement("div",{"aria-live":"polite"},b.createElement(g,{callback:H},(e=>b.createElement(f.r,{logName:"QuickMessageSendButton",icon:P?n.o.CheckMark:n.o.Send,onClick:e,tooltip:k,ariaLabel:k,styles:u}))),P&&b.createElement("span",{className:d.visuallyHidden},E))))}var Q=a(55654),H=a(24099),I=a(29175);const R=e=>{let{quickMessageProps:t,richPresenceData:a,richPresenceDataHasError:o}=e;const r="ExpandedView"===(0,H.xZ)(),n={richPresenceData:a,hasError:o},s={oof:{message:(null==a?void 0:a.oofMessage)||"",start:void 0,end:void 0},displayName:"",stylingType:r?"large":"small"};return b.createElement(b.Fragment,null,t&&b.createElement(N,t),b.createElement(Q.K,s),b.createElement(I.A,n))}}}]);