module.exports=[249590,206556,a=>{"use strict";var b=a.i(187924),c=a.i(355232),d=a.i(869133),e=a.i(571987),f=a.i(819721),g=a.i(410148);let h=(0,f.default)(()=>a.A(352563),{loadableGenerated:{modules:[959999]}});a.s(["Empty",0,({text:a,imagePath:f,description:i,animated:j=!0,smallText:k})=>{let l=(0,c.useT)();return(0,b.jsx)("div",{className:"flex justify-center py-4",children:(0,b.jsxs)("div",{className:"max-w-2xl flex flex-col items-center gap-3",children:[j?(0,b.jsx)(h,{animationData:d.default}):(0,b.jsx)(e.default,{src:f||"/img/empty_salon.png",alt:"empty_cart",className:"max-w-[400px]",width:300,height:400}),(0,b.jsx)("p",{className:(0,g.default)("font-semibold text-center",k?"text-xl":"text-4xl"),children:l(a||"there.is.no.items")}),!!i&&(0,b.jsx)("span",{className:"text-lg",children:l(i)})]})})}],206556),a.s([],249590)},205107,a=>{"use strict";var b=a.i(75708),c=a.i(993209),d=a.i(395940);a.i(353010);var e=a.i(774412);a.s(["infoService",0,{terms:a=>(0,b.default)((0,c.buildUrlQueryParams)("v1/rest/term",a),{redirectOnError:!0,cache:"no-cache"}),privacy:a=>(0,b.default)((0,c.buildUrlQueryParams)("v1/rest/policy",a),{redirectOnError:!0}),faq:a=>(0,b.default)((0,c.buildUrlQueryParams)("v1/rest/faqs/paginate",a),{cache:"no-cache"}),referrals:a=>fetch(`${e.BASE_URL}${(0,c.buildUrlQueryParams)("v1/rest/referral",a)}`,{headers:{"Content-Type":"application/json",Authorization:(0,d.getCookie)("token"),METHOD:"GET"}}).then(a=>a.json()).catch(a=>a),getPages:a=>(0,b.default)((0,c.buildUrlQueryParams)("v1/rest/pages/paginate",a)),careerList:a=>(0,b.default)((0,c.buildUrlQueryParams)("v1/rest/careers/paginate",a)),getCareer:(a,d)=>(0,b.default)((0,c.buildUrlQueryParams)(`v1/rest/careers/${a}`,d))}])},344995,a=>{"use strict";var b=a.i(187924),c=a.i(653542),d=a.i(205107),e=a.i(571987),f=a.i(116592),g=a.i(602932);a.i(802407);var h=a.i(778134);a.i(141510);var i=a.i(830848);a.i(274306);var j=a.i(746053);a.i(224155);var k=a.i(362622),l=a.i(238246),m=a.i(846997);a.i(249590);var n=a.i(206556);a.s(["default",0,()=>{let{t:a}=(0,h.useTranslation)(),{language:o,currency:p}=(0,m.useSettings)(),q=(0,g.default)(a=>a.user),{data:r}=(0,c.useQuery)({queryKey:["profile"],queryFn:()=>f.userService.profile(),staleTime:0,refetchOnWindowFocus:!0,enabled:!!q}),{data:s,isLoading:t}=(0,c.useQuery)(["referrals",o?.locale,p?.id],()=>d.infoService.referrals({lang:o?.locale,currency_id:p?.id}),{suspense:!0,retry:!1}),u=async()=>{if(!q)return void(0,k.warning)(a("login.first"));try{await navigator.clipboard.writeText(q?.my_referral||""),(0,k.success)(a("copied"))}catch(a){(0,k.error)("کپی انجام نشد!")}},v=async()=>{if(!q)return void(0,k.warning)(a("login.first"));try{await navigator.clipboard.writeText(`http://localhost:4002//sign-up?referral_code=${q?.my_referral}`),(0,k.success)(a("copied"))}catch(a){(0,k.error)("کپی انجام نشد!")}};return t||s?.data?(0,b.jsxs)("div",{className:"grid sm:grid-cols-2 gap-7",children:[(0,b.jsx)("div",{className:"relative h-96 w-full",children:(0,b.jsx)(e.default,{src:s?.data?.img||"",alt:s?.data?.translation?.title||"referral",className:"rounded-xl object-cover",fill:!0})}),(0,b.jsxs)("div",{className:"flex flex-col justify-between gap-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-3xl font-semibold",children:s?.data?.translation?.title}),(0,b.jsxs)("p",{className:"text-sm mt-2",children:[s?.data?.translation?.description," ",(0,b.jsx)(l.default,{className:"underline",href:"/referral-terms",children:a("referral.terms")})]}),(0,b.jsx)("div",{className:"h-px bg-gray-inputBorder w-full my-4"}),(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("span",{className:"text-base font-medium",children:[a("balance"),": ",(0,b.jsx)(i.Price,{number:r?.data?.referral_from_topup_price})]}),(0,b.jsxs)("span",{className:"text-base font-medium",children:[a("referrals"),": ",(0,b.jsx)(i.Price,{number:r?.data?.referral_from_topup_count})]})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsx)(j.Button,{onClick:u,fullWidth:!0,children:a("share")}),(0,b.jsx)(j.Button,{onClick:v,fullWidth:!0,color:"blackOutlined",children:a("copy.code")})]})]})]}):(0,b.jsx)(n.Empty,{text:"no.referrals.found",animated:!1})}])},352563,a=>{a.v(b=>Promise.all(["server/chunks/ssr/components_animated-content_index_ts_dc1b2cd7._.js","server/chunks/ssr/_3cb9e5fb._.js"].map(b=>a.l(b))).then(()=>b(292741)))}];

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