import{j as t,r as u,o as g,u as w,m as l,O as j}from"./vendor-CIGJ9g2q.js";import{c as i,B as o}from"./button-DVA8JUsJ.js";import{j as b,k as y,l as k,m as N,I as C,D as n}from"./ui-BeEpfTFY.js";import{c as f,T}from"./index-C-2a0Dur.js";import{u as D,S as z}from"./use-media-DozwHwmr.js";import{X as M}from"./x-BTIcV1Z9.js";import{S as _}from"./shopping-bag-Bz4mjJdB.js";import{U as I}from"./user-mg4Hsar6.js";/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const S=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],x=f("moon",S);/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],h=f("sun",P);function B({...e}){return t.jsx(b,{"data-slot":"dropdown-menu",...e})}function E({...e}){return t.jsx(y,{"data-slot":"dropdown-menu-trigger",...e})}function O({className:e,sideOffset:a=4,...s}){return t.jsx(k,{children:t.jsx(N,{"data-slot":"dropdown-menu-content",sideOffset:a,className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...s})})}function c({className:e,inset:a,variant:s="default",...d}){return t.jsx(C,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":s,className:i("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...d})}function A({...e}){return t.jsx(n.Root,{"data-slot":"drawer",...e})}function L({...e}){return t.jsx(n.Trigger,{"data-slot":"drawer-trigger",...e})}function R({...e}){return t.jsx(n.Portal,{"data-slot":"drawer-portal",...e})}function $({...e}){return t.jsx(n.Close,{"data-slot":"drawer-close",...e})}function U({className:e,...a}){return t.jsx(n.Overlay,{"data-slot":"drawer-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...a})}function q({className:e,children:a,...s}){return t.jsxs(R,{"data-slot":"drawer-portal",children:[t.jsx(U,{}),t.jsxs(n.Content,{"aria-describedby":void 0,"data-slot":"drawer-content",className:i("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...s,children:[t.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),a]})]})}function Q({className:e,...a}){return t.jsx(n.Title,{"data-slot":"drawer-title",className:i("text-foreground font-semibold",e),...a})}const W=()=>{const e=u.useContext(T);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function X(){const{setTheme:e}=W();return D("(min-width: 768px)")?t.jsx("div",{className:"flex items-center justify-center",children:t.jsxs(B,{children:[t.jsx(E,{asChild:!0,children:t.jsxs(o,{variant:"outline",size:"icon",children:[t.jsx(h,{className:"h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),t.jsx(x,{className:"absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"}),t.jsx("span",{className:"sr-only",children:"انتخاب تم"})]})}),t.jsxs(O,{children:[t.jsx(c,{onClick:()=>e("light"),children:"روشن"}),t.jsx(c,{onClick:()=>e("dark"),children:"تاریک"}),t.jsx(c,{onClick:()=>e("system"),children:"سیستم"})]})]})}):t.jsx("div",{className:"flex justify-center",children:t.jsxs(A,{children:[t.jsx(L,{asChild:!0,children:t.jsxs(o,{variant:"outline",size:"icon",children:[t.jsx(h,{className:"h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),t.jsx(x,{className:"absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"})]})}),t.jsx(Q,{hidden:!0}),t.jsx(q,{children:t.jsxs("div",{className:"grid gap-4 p-4",dir:"rtl",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium",children:"انتخاب تم"}),t.jsx($,{asChild:!0,children:t.jsx(o,{variant:"ghost",size:"icon",className:"h-8 w-8",children:t.jsx(M,{className:"h-5 w-5"})})})]}),t.jsxs("div",{className:"grid gap-2",children:[t.jsx(o,{variant:"ghost",className:"justify-start",onClick:()=>e("light"),children:"روشن"}),t.jsx(o,{variant:"ghost",className:"justify-start",onClick:()=>e("dark"),children:"تاریک"}),t.jsx(o,{variant:"ghost",className:"justify-start",onClick:()=>e("system"),children:"سیستم"})]})]})})]})})}function Z(){const e=g(),a=w(),[s,d]=u.useState(e.pathname);u.useEffect(()=>{d(e.pathname)},[e.pathname]);const p=[{name:"خرید سرویس",href:"/buy",icon:_},{name:"سرویس ها",href:"/services",icon:z},{name:"حساب",href:"/account",icon:I}],v=r=>{r!==e.pathname&&a(r)};return t.jsx("div",{className:"fixed bottom-6 left-0 right-0 z-50 flex justify-center font-vazir",children:t.jsx(l.div,{className:"mx-auto flex h-16 items-center justify-around gap-2 px-3 py-1 rounded-full shadow-lg",initial:{y:100,opacity:0},animate:{y:0,opacity:1},transition:{type:"spring",stiffness:260,damping:20},style:{width:"calc(100% - 32px)",maxWidth:"500px",background:"linear-gradient(135deg, rgba(32,32,32,0.9), rgba(12,12,12,0.9))",border:"1px solid rgba(255,255,255,0.08)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",boxShadow:"0 18px 24px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.4)"},children:p.map(r=>{const m=s===r.href;return t.jsxs(l.button,{onClick:()=>v(r.href),className:`relative flex h-full flex-1 flex-col items-center justify-center rounded-full px-3 py-1.5 transition-all ${m?"text-foreground font-semibold":"text-muted-foreground hover:text-foreground"}`,whileTap:{scale:.94},children:[m&&t.jsx(l.div,{layoutId:"activeTab",className:"absolute inset-0 rounded-full",style:{background:"linear-gradient(145deg, rgba(78,116,255,0.28), rgba(32,36,64,0.8))",boxShadow:"0 10px 20px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.2)"},transition:{type:"spring",stiffness:500,damping:30}}),t.jsx(r.icon,{className:"h-5 w-5"}),t.jsx("span",{className:"mt-1 text-[0.72rem] font-medium tracking-tight",children:r.name})]},r.name)})})})}function et(){return t.jsxs("div",{className:"flex min-h-screen flex-col bg-neutral-50 dark:bg-neutral-900",children:[t.jsx("div",{className:"flex items-center justify-center mt-3",children:t.jsx(X,{})}),t.jsx("main",{className:"flex-1",children:t.jsx(j,{})}),t.jsx(Z,{})]})}export{et as default};
