%PDF- %PDF-
Direktori : /home/opti/public_html/ezone-accounting.optisoft.com.ng/static/js/ |
Current File : /home/opti/public_html/ezone-accounting.optisoft.com.ng/static/js/159.b100235a.chunk.js |
(this["webpackJsonpfuse-react-app"]=this["webpackJsonpfuse-react-app"]||[]).push([[159],{2700:function(e,t,a){"use strict";a.r(t);var c=a(1100),s=a(1124),l=a(1098),r=a(94),n=a(1121),o=a(1090),i=a(1028),d=a(193),b=a(1072),u=a(65),p=a(1125),j=a(1101),h=a(194),m=a(133),x=a(5),f=a(0),O=a(6),g=a(39),v=a(1096),w=a(404),y=a(19),N=a(50),C=a.n(N);const k=Object(y.b)("chatApp/contacts/getContacts",(async e=>{const t=await C.a.get("/api/chat/contacts",{params:e});return await t.data})),S=Object(y.c)({}),{selectAll:I,selectById:A}=S.getSelectors((e=>e.chatApp.contacts)),R=Object(y.d)({name:"chatApp/contacts",initialState:S.getInitialState({selectedContactId:null}),reducers:{setSelectedContactId:(e,t)=>{e.selectedContactId=t.payload},removeSelectedContactId:(e,t)=>{e.selectedContactId=null}},extraReducers:{[k.fulfilled]:S.setAll}}),{setSelectedContactId:L,removeSelectedContactId:P}=R.actions;var T=R.reducer;const M=Object(y.d)({name:"chatApp/sidebars",initialState:{mobileChatsSidebarOpen:!1,userSidebarOpen:!1,contactSidebarOpen:!1},reducers:{openMobileChatsSidebar:(e,t)=>{e.mobileChatsSidebarOpen=!0},closeMobileChatsSidebar:(e,t)=>{e.mobileChatsSidebarOpen=!1},openUserSidebar:(e,t)=>{e.userSidebarOpen=!0},closeUserSidebar:(e,t)=>{e.userSidebarOpen=!1},openContactSidebar:(e,t)=>{e.contactSidebarOpen=!0},closeContactSidebar:(e,t)=>{e.contactSidebarOpen=!1}}}),{openMobileChatsSidebar:B,closeMobileChatsSidebar:D,openUserSidebar:U,closeUserSidebar:z,openContactSidebar:W,closeContactSidebar:E}=M.actions;var _=M.reducer;const H=Object(y.b)("chatApp/user/getUserData",(async()=>{const e=await C.a.get("/api/chat/user");return await e.data})),F=Object(y.b)("chatApp/user/updateUserData",(async e=>{const t=await C.a.post("/api/chat/user/data",e);return await t.data})),K=Object(y.d)({name:"chatApp/user",initialState:null,reducers:{updateUserChatList:(e,t)=>{e.chatList=t.payload}},extraReducers:{[H.fulfilled]:(e,t)=>t.payload,[F.fulfilled]:(e,t)=>t.payload}}),{updateUserChatList:J}=K.actions;var q=K.reducer;const V=Object(y.b)("chatApp/chat/getChat",(async(e,t)=>{let{contactId:a,isMobile:c}=e,{dispatch:s,getState:l}=t;const{id:r}=l().chatApp.user,n=await C.a.get("/api/chat/get-chat",{params:{contactId:a,userId:r}}),{chat:o,userChatList:i}=await n.data;return s(L(a)),s(J(i)),c&&s(D()),o})),G=Object(y.b)("chatApp/chat/sendMessage",(async(e,t)=>{let{messageText:a,chatId:c,contactId:s}=e,{dispatch:l,getState:r}=t;const n=await C.a.post("/api/chat/send-message",{chatId:c,messageText:a,contactId:s}),{message:o,userChatList:i}=await n.data;return l(J(i)),o}));var Q=Object(y.d)({name:"chatApp/chat",initialState:null,reducers:{removeChat:(e,t)=>t.payload},extraReducers:{[V.fulfilled]:(e,t)=>t.payload,[G.fulfilled]:(e,t)=>{e.dialog=[...e.dialog,t.payload]}}}).reducer,X=a(1);const Y=Object(b.a)((e=>({messageRow:{"&.contact":{"& .bubble":{backgroundColor:e.palette.background.paper,color:e.palette.getContrastText(e.palette.background.paper),borderTopLeftRadius:5,borderBottomLeftRadius:5,borderTopRightRadius:20,borderBottomRightRadius:20,"& .time":{marginLeft:12}},"&.first-of-group":{"& .bubble":{borderTopLeftRadius:20}},"&.last-of-group":{"& .bubble":{borderBottomLeftRadius:20}}},"&.me":{paddingLeft:40,"& .avatar":{order:2,margin:"0 0 0 16px"},"& .bubble":{marginLeft:"auto",backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,borderTopLeftRadius:20,borderBottomLeftRadius:20,borderTopRightRadius:5,borderBottomRightRadius:5,"& .time":{justifyContent:"flex-end",right:0,marginRight:12}},"&.first-of-group":{"& .bubble":{borderTopRightRadius:20}},"&.last-of-group":{"& .bubble":{borderBottomRightRadius:20}}},"&.contact + .me, &.me + .contact":{paddingTop:20,marginTop:20},"&.first-of-group":{"& .bubble":{borderTopLeftRadius:20,paddingTop:13}},"&.last-of-group":{"& .bubble":{borderBottomLeftRadius:20,paddingBottom:13,"& .time":{display:"flex"}}}}})));var Z=function(e){const t=Object(O.b)(),a=Object(O.c)(I),c=Object(O.c)((e=>{let{chatApp:t}=e;return t.contacts.selectedContactId})),l=Object(O.c)((e=>{let{chatApp:t}=e;return t.chat})),r=Object(O.c)((e=>{let{chatApp:t}=e;return t.user})),n=Y(e),b=Object(f.useRef)(null),[u,p]=Object(f.useState)("");function j(e,t){return e.who===c&&(l.dialog[t+1]&&l.dialog[t+1].who!==c||!l.dialog[t+1])}function m(e,t){return 0===t||l.dialog[t-1]&&l.dialog[t-1].who!==e.who}function y(e,t){return t===l.dialog.length-1||l.dialog[t+1]&&l.dialog[t+1].who!==e.who}return Object(f.useEffect)((()=>{l&&(b.current.scrollTop=b.current.scrollHeight)}),[l]),Object(X.jsxs)("div",{className:Object(x.a)("flex flex-col relative",e.className),children:[Object(X.jsx)(g.a,{ref:b,className:"flex flex-1 flex-col overflow-y-auto",children:l&&l.dialog.length>0?Object(X.jsx)("div",{className:"flex flex-col pt-16 px-16 ltr:pl-56 rtl:pr-56 pb-40",children:l.dialog.map(((e,t)=>{const c=e.who===r.id?r:a.find((t=>t.id===e.who));return Object(X.jsxs)("div",{className:Object(x.a)(n.messageRow,"flex flex-col flex-grow-0 flex-shrink-0 items-start justify-end relative px-16 pb-4",{me:e.who===r.id},{contact:e.who!==r.id},{"first-of-group":m(e,t)},{"last-of-group":y(e,t)},t+1===l.dialog.length&&"pb-96"),children:[j(e,t)&&Object(X.jsx)(s.a,{className:"avatar absolute ltr:left-0 rtl:right-0 m-0 -mx-32",src:c.avatar}),Object(X.jsxs)("div",{className:"bubble flex relative items-center justify-center p-12 max-w-full shadow",children:[Object(X.jsx)("div",{className:"leading-tight whitespace-pre-wrap",children:e.message}),Object(X.jsx)(h.a,{className:"time absolute hidden w-full text-11 mt-8 -mb-24 ltr:left-0 rtl:right-0 bottom-0 whitespace-nowrap",color:"textSecondary",children:Object(w.a)(new Date(e.time),{addSuffix:!0})})]})]},e.time)}))}):Object(X.jsxs)("div",{className:"flex flex-col flex-1",children:[Object(X.jsx)("div",{className:"flex flex-col flex-1 items-center justify-center",children:Object(X.jsx)(o.a,{className:"text-128",color:"disabled",children:"chat"})}),Object(X.jsx)(h.a,{className:"px-16 pb-24 text-center",color:"textSecondary",children:"Start a conversation by typing your message below."})]})}),l&&Object(X.jsx)("form",{onSubmit:function(e){e.preventDefault(),""!==u&&t(G({messageText:u,chatId:l.id,contactId:c})).then((()=>{p("")}))},className:"absolute bottom-0 right-0 left-0 py-16 px-8",children:Object(X.jsxs)(d.a,{className:"flex items-center relative rounded-24 shadow",children:[Object(X.jsx)(v.a,{autoFocus:!1,id:"message-input",className:"flex-1",InputProps:{disableUnderline:!0,classes:{root:"flex flex-grow flex-shrink-0 mx-16 ltr:mr-48 rtl:ml-48 my-8",input:""},placeholder:"Type your message"},InputLabelProps:{shrink:!1,className:n.bootstrapFormLabel},onChange:function(e){p(e.target.value)},value:u}),Object(X.jsx)(i.a,{className:"absolute ltr:right-0 rtl:left-0 top-0",type:"submit",children:Object(X.jsx)(o.a,{className:"text-24",color:"action",children:"send"})})]})})]})},$=a(52),ee=a(548),te=a(1033),ae=a(1112),ce=a(1103),se=a(536),le=a(1092),re=a(43),ne=a(1042),oe=a(1118),ie=a(1034),de=a(165);var be=function(e){switch(e.status){case"online":return Object(X.jsx)(o.a,{className:"block text-16 text-green bg-white rounded-full",children:"check_circle"});case"away":return Object(X.jsx)(o.a,{className:"block text-16 text-white bg-yellow-700 rounded-full",children:"access_time"});case"do-not-disturb":return Object(X.jsx)(o.a,{className:"block text-16 text-red bg-white rounded-full",children:"remove_circle_outline"});case"offline":return Object(X.jsx)(o.a,{className:"block text-16 text-grey-700 bg-white rounded-full",children:"not_interested"});default:return null}};const ue=Object(b.a)((e=>({contactListItem:{"&.active":{backgroundColor:e.palette.background.paper}},unreadBadge:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText}})));var pe=function(e){const t=ue(e);return Object(X.jsxs)(ie.a,{button:!0,className:Object(x.a)(t.contactListItem,"px-16 py-12 min-h-92",{active:e.selectedContactId===e.contact.id}),onClick:()=>e.onContactClick(e.contact.id),children:[Object(X.jsxs)("div",{className:"relative",children:[Object(X.jsx)("div",{className:"absolute right-0 bottom-0 -m-4 z-10",children:Object(X.jsx)(be,{status:e.contact.status})}),Object(X.jsx)(s.a,{src:e.contact.avatar,alt:e.contact.name,children:e.contact.avatar&&""!==e.contact.avatar?"":e.contact.name[0]})]}),Object(X.jsx)(ce.a,{classes:{root:"min-w-px px-16",primary:"font-medium text-14",secondary:"truncate"},primary:e.contact.name,secondary:e.contact.mood}),e.contact.chatId&&Object(X.jsxs)("div",{className:"flex flex-col justify-center items-end",children:[e.contact.lastMessageTime&&Object(X.jsx)(h.a,{className:"whitespace-nowrap mb-8 font-medium text-12",color:"textSecondary",children:Object(de.a)(new Date(e.contact.lastMessageTime),"PP")}),e.contact.unread&&Object(X.jsx)("div",{className:Object(x.a)(t.unreadBadge,"flex items-center justify-center min-w-24 h-24 rounded-full font-medium text-12 text-center"),children:e.contact.unread})]})]})};const je=[{title:"Online",value:"online"},{title:"Away",value:"away"},{title:"Do not disturb",value:"do-not-disturb"},{title:"Offline",value:"offline"}];var he=function(e){const t=Object(O.b)(),a=Object(O.c)(I),l=Object(O.c)((e=>{let{chatApp:t}=e;return t.user})),r=Object(re.a)(),n=Object(ne.a)(r.breakpoints.down("md")),[b,u]=Object(f.useState)(""),[p,m]=Object(f.useState)(null),[x,v]=Object(f.useState)(null);function w(e){v(null)}function y(e){e.preventDefault(),e.stopPropagation(),m(e.currentTarget)}function N(e){u(e.target.value)}return Object(X.jsxs)("div",{className:"flex flex-col flex-auto h-full",children:[Object(X.jsxs)(c.a,{position:"static",color:"default",elevation:0,children:[Object(X.jsxs)(j.a,{className:"flex justify-between items-center px-4",children:[l&&Object(X.jsxs)("div",{className:"relative w-40 h-40 p-0 mx-12 cursor-pointer",onClick:()=>t(U()),onKeyDown:()=>t(U()),role:"button",tabIndex:0,children:[Object(X.jsx)(s.a,{src:l.avatar,alt:l.name,className:"w-40 h-40",children:l.avatar&&""!==l.avatar?"":l.name[0]}),Object(X.jsx)("div",{className:"absolute right-0 bottom-0 -m-4 z-10 cursor-pointer","aria-owns":p?"switch-menu":null,"aria-haspopup":"true",onClick:y,onKeyDown:y,role:"button",tabIndex:0,children:Object(X.jsx)(be,{status:l.status})}),Object(X.jsx)(se.a,{id:"status-switch",anchorEl:p,open:Boolean(p),onClose:function(e){e.preventDefault(),e.stopPropagation(),m(null)},children:je.map((e=>Object(X.jsxs)(le.a,{onClick:a=>function(e,a){e.preventDefault(),e.stopPropagation(),t(F({...l,status:a})),m(null)}(a,e.value),children:[Object(X.jsx)(ae.a,{className:"min-w-40",children:Object(X.jsx)(be,{status:e.value})}),Object(X.jsx)(ce.a,{primary:e.title})]},e.value)))})]}),Object(X.jsxs)("div",{children:[Object(X.jsx)(i.a,{"aria-owns":x?"chats-more-menu":null,"aria-haspopup":"true",onClick:function(e){v(e.currentTarget)},children:Object(X.jsx)(o.a,{children:"more_vert"})}),Object(X.jsxs)(se.a,{id:"chats-more-menu",anchorEl:x,open:Boolean(x),onClose:w,children:[Object(X.jsx)(le.a,{onClick:w,children:"Profile"}),Object(X.jsx)(le.a,{onClick:w,children:"Logout"})]})]})]}),Object(f.useMemo)((()=>Object(X.jsx)(j.a,{className:"px-16",children:Object(X.jsxs)(d.a,{className:"flex p-4 items-center w-full px-8 py-4 shadow",children:[Object(X.jsx)(o.a,{color:"action",children:"search"}),Object(X.jsx)(ee.a,{placeholder:"Search or start new chat",className:"flex flex-1 px-8",disableUnderline:!0,fullWidth:!0,value:b,inputProps:{"aria-label":"Search"},onChange:N})]})})),[b])]}),Object(X.jsx)(g.a,{className:"overflow-y-auto flex-1",children:Object(X.jsx)(te.a,{className:"w-full",children:Object(f.useMemo)((()=>{function e(e,t){return 0===t.length?e:$.a.filterArrayByString(e,t)}const c=a.length>0&&l&&l.chatList?l.chatList.map((e=>({...e,...a.find((t=>t.id===e.contactId))}))):[],s=e([...a],b),r=e([...c],b),o={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return Object(X.jsxs)(oe.a.div,{className:"flex flex-col flex-shrink-0",variants:{show:{transition:{staggerChildren:.1}}},initial:"hidden",animate:"show",children:[r.length>0&&Object(X.jsx)(oe.a.div,{variants:o,children:Object(X.jsx)(h.a,{className:"font-medium text-20 px-16 py-24",color:"secondary",children:"Chats"})}),r.map((e=>Object(X.jsx)(oe.a.div,{variants:o,children:Object(X.jsx)(pe,{contact:e,onContactClick:e=>t(V({contactId:e,isMobile:n}))})},e.id))),s.length>0&&Object(X.jsx)(oe.a.div,{variants:o,children:Object(X.jsx)(h.a,{className:"font-medium text-20 px-16 py-24",color:"secondary",children:"Contacts"})}),s.map((e=>Object(X.jsx)(oe.a.div,{variants:o,children:Object(X.jsx)(pe,{contact:e,onContactClick:e=>t(V({contactId:e,isMobile:n}))})},e.id)))]})}),[a,l,b,t,n])})})]})};var me=function(e){const t=Object(O.b)(),a=Object(O.c)(I),l=Object(O.c)((e=>{let{chatApp:t}=e;return t.contacts.selectedContactId})),r=a.find((e=>e.id===l));return r?Object(X.jsxs)("div",{className:"flex flex-col flex-auto h-full",children:[Object(X.jsxs)(c.a,{position:"static",color:"primary",elevation:0,children:[Object(X.jsxs)(j.a,{className:"flex justify-between items-center px-4",children:[Object(X.jsx)(h.a,{className:"px-12",color:"inherit",variant:"subtitle1",children:"Contact Info"}),Object(X.jsx)(i.a,{onClick:()=>t(E()),color:"inherit",children:Object(X.jsx)(o.a,{children:"close"})})]}),Object(X.jsxs)(j.a,{className:"flex flex-col justify-center items-center p-24",children:[Object(X.jsx)(s.a,{src:r.avatar,alt:r.name,className:"w-96 h-96",children:r.avatar&&""!==r.avatar?"":r.name[0]}),Object(X.jsx)(h.a,{color:"inherit",className:"mt-16",variant:"h6",children:r.name})]})]}),Object(X.jsx)(g.a,{className:"overflow-y-auto flex-1 p-24",children:Object(X.jsx)(v.a,{label:"Mood",className:"w-full",variant:"outlined",value:r.mood,margin:"normal",disabled:!0,multiline:!0})})]}):null},xe=a(112);var fe=Object(xe.c)({sidebars:_,user:q,contacts:T,chat:Q}),Oe=a(89),ge=a(1035),ve=a(1094),we=a(1036),ye=a(1120),Ne=a(1093),Ce=a(32),ke=a(10);const Se=[{title:"Online",value:"online"},{title:"Away",value:"away"},{title:"Do not disturb",value:"do-not-disturb"},{title:"Offline",value:"offline"}];var Ie=function(e){const t=Object(O.b)(),a=Object(O.c)((e=>{let{chatApp:t}=e;return t.user})),{control:l,handleSubmit:r,watch:n}=Object(Ce.f)({defaultValues:a}),d=n(),b=Object(Oe.a)((e=>{t(F(e))}),500);return Object(f.useEffect)((()=>{a&&(ke.a.isEqual(a,d)||b(d))}),[a,d,b]),Object(X.jsxs)("div",{className:"flex flex-col flex-auto h-full",children:[Object(X.jsxs)(c.a,{position:"static",color:"primary",elevation:0,children:[Object(X.jsxs)(j.a,{className:"flex justify-between items-center px-4",children:[Object(X.jsx)(h.a,{className:"px-12",color:"inherit",variant:"subtitle1",children:"User Info"}),Object(X.jsx)(i.a,{onClick:()=>t(z()),color:"inherit",children:Object(X.jsx)(o.a,{children:"close"})})]}),Object(X.jsxs)(j.a,{className:"flex flex-col justify-center items-center p-24",children:[Object(X.jsx)(s.a,{src:a.avatar,alt:a.name,className:"w-96 h-96",children:a.avatar&&""!==a.avatar?"":a.name[0]}),Object(X.jsx)(h.a,{color:"inherit",className:"mt-16",variant:"h6",children:a.name})]})]}),Object(X.jsx)(g.a,{className:"overflow-y-auto flex-1 p-24",children:Object(X.jsxs)("form",{children:[Object(X.jsx)(ge.a,{component:"fieldset",className:"w-full mb-16",children:Object(X.jsx)(Ce.a,{name:"mood",control:l,render:e=>{let{field:t}=e;return Object(X.jsx)(v.a,{...t,label:"Mood",className:"w-full",margin:"normal",multiline:!0,variant:"outlined"})}})}),Object(X.jsxs)(ge.a,{component:"fieldset",className:"w-full mb-16",children:[Object(X.jsx)(we.a,{component:"legend",children:"Status"}),Object(X.jsx)(Ce.a,{name:"status",control:l,render:e=>{let{field:t}=e;return Object(X.jsx)(Ne.a,{...t,"aria-label":"Status",name:"status",children:Se.map((e=>Object(X.jsx)(ve.a,{value:e.value,control:Object(X.jsx)(ye.a,{}),label:Object(X.jsxs)("div",{className:"flex items-center",children:[Object(X.jsx)(be,{status:e.value}),Object(X.jsx)("span",{className:"mx-8",children:e.title})]})},e.value)))})}})]})]})})]})};const Ae=Object(b.a)((e=>({"@global":{"#fuse-main":{height:"100vh"}},root:{display:"flex",flexDirection:"row",minHeight:"100%",position:"relative",flex:"1 1 auto",height:"auto",backgroundColor:e.palette.background.default},topBg:{position:"absolute",left:0,right:0,top:0,height:200,backgroundImage:'url("../../assets/images/backgrounds/header-bg.png")',backgroundColor:e.palette.primary.dark,backgroundSize:"cover",pointerEvents:"none"},contentCardWrapper:{position:"relative",padding:24,maxWidth:1400,display:"flex",flexDirection:"column",flex:"1 0 auto",width:"100%",minWidth:"0",maxHeight:"100%",margin:"0 auto",[e.breakpoints.down("sm")]:{padding:16},[e.breakpoints.down("xs")]:{padding:12}},contentCard:{display:"flex",position:"relative",flex:"1 1 100%",flexDirection:"row",backgroundImage:'url("/assets/images/patterns/rain-grey.png")',backgroundColor:e.palette.background.paper,minHeight:0,overflow:"hidden"},drawerPaper:{width:400,maxWidth:"100%",overflow:"hidden",height:"100%",[e.breakpoints.up("md")]:{position:"relative"}},contentWrapper:{display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:10,background:"linear-gradient(to bottom, ".concat(Object(u.alpha)(e.palette.background.paper,.8)," 0,").concat(Object(u.alpha)(e.palette.background.paper,.6)," 20%,").concat(Object(u.alpha)(e.palette.background.paper,.8),")")},content:{display:"flex",flex:"1 1 100%",minHeight:0}})));t.default=Object(m.a)("chatApp",fe)((function(e){const t=Object(O.b)(),a=Object(O.c)((e=>{let{chatApp:t}=e;return t.chat})),b=Object(O.c)((e=>{let{chatApp:t}=e;return t.sidebars.mobileChatsSidebarOpen})),u=Object(O.c)((e=>{let{chatApp:t}=e;return t.sidebars.userSidebarOpen})),m=Object(O.c)((e=>{let{chatApp:t}=e;return t.sidebars.contactSidebarOpen})),g=Object(O.c)((e=>A(e,e.chatApp.contacts.selectedContactId))),v=Ae(e);return Object(f.useEffect)((()=>{t(H()),t(k())}),[t]),Object(X.jsxs)("div",{className:Object(x.a)(v.root),children:[Object(X.jsx)("div",{className:v.topBg}),Object(X.jsx)("div",{className:Object(x.a)(v.contentCardWrapper,"container"),children:Object(X.jsxs)("div",{className:Object(x.a)(v.contentCard,"shadow rounded-20"),children:[Object(X.jsx)(n.a,{mdUp:!0,children:Object(X.jsx)(p.a,{className:"h-full absolute z-20",variant:"temporary",anchor:"left",open:b,onOpen:e=>{},onClose:()=>t(D()),disableSwipeToOpen:!0,classes:{paper:Object(x.a)(v.drawerPaper,"absolute ltr:left-0 rtl:right-0")},style:{position:"absolute"},ModalProps:{keepMounted:!0,disablePortal:!0,BackdropProps:{classes:{root:"absolute"}}},children:Object(X.jsx)(he,{})})}),Object(X.jsx)(n.a,{smDown:!0,children:Object(X.jsx)(r.a,{className:"h-full z-20",variant:"permanent",open:!0,classes:{paper:v.drawerPaper},children:Object(X.jsx)(he,{})})}),Object(X.jsx)(p.a,{className:"h-full absolute z-30",variant:"temporary",anchor:"left",open:u,onOpen:e=>{},onClose:()=>t(z()),classes:{paper:Object(x.a)(v.drawerPaper,"absolute left-0")},style:{position:"absolute"},ModalProps:{keepMounted:!1,disablePortal:!0,BackdropProps:{classes:{root:"absolute"}}},children:Object(X.jsx)(Ie,{})}),Object(X.jsx)("main",{className:Object(x.a)(v.contentWrapper,"z-10"),children:a?Object(X.jsxs)(X.Fragment,{children:[Object(X.jsx)(c.a,{className:"w-full",elevation:0,position:"static",children:Object(X.jsxs)(j.a,{className:"px-16",children:[Object(X.jsx)(i.a,{color:"inherit","aria-label":"Open drawer",onClick:()=>t(B()),className:"flex md:hidden",children:Object(X.jsx)(o.a,{children:"chat"})}),Object(X.jsxs)("div",{className:"flex items-center cursor-pointer",onClick:()=>t(W()),onKeyDown:()=>t(W()),role:"button",tabIndex:0,children:[Object(X.jsxs)("div",{className:"relative mx-8",children:[Object(X.jsx)("div",{className:"absolute right-0 bottom-0 -m-4 z-10",children:Object(X.jsx)(be,{status:g.status})}),Object(X.jsx)(s.a,{src:g.avatar,alt:g.name,children:g.avatar&&""!==g.avatar?"":g.name[0]})]}),Object(X.jsx)(h.a,{color:"inherit",className:"text-18 font-semibold px-4",children:g.name})]})]})}),Object(X.jsx)("div",{className:v.content,children:Object(X.jsx)(Z,{className:"flex flex-1 z-10"})})]}):Object(X.jsxs)("div",{className:"flex flex-col flex-1 items-center justify-center p-24",children:[Object(X.jsx)(d.a,{className:"rounded-full p-48 md:p-64 shadow-xl",children:Object(X.jsx)(o.a,{className:"block text-48 md:text-64",color:"secondary",children:"chat"})}),Object(X.jsx)(h.a,{variant:"h6",className:"mt-24 mb-12 text-32 font-700",children:"Chat App"}),Object(X.jsx)(h.a,{className:"hidden md:flex px-16 pb-24 text-16 text-center",color:"textSecondary",children:"Select a contact to start a conversation!.."}),Object(X.jsx)(l.a,{variant:"outlined",color:"primary",className:"flex md:hidden",onClick:()=>t(B()),children:"Select a contact to start a conversation!.."})]})}),Object(X.jsx)(p.a,{className:"h-full absolute z-30",variant:"temporary",anchor:"right",open:m,onOpen:e=>{},onClose:()=>t(E()),classes:{paper:Object(x.a)(v.drawerPaper,"absolute ltr:right-0 rtl:left-0")},style:{position:"absolute"},ModalProps:{keepMounted:!0,disablePortal:!0,BackdropProps:{classes:{root:"absolute"}}},children:Object(X.jsx)(me,{})})]})})]})}))}}]);