(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2814],{488:(e,s,i)=>{"use strict";i.r(s),i.d(s,{default:()=>n});var a=i(5155),c=i(5695),r=i(2108),l=i(7383),t=i(4338),d=i(6628);function n(){let e=(0,c.useRouter)(),s=(0,c.useSearchParams)(),{status:i}=(0,r.useSession)(),n=s.get("contactId"),o=s.get("projectId"),h=s.get("projectStatus");return"loading"===i?(0,a.jsx)("div",{className:"profile-wrapper",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col-12",children:[(0,a.jsx)(t.A,{size:"lg",className:"py-8"}),(0,a.jsx)("p",{className:"text-center text-gray-600 mt-4",children:"Loading messages..."})]})})})}):"unauthenticated"===i?(0,a.jsx)("div",{className:"profile-wrapper",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("div",{className:"col-12",children:(0,a.jsx)(d.A,{title:"Access Denied",description:"Please log in to view your messages.",errorCode:"401"})})})})}):(0,a.jsx)("div",{className:"profile-wrapper chat-wrapper",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:"col-12",children:[(0,a.jsx)("div",{className:"back-button",children:(0,a.jsxs)("button",{onClick:()=>e.push("/client/my-projects"),className:"back-link",children:[(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Back to Dashboard"]})}),(0,a.jsx)("div",{className:"page-title",children:(0,a.jsx)("h2",{children:"Messages"})})]}),(0,a.jsx)("div",{className:"col-12",children:(0,a.jsx)("div",{style:{height:"600px"},children:(0,a.jsx)(l.A,{preselectedContactId:n||void 0,projectId:o||void 0,projectStatus:h||void 0})})})]})})})}i(7453)},6769:(e,s,i)=>{Promise.resolve().then(i.bind(i,488))},7453:()=>{}},e=>{e.O(0,[1525,3388,2108,6766,3204,8441,5964,7358],()=>e(e.s=6769)),_N_E=e.O()}]);