module.exports=[94799,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["default",0,function({children:a,fallback:d=null}){let[e,f]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{f(!0)},[]),e)?(0,b.jsx)(b.Fragment,{children:a}):(0,b.jsx)(b.Fragment,{children:d})}])},62701,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(96438),e=a.i(71133);a.s(["default",0,function({image:a="/images/error-state.svg",title:f="Something went wrong",description:g="We couldn't complete your request. Please try again or return to the home page.",buttonText:h="Return to Home",buttonHref:i="/",onClick:j,loading:k=!1,className:l,variant:m="page",retryText:n="Try again",onRetry:o}){let p=(0,c.usePathname)(),q="page"===m?p.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"===m?"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,b.jsx)("section",{className:`relative flex w-full items-center justify-center px-4 ${q} ${l??""}`,role:"status","aria-live":"polite",children:(0,b.jsxs)("div",{className:"mx-auto w-full max-w-2xl text-center",children:[(0,b.jsx)("div",{className:"mb-6 flex justify-center sm:mb-8",children:(0,b.jsx)(e.default,{src:a,alt:"","aria-hidden":"true",width:280,height:280,priority:"page"===m,className:`h-auto ${"page"===m?"w-40 sm:w-48 md:w-56 lg:w-64 xl:w-72":"w-24 sm:w-28 md:w-32"}`})}),(0,b.jsx)("h2",{className:`mt-4 font-heading font-medium capitalize leading-tight text-heading ${"page"===m?"text-2xl lg:text-3xl 2xl:text-4xl 2xl:leading-11":"section"===m?"text-xl md:text-2xl":"text-lg md:text-xl"}`,children:f}),(0,b.jsx)("p",{className:`mx-auto mt-4 text-text md:mt-5 ${"page"===m?"text-base sm:text-lg 2xl:text-lg 2xl:leading-7":"text-sm md:text-base"}`,children:g}),(o||h)&&(0,b.jsxs)("div",{className:"mt-8 flex flex-col justify-center gap-3 sm:flex-row",children:[o&&(0,b.jsx)(d.default,{onClick:o,loading:k,className:"w-full sm:w-auto",buttonClassName:"w-full min-w-0 sm:min-w-[180px]",children:n}),h&&(0,b.jsx)(d.default,{href:i,onClick:j,className:"w-full sm:w-auto",buttonClassName:"w-full min-w-0 sm:min-w-[180px]",children:h})]})]})})}])},61719,a=>{"use strict";var b=a.i(72131);let c={page:1,limit:10,searchQuery:"",sortBy:void 0,sortDirection:void 0};a.s(["useAppPagination",0,function({initialState:a}={}){let[d,e]=(0,b.useState)({...c,...a}),f=(0,b.useMemo)(()=>d.sortBy?[{id:d.sortBy,desc:"desc"===d.sortDirection}]:[],[d.sortBy,d.sortDirection]),g=(0,b.useCallback)(a=>{let b=a[0];e(a=>({...a,sortBy:b?.id,sortDirection:b?b.desc?"desc":"asc":void 0,page:1}))},[]);return{params:d,set:(a,b)=>{e(c=>({...c,[a]:b}))},patch:a=>{e(b=>({...b,...a}))},reset:()=>{e({...c,...a})},sortingConfig:(0,b.useMemo)(()=>({state:f,onChange:g}),[f,g])}}])},73220,a=>{"use strict";var b=a.i(87924);a.s(["TransactionStatusBadge",0,function({status:a}){let c={success:{label:"Success",color:"bg-success-light text-success"},failed:{label:"Failed",color:"bg-danger-light text-danger"},pending:{label:"Pending",color:"bg-yellow-100 text-yellow-700"},cancelled:{label:"Cancelled",color:"bg-red-100 text-red-700"}}[a];return(0,b.jsx)("span",{className:`inline-flex items-center rounded-full px-3 py-1 text-xs font-medium ${c?.color}`,children:c?.label})}])},65045,a=>{"use strict";a.s(["DASHBOARD_ENDPOINTS",0,{GET_TRANSACTION_HISTORY:"/payment-transactions/transactions",GET_CREDIT_HISTORY:"/wallet/transactions",GET_WALLET:"/wallet",GET_WALLET_SUMMARY:"/wallet/summary"}])},99135,65922,a=>{"use strict";var b=a.i(70025),c=a.i(11461),d=a.i(1059),e=a.i(72171),f=a.i(56444);a.s(["default",0,function(){let{mutateAsync:a,isPending:g}=(0,b.useMutation)({mutationKey:["create-package-order"],mutationFn:async a=>(await (0,c.apiPost)(d.PACKAGES_ENDPOINTS.PACKAGE_ORDER,{packageUuid:a.packageId})).data,onSuccess:()=>{(0,e.successToast)(f.SUCCESS_MESSAGES.CREATE_ORDER)},onError:a=>{(0,e.errorToast)(a?.response?.data?.message??"Something went wrong.")}});return{handleCreatePackageOrder:a,loading:g}}],99135);var g=a.i(33217),h=a.i(65045),i=a.i(7597),j=a.i(31889);a.s(["default",0,function(){let a=(0,i.useAppDispatch)(),{data:b,isPending:d,isError:e,error:f}=(0,g.useQuery)({queryKey:["credit-summary"],queryFn:async()=>{let b=await (0,c.apiGet)(h.DASHBOARD_ENDPOINTS.GET_WALLET_SUMMARY);return b?.data&&a((0,j.updateUser)({balance:b.data.availableCredits})),b.data},staleTime:3e4,refetchOnWindowFocus:!0});return{creditSummary:b,loading:d,error:e?f:null}}],65922)}];

//# sourceMappingURL=src_0x42d7x._.js.map