"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[774],{2950:(e,t,s)=>{s.d(t,{E:()=>i,PointsNotificationProvider:()=>r});var l=s(95155),a=s(12115);let n=(0,a.createContext)(void 0);function r(e){let{children:t}=e,[s,r]=(0,a.useState)([]),[i]=(0,a.useState)(()=>"undefined"!=typeof Audio?new Audio("/sounds/notification.mp3"):null),o=(0,a.useCallback)(e=>{let t="notification-".concat(Date.now(),"-").concat(Math.random()),s={id:t,points:e};r(e=>[...e,s]),i&&(i.currentTime=0,i.play().catch(e=>console.log("Audio playback failed:",e))),setTimeout(()=>{r(e=>e.filter(e=>e.id!==t))},3200)},[i]),d=(0,a.useCallback)(e=>{r(t=>t.filter(t=>t.id!==e))},[]);return(0,a.useEffect)(()=>{let e=e=>{let t=e.detail;t&&"number"==typeof t.points&&o(t.points)};return window.addEventListener("newPoints",e),()=>window.removeEventListener("newPoints",e)},[o]),(0,l.jsx)(n.Provider,{value:{notifications:s,showPointsNotification:o,dismissNotification:d},children:t})}function i(){let e=(0,a.useContext)(n);if(!e)throw Error("usePointsNotification must be used within PointsNotificationProvider");return e}},10774:(e,t,s)=>{s.d(t,{U:()=>I});var l=s(95155),a=s(12115),n=s(52619),r=s.n(n),i=s(36489),o=s(20508),d=s(1733),c=s(2950);function u(e){let{direction:t="down"}=e,{notifications:s}=(0,c.E)();if(0===s.length)return null;let a="down"===t,n=a?"absolute top-12 left-1/2 -translate-x-1/2 z-[100] pointer-events-none":"absolute bottom-10 left-1/2 -translate-x-1/2 z-[100] pointer-events-none",r=a?"animate-float-down-fade":"animate-float-up-fade";return(0,l.jsx)(l.Fragment,{children:s.map((e,t)=>{let{id:s,points:a}=e,i=a>=0,o=(e=>{let t=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"];return Math.abs(e).toString().replace(/\d/g,e=>t[parseInt(e)])})(a),c="".concat(o).concat(i?"+":"-");return(0,l.jsx)("div",{className:n,style:{animationDelay:"".concat(150*t,"ms")},children:(0,l.jsxs)("div",{className:"relative w-14 h-14 ".concat(r," overflow-visible"),children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-[#FFA515] rounded-full shadow-[0_4px_15px_rgba(255,165,21,0.4)] border-2 border-white/20"}),(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-2.5 overflow-visible",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 57.26 52.41",className:"w-full h-full text-black overflow-visible",children:(0,l.jsxs)(d.P.g,{animate:i?{y:a>=4?[0,0,0,0,-14,0,-8,0]:[0,0,0,0,-6,0,-4,0],rotate:[0,0,0,0,-5,5,-3,0]}:{x:[0,0,0,0,-4,4,-4,4,-2,2,0]},transition:{duration:2.5,times:i?[0,.2,.5,.7,.75,.8,.85,.9]:[0,.2,.5,.7,.73,.76,.79,.82,.85,.88,.9],ease:"easeInOut"},style:{originX:"28.63px",originY:"26.2px"},children:[(0,l.jsx)("path",{d:"M57.26,7.61v37.2a7.6,7.6,0,0,1-7.6,7.6H7.6A7.6,7.6,0,0,1,0,44.81V7.66A7.6,7.6,0,0,1,11.09.91l14,7.23a7.61,7.61,0,0,0,7,0L46.18.85A7.6,7.6,0,0,1,57.26,7.61Z",fill:"currentColor"}),(0,l.jsx)(d.P.ellipse,{cx:"19.04",cy:"30.22",rx:"7.44",ry:"2.29",fill:"#ffffff",animate:{rx:[7.44,7.2,7.2,7.2,7.2],ry:[2.29,7.2,7.2,7.2,7.2],x:[0,6,6,0,0],y:[0,-8,-8,0,0]},transition:{duration:2.5,times:[0,.2,.5,.7,1],ease:"easeInOut"},style:{originX:"19.04px",originY:"30.22px"}}),(0,l.jsx)(d.P.rect,{x:"11",y:"22",width:"16",height:"0",fill:"currentColor",animate:a>=4?{height:[0,0,0,12,12,12,12],x:[0,6,6,6,0,0,0],y:[0,-8,7.42,.22,8.22,8.22,8.22]}:i?{height:[0,0,0,0,16,0,0],x:[0,6,6,0,0,0,0],y:[0,-8,-8,0,0,0,0]}:{height:[0,0,0,8,8,8,8],x:[0,6,6,6,0,0,0],y:[0,-8,-8,-8,0,0,0]},transition:{duration:2.5,times:a>=4?[0,.2,.45,.5,.7,.85,1]:i?[0,.2,.5,.7,.75,.85,1]:[0,.2,.45,.5,.7,.85,1],ease:"easeInOut"}}),(0,l.jsx)(d.P.circle,{cx:"39.48",cy:"30.22",r:"6.18",fill:"#ffffff",animate:{r:[6.18,7.2,7.2,7.2,7.2],x:[0,6,6,0,0],y:[0,-8,-8,0,0]},transition:{duration:2.5,times:[0,.2,.5,.7,1],ease:"easeInOut"},style:{originX:"39.48px",originY:"30.22px"}}),(0,l.jsx)(d.P.rect,{x:"32",y:"22",width:"16",height:"0",fill:"currentColor",animate:a>=4?{height:[0,0,0,12,12,12,12],x:[0,6,6,6,0,0,0],y:[0,-8,7.42,.22,8.22,8.22,8.22]}:i?{height:[0,0,0,0,16,0,0],x:[0,6,6,0,0,0,0],y:[0,-8,-8,0,0,0,0]}:{height:[0,0,0,8,8,8,8],x:[0,6,6,6,0,0,0],y:[0,-8,-8,-8,0,0,0]},transition:{duration:2.5,times:a>=4?[0,.2,.45,.5,.7,.85,1]:i?[0,.2,.5,.7,.75,.85,1]:[0,.2,.45,.5,.7,.85,1],ease:"easeInOut"}})]})})}),(0,l.jsx)("div",{className:"absolute -top-5 -right-1.5 bg-white rounded-full px-2 py-1 shadow-md border border-gray-100 min-w-[28px] flex items-center justify-center",children:(0,l.jsx)("span",{className:"text-[20px] font-black leading-none ".concat(i?"text-emerald-600":"text-rose-600"),children:c})}),(0,l.jsx)("div",{className:"absolute inset-0 bg-[#FFA515] rounded-full blur-md opacity-30 -z-10"})]})},s)})})}var x=s(20063),m=s(27063),h=s(3998),f=s(3216);let v={activeBookings:0,totalPoints:0,level:"BEGINNER",levelLabel:"سطح ۱",levelIcon:"\uD83C\uDF31",coins:0,referralCode:null,referralCount:0,uniqueCafesCount:0,uniqueGamesCount:0,playmasterCount:0,playmateCount:0,name:null,username:null,avatar:null,archetype:null,awardedBadgeKeys:[],achievements:(0,f.AT)({})};var b=s(16481),j=s(96093),p=s(6490),g=s(51950),w=s(73618),N=s(95740),y=s(52056),k=s(89559),C=s(48055),A=s(6613),E=s(30814),P=s(90368),S=s(59384);function B(e){var t,s,n,r,d,c,u,B,I;let{open:q,onOpenChange:O,className:_=""}=e,F=(0,x.useRouter)(),L=(0,x.usePathname)(),{data:M}=(0,i.useSession)(),{stats:T,loading:z,error:D,refetch:G}=function(){let{data:e}=(0,i.useSession)(),[t,s]=(0,a.useState)(v),[l,n]=(0,a.useState)(!0),[r,o]=(0,a.useState)(null),d=(0,a.useCallback)(async()=>{if(!(null==e?void 0:e.user)){s(v),n(!1),o(null);return}try{var t,l,a,r,i,d,c,u,x,m,h,b,j,p,g,w,N,y,k,C,A,E,P,S,B,I,q,O,_;n(!0),o(null);let v=await fetch("/api/user/profile",{method:"GET",headers:{"Content-Type":"application/json"}});if(!v.ok)throw Error("Profile request failed with status ".concat(v.status));let F=await v.json(),L=null==F?void 0:F.data,M=null==F?void 0:F.profile,T=(null==L?void 0:L.user)||(null==M?void 0:M.user),z=(null==L?void 0:L.points)||(null==M?void 0:M.points),D=null!=(d=null!=(i=null==L?void 0:L.activeBookings)?i:null==M||null==(t=M.user)?void 0:t.activeBookings)?d:0,G=null!=(u=null!=(c=null==z?void 0:z.totalPoints)?c:null==(l=e.user)?void 0:l.points)?u:0,R=null!=(x=null==z?void 0:z.currentLevel)?x:"BEGINNER",$=null!=(m=null==z?void 0:z.levelDisplayName)?m:"سطح ۱",K=null!=(h=null==z?void 0:z.currentLevelIcon)?h:"\uD83C\uDF31",X=null!=(b=null==T?void 0:T.coins)?b:0,Y=null!=(j=null==T?void 0:T.referralCode)?j:null,U=null!=(p=null==T?void 0:T.referralCount)?p:0,V=null!=(g=null==T?void 0:T.uniqueCafesCount)?g:0,W=null!=(w=null==T?void 0:T.uniqueGamesCount)?w:0,H=null!=(y=null!=(N=null==T?void 0:T.playmasterCount)?N:null==L?void 0:L.playmasterCount)?y:0,Q=null!=(C=null!=(k=null==T?void 0:T.playmateCount)?k:null==L?void 0:L.playmateCount)?C:0,Z=null!=(A=null==T?void 0:T.awardedBadgeKeys)?A:[],J=null!=(P=null!=(E=null==T?void 0:T.name)?E:e.user.name)?P:null,ee=null!=(B=null!=(S=null==T?void 0:T.username)?S:null==(a=e.user)?void 0:a.username)?B:null,et=null!=(q=null!=(I=null==T?void 0:T.avatar)?I:e.user.image)?q:null,es=null!=(_=null!=(O=null==T?void 0:T.archetype)?O:null==(r=e.user)?void 0:r.archetype)?_:null,el=(0,f.AT)({username:ee,referralCount:U,uniqueCafesCount:V,uniqueGamesCount:W,playmasterCount:H,playmateCount:Q,coins:X,currentStreakWeeks:0,distinctArchetypesCount:0,awardedBadgeKeys:Z});s({activeBookings:D,totalPoints:G,level:R,levelLabel:$,levelIcon:K,coins:X,referralCode:Y,referralCount:U,uniqueCafesCount:V,uniqueGamesCount:W,playmasterCount:H,playmateCount:Q,name:J,username:ee,avatar:et,archetype:es,awardedBadgeKeys:Z,achievements:el})}catch(e){console.error("Error fetching user stats:",e),o("خطا در دریافت اطلاعات کاربر")}finally{n(!1)}},[null==e?void 0:e.user]);return(0,a.useEffect)(()=>{d()},[d]),{stats:t,loading:l,error:r,refetch:d}}(),[R,$]=(0,a.useState)("summary"),[K,X]=(0,a.useState)(!1),[Y,U]=(0,a.useState)(!1);(0,a.useEffect)(()=>{q||$("summary")},[q]);let V=()=>{O(!1),"/dashboard"!==L&&F.push("/dashboard")},W=T.archetype||(null==M||null==(t=M.user)?void 0:t.archetype),H=W?p.aK[W]:void 0,Q=W?(0,j.i0)(W):T.avatar||(null==M||null==(s=M.user)?void 0:s.image),Z=T.name||(null==M||null==(n=M.user)?void 0:n.name)||"همبازی عزیز",J=T.username||(null==M||null==(r=M.user)?void 0:r.username),ee=(null==(d=T.achievements)?void 0:d.totalBadgesCount)||0,et=(null==(c=T.achievements)?void 0:c.earnedBadgesCount)||0,es=ee>0?Math.round(et/ee*100):0,el=null==(B=T.achievements)||null==(u=B.shadowBadges)?void 0:u[0];return(0,l.jsxs)(m.cj,{open:q,onOpenChange:e=>{e||$("summary"),O(e)},children:[(0,l.jsx)(m.h,{side:"bottom","data-testid":"quick-achievements-sheet-content",className:"max-h-[92vh] overflow-y-auto overflow-x-hidden no-scrollbar [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden bg-slate-950 border-t border-amber-500/40 text-white rounded-t-3xl p-4 sm:p-7 shadow-2xl backdrop-blur-2xl w-full max-w-full font-vazir font-farsi ".concat(_),children:"full"===R?(0,l.jsx)(b.h,{user:T,onBack:()=>$("summary")}):(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)(m.Fm,{className:"text-right space-y-1 pb-2 border-b border-white/10",children:(0,l.jsx)("div",{className:"flex items-center justify-between",children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"w-8 h-8 rounded-xl bg-amber-500/20 border border-amber-500/30 flex items-center justify-center text-amber-400",children:(0,l.jsx)(N.A,{className:"w-4 h-4"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)(m.qp,{className:"text-base sm:text-lg font-black text-white",children:"شناسنامه و افتخارات همبازی"}),(0,l.jsx)(m.Qs,{className:"text-xs text-slate-400",children:"خلاصه وضعیت پیشرفت شما"})]})]})})}),z?(0,l.jsxs)("div",{"data-testid":"quick-sheet-loading",className:"space-y-4 animate-pulse",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3.5 p-3.5 bg-slate-900/60 rounded-2xl border border-white/5",children:[(0,l.jsx)("div",{className:"w-14 h-14 rounded-full bg-slate-800"}),(0,l.jsxs)("div",{className:"space-y-2 flex-1",children:[(0,l.jsx)("div",{className:"h-4 w-32 bg-slate-800 rounded-md"}),(0,l.jsx)("div",{className:"h-3 w-24 bg-slate-800/60 rounded-md"})]})]}),(0,l.jsx)("div",{className:"h-20 bg-slate-900/60 rounded-2xl border border-white/5"}),(0,l.jsx)("div",{className:"h-28 bg-slate-900/60 rounded-2xl border border-white/5"}),(0,l.jsx)("div",{className:"h-12 bg-slate-900/60 rounded-xl"})]}):D?(0,l.jsxs)("div",{"data-testid":"quick-sheet-error",className:"p-5 bg-rose-950/20 border border-rose-500/30 rounded-2xl text-center space-y-4",children:[(0,l.jsx)("div",{className:"w-12 h-12 mx-auto rounded-full bg-rose-500/10 border border-rose-500/20 flex items-center justify-center text-rose-400",children:(0,l.jsx)(y.A,{className:"w-6 h-6"})}),(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("p",{className:"text-sm font-bold text-rose-200",children:"خطا در دریافت اطلاعات افتخارات"}),(0,l.jsx)("p",{className:"text-xs text-slate-400",children:"ارتباط با سرور برقرار نشد. لطفاً دوباره تلاش کنید."})]}),(0,l.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,l.jsxs)(h.$,{onClick:()=>G(),"data-testid":"quick-sheet-retry-btn",className:"bg-rose-500 hover:bg-rose-600 text-white font-bold rounded-xl h-10 px-4 text-xs flex items-center gap-2",children:[(0,l.jsx)(k.A,{className:"w-3.5 h-3.5"}),(0,l.jsx)("span",{children:"تلاش مجدد"})]}),(0,l.jsx)(h.$,{variant:"outline",onClick:V,className:"border-white/10 hover:bg-slate-900 text-slate-300 rounded-xl h-10 px-4 text-xs",children:"ورود به داشبورد"})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-3.5 p-3.5 bg-gradient-to-r from-slate-900/90 to-slate-900/50 border border-white/10 rounded-2xl shadow-lg",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3.5 min-w-0",children:[(0,l.jsx)("div",{className:"relative flex items-center justify-center w-14 h-14 rounded-full bg-gradient-to-tr from-amber-500 via-violet-600 to-indigo-600 p-[2px] shadow-md shrink-0",children:(0,l.jsx)("div",{className:"w-full h-full rounded-full bg-slate-950 flex items-center justify-center overflow-hidden",children:Q&&!K?(0,l.jsx)("img",{src:Q,alt:"آواتار کاربر",className:"w-full h-full object-cover rounded-full",onError:()=>X(!0)}):(0,l.jsx)("div",{className:"w-full h-full rounded-full bg-violet-950/60 text-violet-400 flex items-center justify-center",children:(0,l.jsx)(o.A,{className:"w-6 h-6"})})})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("div",{className:"text-sm sm:text-base font-black text-white truncate",children:Z}),J?(0,l.jsxs)("div",{className:"text-xs text-amber-400/90 font-mono dir-ltr text-right truncate",children:["@",J]}):(0,l.jsx)("button",{type:"button",onClick:()=>U(!0),"data-testid":"choose-username-btn",className:"text-xs text-amber-400 hover:text-amber-300 font-bold transition-colors flex items-center gap-1 cursor-pointer",children:(0,l.jsx)("span",{children:"انتخاب نام کاربری"})})]})]}),(0,l.jsxs)("div",{className:"px-3 py-1.5 bg-violet-950/50 border border-violet-500/30 rounded-xl shrink-0 text-center",children:[(0,l.jsx)("div",{className:"text-[10px] text-violet-300/80 font-medium",children:"کهن‌الگو"}),(0,l.jsx)("div",{className:"text-xs font-black text-violet-200",children:(null==H?void 0:H.title)||T.levelLabel})]})]}),(0,l.jsx)("div",{className:"flex items-center justify-between gap-3 p-4 bg-gradient-to-r from-amber-500/15 via-amber-500/10 to-yellow-500/10 border border-amber-500/30 rounded-2xl shadow-md shadow-amber-500/10",children:(0,l.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,l.jsx)("div",{className:"w-10 h-10 rounded-xl bg-amber-500/20 border border-amber-500/40 flex items-center justify-center text-amber-400 shrink-0",children:(0,l.jsx)(C.A,{className:"w-5 h-5 animate-bounce"})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"text-sm sm:text-base font-black text-amber-300",children:[(0,g.ub)(T.coins)," سکه طلا"]}),(0,l.jsx)("div",{className:"text-[11px] text-amber-400/80 truncate",children:"اعتبار ورود به رویدادهای VIP و بازی‌های ویژه"})]})]})}),(0,l.jsxs)("div",{className:"p-4 bg-slate-900/60 border border-white/5 rounded-2xl space-y-3.5",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(A.A,{className:"w-4 h-4 text-amber-400"}),(0,l.jsx)("span",{className:"text-xs sm:text-sm font-bold text-white",children:"مدال‌های افتخار کلاب"})]}),(0,l.jsxs)("span",{className:"text-xs font-bold text-amber-400 font-vazir",children:[(0,g.ub)(et)," از ",(0,g.ub)(ee)," نشان"]})]}),(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("div",{className:"w-full h-2.5 bg-slate-800 rounded-full overflow-hidden p-[2px]",children:(0,l.jsx)("div",{className:"h-full bg-gradient-to-r from-amber-500 to-orange-500 rounded-full transition-all duration-500",style:{width:"".concat(es,"%")}})}),(0,l.jsxs)("div",{className:"flex justify-between text-[10px] text-slate-400",children:[(0,l.jsx)("span",{children:"پیشرفت کل"}),(0,l.jsxs)("span",{children:[(0,g.ub)(es),"٪"]})]})]}),(null==(I=T.achievements)?void 0:I.earnedBadges)&&T.achievements.earnedBadges.length>0?(0,l.jsx)("div",{className:"flex flex-wrap gap-2 pt-1",children:T.achievements.earnedBadges.slice(0,4).map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 bg-amber-500/10 border border-amber-500/20 rounded-lg text-[11px] text-amber-200",children:[(0,l.jsx)("span",{children:e.icon}),(0,l.jsx)("span",{className:"font-bold",children:e.title})]},e.key))}):(0,l.jsx)("p",{className:"text-[11px] text-slate-400",children:"هنوز مدالی ثبت نشده؛ با تکمیل پروفایل یا بازی اولین مدال را کسب کن!"}),el&&(0,l.jsxs)("div",{className:"p-2.5 bg-slate-950/60 border border-amber-500/20 rounded-xl flex items-center justify-between gap-2 mt-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,l.jsx)(E.A,{className:"w-4 h-4 text-amber-400 shrink-0"}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("span",{className:"text-[11px] font-bold text-slate-200 block truncate",children:["هدف بعدی: ",el.title]}),(0,l.jsx)("span",{className:"text-[10px] text-slate-400 block truncate",children:el.description})]})]}),(0,l.jsx)("div",{className:"text-left shrink-0",children:(0,l.jsxs)("span",{className:"text-xs font-black text-amber-400",children:[(0,g.ub)(el.current),"/",(0,g.ub)(el.target)]})})]})]}),(0,l.jsxs)("div",{className:"space-y-2.5 pt-2",children:[(0,l.jsxs)(h.$,{onClick:()=>$("full"),"data-testid":"view-full-achievements-btn",variant:"outline",className:"w-full h-11 bg-slate-900/80 hover:bg-slate-800 border-amber-500/30 text-amber-300 hover:text-amber-200 rounded-2xl text-xs sm:text-sm font-bold flex items-center justify-center gap-2 transition-all duration-300",children:[(0,l.jsx)(A.A,{className:"w-4 h-4 text-amber-400"}),(0,l.jsx)("span",{children:"مشاهده تابلوی کامل افتخارات"}),(0,l.jsx)(P.A,{className:"w-4 h-4 text-slate-400 mr-auto"})]}),(0,l.jsxs)(h.$,{onClick:V,"data-testid":"go-to-dashboard-btn",className:"w-full h-12 bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 text-slate-950 font-black rounded-2xl text-xs sm:text-sm flex items-center justify-center gap-2 shadow-lg shadow-amber-500/20 transition-all duration-300",children:[(0,l.jsx)(S.A,{className:"w-4 h-4"}),(0,l.jsx)("span",{children:"ورود به داشبورد"})]})]})]})]})}),(0,l.jsx)(w.s,{open:Y,onOpenChange:U,onSuccess:async()=>{await G()}})]})}function I(){var e,t;let{data:s}=(0,i.useSession)(),[n,d]=(0,a.useState)(!1),[c,x]=(0,a.useState)(!1),m=null==s||null==(e=s.user)?void 0:e.archetype,h=m?(0,j.i0)(m):null,f=(0,l.jsx)("div",{className:"w-full h-full rounded-full bg-white flex items-center justify-center overflow-hidden",children:h&&!n?(0,l.jsx)("img",{src:h,alt:"آرکیتایپ کاربر",className:"w-full h-full object-cover rounded-full",onError:()=>d(!0)}):(0,l.jsx)("div",{className:"w-full h-full rounded-full bg-violet-50 text-violet-600 flex items-center justify-center",children:(0,l.jsx)(o.A,{className:"w-5 h-5 sm:w-6 sm:h-6"})})}),v="relative flex items-center justify-center w-10 h-10 sm:w-11 sm:h-11 rounded-full bg-gradient-to-tr from-amber-500 via-violet-600 to-indigo-600 p-[2px] shadow-sm hover:shadow-md hover:scale-105 active:scale-95 transition-all duration-200 cursor-pointer";if(!(null==s?void 0:s.user))return(0,l.jsxs)("div",{className:"relative flex items-center",children:[(0,l.jsx)(r(),{href:"/auth/customer/signin",className:v,title:"حساب کاربری",children:f}),(0,l.jsx)(u,{})]});let b=null==(t=s.user)?void 0:t.role;return"ADMIN"===b||"SUPER_ADMIN"===b?(0,l.jsxs)("div",{className:"relative flex items-center",children:[(0,l.jsx)(r(),{href:"/admin-dashboard",className:v,title:"حساب کاربری",children:f}),(0,l.jsx)(u,{})]}):"CAFE_OWNER"===b?(0,l.jsxs)("div",{className:"relative flex items-center",children:[(0,l.jsx)(r(),{href:"/business-dashboard",className:v,title:"حساب کاربری",children:f}),(0,l.jsx)(u,{})]}):(0,l.jsxs)("div",{className:"relative flex items-center",children:[(0,l.jsx)("button",{type:"button",onClick:()=>x(!0),className:v,title:"حساب کاربری",children:f}),(0,l.jsx)(u,{}),(0,l.jsx)(B,{open:c,onOpenChange:x})]})}}}]);