(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5712],{3819:()=>{},8914:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>n});var c=a(5155),r=a(5695),i=a(2108),l=a(7383),d=a(4338),t=a(6628);function n(){let e=(0,r.useRouter)(),s=(0,r.useSearchParams)(),{data:a,status:n}=(0,i.useSession)(),o=s.get("contactId"),h=s.get("projectId"),m=s.get("projectStatus");return"loading"===n?(0,c.jsx)("div",{className:"profile-wrapper",children:(0,c.jsx)("div",{className:"container",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col-12",children:[(0,c.jsx)(d.A,{size:"lg",className:"py-8"}),(0,c.jsx)("p",{className:"text-center text-gray-600 mt-4",children:"Loading messages..."})]})})})}):"unauthenticated"===n?(0,c.jsx)("div",{className:"profile-wrapper",children:(0,c.jsx)("div",{className:"container",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsx)("div",{className:"col-12",children:(0,c.jsx)(t.A,{title:"Access Denied",description:"Please log in to view your messages.",errorCode:"401"})})})})}):(0,c.jsx)("div",{className:"profile-wrapper chat-wrapper",children:(0,c.jsx)("div",{className:"container",children:(0,c.jsxs)("div",{className:"row",children:[(0,c.jsxs)("div",{className:"col-12",children:[(0,c.jsx)("div",{className:"back-button",children:(0,c.jsxs)("button",{onClick:()=>e.push("/freelancer/my-projects?status=recommended"),className:"back-link",children:[(0,c.jsx)("img",{src:"/assets/image/back-arrow.svg",alt:"back to dashboard"}),"Back to Dashboard"]})}),(0,c.jsx)("div",{className:"page-title",children:(0,c.jsx)("h2",{children:"Message"})})]}),(0,c.jsx)("div",{className:"col-12",children:(0,c.jsx)(l.A,{preselectedContactId:o||void 0,projectId:h||void 0,projectStatus:m||void 0})})]})})})}a(3819)},9807:(e,s,a)=>{Promise.resolve().then(a.bind(a,8914))}},e=>{e.O(0,[1525,618,2108,6766,3204,8441,5964,7358],()=>e(e.s=9807)),_N_E=e.O()}]);