(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42060,e=>{"use strict";var t=e.i(43476),a=e.i(18566),i=e.i(59544),n=e.i(57688);e.s(["default",0,function({image:e="/images/error-state.svg",title:l="Something went wrong",description:o="We couldn't complete your request. Please try again or return to the home page.",buttonText:r="Return to Home",buttonHref:s="/",onClick:d,loading:c=!1,className:m,variant:u="page",retryText:x="Try again",onRetry:p}){let g=(0,a.usePathname)(),h="page"===u?g.includes("/admin")?"min-h-[calc(100vh-4rem)] lg:min-h-[calc(100vh-5rem)]":"pb-8 pt-36 md:pt-40 xl:pt-44 2xl:pt-48":"section"===u?"rounded-2xl glass-card-v2 px-6 py-10 md:px-8 md:py-12":"rounded-xl border border-[#E5DFFF] bg-white/70 px-4 py-5";return(0,t.jsx)("section",{className:`relative flex w-full items-center justify-center px-4 ${h} ${m??""}`,role:"status","aria-live":"polite",children:(0,t.jsxs)("div",{className:"mx-auto w-full max-w-2xl text-center",children:[(0,t.jsx)("div",{className:"mb-6 flex justify-center sm:mb-8",children:(0,t.jsx)(n.default,{src:e,alt:"","aria-hidden":"true",width:280,height:280,priority:"page"===u,className:`h-auto ${"page"===u?"w-40 sm:w-48 md:w-56 lg:w-64 xl:w-72":"w-24 sm:w-28 md:w-32"}`})}),(0,t.jsx)("h2",{className:`mt-4 font-heading font-medium capitalize leading-tight text-heading ${"page"===u?"text-2xl lg:text-3xl 2xl:text-4xl 2xl:leading-11":"section"===u?"text-xl md:text-2xl":"text-lg md:text-xl"}`,children:l}),(0,t.jsx)("p",{className:`mx-auto mt-4 text-text md:mt-5 ${"page"===u?"text-base sm:text-lg 2xl:text-lg 2xl:leading-7":"text-sm md:text-base"}`,children:o}),(p||r)&&(0,t.jsxs)("div",{className:"mt-8 flex flex-col justify-center gap-3 sm:flex-row",children:[p&&(0,t.jsx)(i.default,{onClick:p,loading:c,className:"w-full sm:w-auto",buttonClassName:"w-full min-w-0 sm:min-w-[180px]",children:x}),r&&(0,t.jsx)(i.default,{href:s,onClick:d,className:"w-full sm:w-auto",buttonClassName:"w-full min-w-0 sm:min-w-[180px]",children:r})]})]})})}])},78700,e=>{"use strict";var t=e.i(71645);let a={page:1,limit:10,searchQuery:"",sortBy:void 0,sortDirection:void 0};e.s(["useAppPagination",0,function({initialState:e}={}){let[i,n]=(0,t.useState)({...a,...e}),l=(0,t.useMemo)(()=>i.sortBy?[{id:i.sortBy,desc:"desc"===i.sortDirection}]:[],[i.sortBy,i.sortDirection]),o=(0,t.useCallback)(e=>{let t=e[0];n(e=>({...e,sortBy:t?.id,sortDirection:t?t.desc?"desc":"asc":void 0,page:1}))},[]);return{params:i,set:(e,t)=>{n(a=>({...a,[e]:t}))},patch:e=>{n(t=>({...t,...e}))},reset:()=>{n({...a,...e})},sortingConfig:(0,t.useMemo)(()=>({state:l,onChange:o}),[l,o])}}])},92408,e=>{"use strict";var t=e.i(43476);e.s(["HeadingToolbar",0,function({title:e,subTitle:a,titleClassName:i="",subTitleClassName:n=""}){return(0,t.jsxs)("div",{children:[e&&(0,t.jsx)("div",{className:`
            font-body text-base lg:text-lg xl:text-xl 2xl:text-2xl font-semibold xl:leading-8.5 text-heading
            ${i}
          `,children:e}),a&&(0,t.jsx)("p",{className:`
            2xl:mt-0.5 font-body text-sm 2xl:text-base font-normal text-text
            ${n}
          `,children:a})]})}])},93595,e=>{"use strict";var t=e.i(43476),a=e.i(71645),i=e.i(4399),n=e.i(78700),l=e.i(92408),o=e.i(19273),r=e.i(66027),s=e.i(42592),d=e.i(71036),c=e.i(74080),m=e.i(73665),u=e.i(71505);function x({contact:e}){let[i,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)({top:0,left:0,origin:"top"}),r=(0,a.useRef)(null),s=(0,a.useRef)(null),{openModal:d}=(0,u.useModal)(),p=(0,a.useCallback)(()=>{let e=r.current;if(!e)return;let t=e.getBoundingClientRect(),a=window.innerHeight-t.bottom,i=t.top,n=a<96&&i>a,l=n?Math.max(12,t.top-88-8):Math.min(t.bottom+8,window.innerHeight-88-12),s=t.right-160;o({top:l,left:s=Math.min(s=Math.max(12,s),window.innerWidth-160-12),origin:n?"bottom":"top"})},[]);return(0,a.useEffect)(()=>{if(!i)return;let e=e=>{let t=e.target;r.current?.contains(t)||s.current?.contains(t)||n(!1)},t=e=>{"Escape"===e.key&&n(!1)};return window.addEventListener("resize",p),window.addEventListener("scroll",p,!0),document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0),document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[i,p]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{ref:r,type:"button",onClick:e=>{e.stopPropagation(),p(),n(e=>!e)},"aria-label":`Actions for ${e.name}`,className:"inline-flex h-8 w-8 items-center justify-center rounded-full text-link-1 transition hover:bg-link-1/10 focus:outline-none focus:ring-2 focus:ring-link-1/30",children:(0,t.jsx)(m.MdMoreVert,{size:20})}),i&&"u">typeof document&&(0,c.createPortal)((0,t.jsx)("div",{ref:s,role:"menu",style:{top:l.top,left:l.left,width:160,transformOrigin:"top"===l.origin?"top right":"bottom right"},className:"fixed z-60 overflow-hidden rounded-xl border border-black/5 bg-white py-1.5 shadow-[0_12px_40px_rgba(15,23,42,0.18)] ring-1 ring-black/5",children:(0,t.jsx)("button",{type:"button",role:"menuitem",onClick:t=>{t.stopPropagation(),n(!1),d("CONTACT_REQUEST_INFO",{uuid:e.uuid})},className:"block w-full px-4 py-2.5 text-left text-sm font-medium text-slate-700 transition hover:bg-link-1/5",children:"View"})}),document.body)]})}let p=[{accessorKey:"name",header:"Name",cell:({row:e})=>(0,t.jsx)("span",{className:"font-medium text-slate-900",children:e.original.name})},{accessorKey:"email",header:"Email",cell:({row:e})=>(0,t.jsx)("span",{children:e.original.email})},{accessorKey:"phone",header:"Phone Number",cell:({row:e})=>(0,t.jsx)("span",{children:e.original.phone})},{id:"actions",header:"Action",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(x,{contact:e.original})}];var g=e.i(42060);e.s(["default",0,function(){let[e,c]=(0,a.useState)({}),m=(0,n.useAppPagination)(),{data:u,loading:x,error:h,isError:b}=function(e){let{data:t,isPending:a,isError:i,error:n}=(0,r.useQuery)({queryKey:["admin-contact-requests",e.params.page,e.params.limit,e.params.searchQuery,e.params.sortBy,e.params.sortDirection],queryFn:async()=>{let t={limit:e.params.limit,page:e.params.page,search:e.params.searchQuery,sortBy:e.params.sortBy,sortOrder:e?.params?.sortDirection?.toUpperCase()},a=await (0,s.apiGet)(d.ADMIN_CONTACTS.GET_CONTACT_REQUESTS,t);return{contacts:a.data.map(e=>({...e,name:`${e.firstName} ${e.lastName}`.trim(),phone:`${e.dialCode} ${e.phoneNumber}`.trim()})),pagination:a.meta}},staleTime:12e4,placeholderData:o.keepPreviousData,retry:!1});return{data:t,loading:a,error:n,isError:i}}(m),f=u?.contacts??[],w=u?.pagination;return(0,t.jsx)("section",{className:"w-full p-4 pt-6 2xl:pt-8 2xl:p-8",children:b?(0,t.jsx)(g.default,{variant:"section",title:"Unable to load contact requests",description:"The contact requests table failed to load. Please try again.",onRetry:()=>m.patch({}),buttonText:""}):(0,t.jsx)(i.DataTable,{data:f,loading:x,columns:p,appearance:"default",size:"md",getRowId:e=>e.uuid,rowSelection:e,sorting:m.sortingConfig,onRowSelectionChange:c,onSelectedRowsChange:e=>{},toolbar:(0,t.jsx)(l.HeadingToolbar,{title:"Contact Requests",subTitle:`${f.length} Contact Request(s) listed`,titleClassName:"",subTitleClassName:""}),classNames:{root:"",toolbar:"flex items-center gap-3",filters:"flex items-center gap-2",table:"min-w-full",tableThead:"bg-slate-100 border-t-2 border-slate-400  relative",tableTheadRow:"whitespace-nowrap",tableTheadCell:"px-3 py-2 2xl:p-3 text-left font-body text-sm 2xl:text-base font-medium text-heading relative",tableTbody:"border-t border-slate-300/50 relative",tableTbodyRow:`
              hover:bg-link-1/10 transition-colors
              [&>td]:border-b [&>td]:border-gray-200
            `,tableTbodyCell:"py-2 px-3 font-body text-[13px] 2xl:text-sm text-table-text relative",pagination:""},pagination:{controller:m,pageCount:w?.totalPages,totalItems:w?.total}})})}],93595)}]);