2026-10-24 14:41:31 +03:30
|
|
|
import{n as e,o as t,t as n}from"./VuesaxIcon-B2OgulS6.js";import{At as ee,Bt as r,Ct as i,It as a,Lt as o,Mt as s,Nt as c,Rt as l,Tt as u,_t as d,a as f,dt as p,ft as m,gt as h,ht as g,kt as _,lt as v,n as y,o as b,pt as x,t as S,ut as C,vt as w}from"./index-BuGK6ptM.js";import"./logo-BuUh917n.js";import{t as T}from"./format-B9MYDQJN.js";var te={class:`admin-sider__nav`},ne={class:`flex flex-col h-full`},re={class:`p-4 bg-white border-b border-slate-200/80`},ie={class:`flex items-center justify-between mb-3`},ae={class:`size-10 rounded-full bg-linear-to-br from-[#ff5a00] to-[#ff8a3d] text-white flex items-center justify-center font-bold text-sm shadow-xs`},oe={class:`min-w-0 flex-1`},se={class:`text-xs font-bold text-slate-800 truncate`},ce={class:`flex items-center gap-2 mt-0.5`},le={class:`text-[10px] text-orange-600 font-medium`},ue={class:`text-[10px] text-slate-400 font-mono`,dir:`ltr`},de={class:`flex-1 overflow-y-auto p-4 space-y-4`},fe={class:`grid grid-cols-2 gap-2`},pe={class:`size-9 rounded-lg bg-orange-50 text-orange-600 flex items-center justify-center mb-1.5`},E={class:`size-9 rounded-lg bg-orange-50 text-orange-600 flex items-center justify-center mb-1.5`},D={class:`size-9 rounded-lg bg-blue-50 text-blue-600 flex items-center justify-center mb-1.5`},O={key:0,class:`absolute top-2 end-2 size-2.5 rounded-full bg-orange-600 ring-2 ring-white animate-pulse`},k={class:`size-9 rounded-lg bg-amber-50 text-amber-600 flex items-center justify-center mb-1.5`},A={class:`grid grid-cols-2 gap-2`},j={class:`size-9 rounded-lg bg-purple-50 text-purple-600 flex items-center justify-center mb-1.5`},M={class:`size-9 rounded-lg bg-emerald-50 text-emerald-600 flex items-center justify-center mb-1.5`},N={key:0},P={class:`grid grid-cols-1 gap-2`},F={class:`size-9 rounded-lg bg-slate-100 text-slate-600 flex items-center justify-center shrink-0`},I={class:`p-3 bg-white border-t border-slate-200/80 space-y-2`},L=[`href`],R={class:`flex items-center gap-2`},z={class:`mobile-app-bar lg:!hidden`},B={key:0,class:`flex items-center justify-between w-full`},me={class:`text-xs font-bold text-slate-700`},he={class:`text-xs font-bold text-slate-800 truncate max-w-[140px]`},ge={key:1,class:`flex items-center justify-between w-full`},_e={class:`flex items-center gap-2.5`},ve={class:`leading-none`},ye={class:`text-[10px] font-medium text-orange-600 mt-0.5`},be={class:`flex items-center gap-1.5`},xe=[`href`],Se={class:`admin-header__start`},V={class:`admin-header__crumb`},Ce={class:`admin-header__crumb-page`},we={class:`admin-header__end`},Te=[`href`],Ee={type:`button`,class:`admin-header__user`},De={class:`admin-header__avatar`},Oe={class:`admin-header__user-meta`},ke={class:`admin-header__user-name`},Ae={key:0,class:`admin-header__user-role`},je={class:`admin-page`},Me={key:0,class:`mobile-nav-bar lg:!hidden`},Ne={class:`mobile-nav-item__icon`},Pe={class:`mobile-nav-item__icon`},Fe={class:`mobile-nav-item__icon relative`},Ie={key:0,class:`absolute -top-1 -end-1 size-2 rounded-full bg-orange-600 ring-2 ring-white`},Le={class:`mobile-nav-item__icon`},H=e(d({__name:`AdminLayout`,setup(e){let d=S(),H=f(),U=b(),W=a(!1),G=a(0);async function K(){try{let e=await y(`/admin/messages`,{query:{status:`NEW`,pageSize:1}});G.value=e.total}catch{}}i(K),s(()=>H.fullPath,K);let q=e=>()=>w(`span`,{class:`admin-menu__icon`},[w(n,{name:e,size:20})]),Re=v(()=>[{key:`dashboard`,icon:q(`chart-square`),label:`داشبورد`},{key:`products`,icon:q(`bag-2`),label:`محصولات`},{key:`categories`,icon:q(`category`),label:`دستهبندیها`},{key:`sections`,icon:q(`row-vertical`),label:`بخشهای سایت`},{key:`messages`,icon:q(`sms`),label:`پیامهای تماس`},{key:`media`,icon:q(`gallery`),label:`کتابخانه رسانه`},...d.isAdmin?[{key:`users`,icon:q(`profile-2user`),label:`کاربران`}]:[]]),ze={"product-new":`products`,"product-edit":`products`,"category-new":`categories`,"category-edit":`categories`,"section-edit":`sections`},Be={dashboard:`داشبورد`,products:`محصولات`,"product-new":`محصول جدید`,"
|