PageSourceSearch

https://printarex.com/assets/DashboardPage-BU6Bpjb_.js

js printarex.com collected 2026-10-02 06:28:29 UTC 35,321 bytes, 17 lines download raw bytes

1import{af as re,aQ as De,h as F,b as n,j as e,a0 as u,B as f,F as Se,i as h,X as ke,S as g,aI as W,aW as Pe,aG as oe,n as b,P as N,K as le,a as Oe,a1 as _,aK as V,a3 as Ie,a4 as Re,$ as I,m as q,ag as Te,U as X,aV as Ae,t as _e,b1 as Le}from"./index-COb3BWG8.js";import{g as Z,a as Fe}from"./design-management-client-DqWSUC1T.js";import{i as Me,d as Be}from"./order-queries-5Y6DjekV.js";import{M as Ve}from"./billing-address-DtCq64Wr.js";import{u as ze,S as G,i as He}from"./use-payment-methods-CvRorXrQ.js";import{C as M}from"./credit-card-D8f3Mq8o.js";import{S as Ge}from"./store-BKX9YTX3.js";import{g as J}from"./order-amounts-Dt_Iupbv.js";import{T as $e}from"./trending-up-HRziUnAo.js";import{Z as ee}from"./zap-D6uNgPAN.js";import{C as z}from"./clock-BjT2jRP1.js";import{C as L}from"./circle-check-BvfgDFVk.js";import{F as Ue}from"./file-pen-Bj3-trGe.js";import{C as se}from"./circle-x-Brpt41T7.js";import{P as Ye}from"./package-x-zZ8ck0zF.js";import{B as Ke}from"./ban-BB8yjAtQ.js";import{P as Qe}from"./package-check-DVUPGXZC.js";import{T as te}from"./truck-u2tLuypV.js";import{C as H}from"./clipboard-check-IzwTOC__.js";import{F as We}from"./factory-CT2v7j4Y.js";import{C as qe}from"./cog-8s9BwiLb.js";import{C as Xe}from"./circle-alert-CCGVUS_b.js";import"./payment-integration-CVfa0zAo.js";import"./useMutation-BQY-xsoU.js";import"./useIsomorphicLayoutEffect-D8rpVvO2.js";const Ze=re`
2  query GetConnectedStores {
3    connectedStores {
4      id
5      platform
6      status
7      shopName
8      createdAt
9    }
10  }
11`,Je=re`
12  query GetOrdersCount {
13    myOrders(first: 1) {
14      totalCount
15    }
16  }
17`,es=s=>s.some(a=>a.isPublished===!0&&a.isBrandingDesign!==!0),ss=s=>s.some(a=>(a.addressType==="BILLING"||a.addressType==="BOTH")&&a.countryCode===G),S={collapsed:"customer_onboarding_collapsed",dismissed:"customer_onboarding_dismissed",expandedStep:"customer_onboarding_expanded_step"},ts=(s,a)=>{const o=[{id:1,title:"Place your first order",description:"Let's ensure our product meets your standards",isComplete:s.hasPlacedOrder,actionLabel:"Order a sample",actionLink:"/catalog"},{id:2,title:"Connect your store",description:"Connect your store to sync orders automatically",isComplete:s.hasConnectedStore,actionLabel:"Connect store",actionLink:"/dashboard/stores"},{id:3,title:"Create your first product",description:"Choose a product, add your design, and publish",isComplete:s.hasCreatedProduct,actionLabel:"Create product",actionLink:"/catalog"}];return a&&o.push({id:4,title:"Set up billing",description:"Add a payment method and billing address so store orders can be charged automatically",isComplete:s.hasPaymentMethod&&s.hasBillingAddress,actionLabel:"Set up billing",actionLink:"/dashboard/billing"}),o};function as(){const{country:s,isLoading:a}=De(),o=He(s),{data:c,loading:y,error:p,refetch:l}=F(Ze,{fetchPolicy:"cache-and-network",errorPolicy:"all"}),{data:d,loading:i,error:v,refetch:C}=F(Je,{fetchPolicy:"cache-and-network",errorPolicy:"all"}),{paymentMethods:w,loading:R,refetch:k}=ze(o?G:null),{data:j,loading:t,refetch:x}=F(Ve,{skip:!o,fetchPolicy:"cache-and-network",errorPolicy:"all"}),[m,E]=n.useState([]),[B,T]=n.useState(!0),[ie,$]=n.useState(null);n.useEffect(()=>{let r=!0;return(async()=>{try{T(!0);const O=await Z();r&&(E(O),$(null))}catch(O){r&&$(O instanceof Error?O:new Error("Failed to fetch designs"))}finally{r&&T(!1)}})(),()=>{r=!1}},[]);const[ne,de]=n.useState(()=>globalThis.window===void 0?!1:localStorage.getItem(S.collapsed)==="true"),[me,ce]=n.useState(()=>globalThis.window===void 0?!1:localStorage.getItem(S.dismissed)==="true"),[xe,he]=n.useState(()=>{if(globalThis.window===void 0)return null;const r=localStorage.getItem(S.expandedStep);return r?Number.parseInt(r,10):null}),A=n.useMemo(()=>{var K,Q;const r=(((K=d==null?void 0:d.myOrders)==null?void 0:K.totalCount)??0)>0,D=((Q=c==null?void 0:c.connectedStores)==null?void 0:Q.some(Ee=>Ee.status==="CONNECTED"))??!1,O=es(m),ye=w.length>0,Ce=ss((j==null?void 0:j.myAddresses)??[]);return{hasPlacedOrder:r,hasConnectedStore:D,hasCreatedProduct:O,hasPaymentMethod:ye,hasBillingAddress:Ce}},[d,c,m,w,j]),ge=n.useMemo(()=>({hasPaymentMethod:A.hasPaymentMethod,hasBillingAddress:A.hasBillingAddress}),[A]),P=n.useMemo(()=>ts(A,o?G:null),[A,o]),U=P.filter(r=>r.isComplete).length,ue=U===P.length,Y=n.useMemo(()=>{const r=P.find(D=>!D.isComplete);return(r==null?void 0:r.id)??null},[P]),be=xe??Y,pe=n.useCallback(()=>{de(r=>{const D=!r;return localStorage.setItem(S.collapsed,String(D)),D})},[]),fe=n.useCallback(()=>{localStorage.setItem(S.dismissed,"true"),ce(!0)},[]),ve=n.useCallback(r=>{he(r),r===null?localStorage.removeItem(S.expandedStep):localStorage.setItem(S.expandedStep,String(r))},[]),we=n.useCallback(()=>
17{l(),C(),o&&(k(),x()),Z().then(E).catch(console.error)},[o,l,C,k,x]),je=a||y||i||B||o&&(R||t),Ne=p?new Error(p.message):v?new Error(v.message):ie;return{steps:P,billingSetup:ge,completedCount:U,totalSteps:P.length,isAllComplete:ue,currentStep:Y,isCollapsed:ne,isDismissed:me,expandedStep:be,isLoading:je,error:Ne,toggleCollapse:pe,dismiss:fe,setExpandedStep:ve,refetch:we}}const rs=s=>{switch(s){case 1:return N;case 2:return Ge;case 3:return le;case 4:return M;default:return N}},os=[{name:"Shopify",to:"/dashboard/stores?platform=shopify",icon:"/assets/sales-channels/shopify.svg",brandClassName:"border-[#95BF47]/60 bg-[#95BF47]/5 hover:bg-[#95BF47]/10 hover:border-[#95BF47]"},{name:"WooCommerce",to:"/dashboard/stores?platform=woocommerce",icon:"/assets/sales-channels/woocommerce.svg",brandClassName:"border-[#9B5C8F]/60 bg-[#9B5C8F]/5 hover:bg-[#9B5C8F]/10 hover:border-[#9B5C8F]"},{name:"Amazon",to:"/dashboard/stores?platform=amazon",icon:"/assets/sales-channels/amazon.svg",brandClassName:"border-[#FF9900]/60 bg-[#FF9900]/5 hover:bg-[#FF9900]/10 hover:border-[#FF9900]"}],ls=[{label:"Add payment method",to:"/dashboard/billing?setup=payment-method",icon:M,statusKey:"hasPaymentMethod"},{label:"Add billing address",to:"/dashboard/billing?setup=billing-address",icon:oe,statusKey:"hasBillingAddress"}],is=({step:s,billingSetup:a,isExpanded:o,onToggle:c,index:y})=>{const p=rs(s.id);return e.jsxs("div",{className:h("border-b border-slate-100 last:border-b-0 transition-colors duration-200",o&&"bg-slate-50/50"),style:{animationDelay:`${y*100}ms`},children:[e.jsxs("button",{type:"button",onClick:c,className:"w-full flex items-center justify-between px-4 py-4 lg:px-6 lg:py-5 hover:bg-slate-50/30 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:h("h-8 w-8 rounded-full flex items-center justify-center transition-all duration-300",s.isComplete?"bg-emerald-100 text-emerald-600":"bg-slate-100 text-slate-400"),children:s.isComplete?e.jsx(W,{className:"h-4 w-4"}):e.jsx(p,{className:"h-4 w-4"})}),e.jsx("span",{className:h("font-medium text-sm lg:text-base transition-colors",s.isComplete?"text-slate-500":"text-slate-900"),children:s.title})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:h("text-xs font-medium px-2.5 py-1 rounded-full transition-colors",s.isComplete?"bg-emerald-100 text-emerald-700":"bg-amber-100 text-amber-700"),children:s.isComplete?"Completed":"Pending"}),e.jsx(Pe,{className:h("h-4 w-4 text-slate-400 transition-transform duration-200",o&&"rotate-90")})]})]}),e.jsx("div",{className:h("grid transition-all duration-300 ease-in-out",o?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:e.jsx("div",{className:"overflow-hidden",children:e.jsx("div",{className:"px-4 pb-4 lg:px-6 lg:pb-5 pt-0",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 space-y-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s.description}),s.id===4&&e.jsx("div",{className:"flex flex-wrap gap-2",children:ls.map(l=>{const d=a[l.statusKey],i=d?W:l.icon;return e.jsx(b,{to:l.to,children:e.jsxs(f,{variant:d?"outline":"default",size:"sm",className:"gap-2 min-h-[44px]",children:[e.jsx(i,{className:h("h-4 w-4",d&&"text-emerald-600"),"aria-hidden":"true"}),l.label]})},l.statusKey)})}),s.id===2&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[os.map(l=>e.jsx(b,{to:l.to,children:e.jsxs(f,{variant:"outline",size:"sm",className:h("gap-2 min-h-[44px] text-slate-800",l.brandClassName),children:[e.jsx("img",{src:l.icon,alt:"","aria-hidden":"true",className:"h-4 w-4 object-contain"}),"Connect ",l.name]})},l.name)),e.jsx(b,{to:"/dashboard/stores",children:e.jsx(f,{variant:"ghost",size:"sm",className:"text-primary min-h-[44px]",children:"View all integrations"})})]}),s.id!==2&&s.id!==4&&e.jsx(b,{to:s.actionLink,children:e.jsx(f,{variant:s.isComplete?"outline":"default",size:"sm",className:"min-h-[44px] min-w-[44px]",children:s.actionLabel})})]}),e.jsx("div",{className:h("hidden lg:flex flex-shrink-0 items-center justify-center w-24 h-24 rounded-2xl",s.isComplete?"bg-emerald-500/5":"bg-primary/5"),children:e.jsx(p,{className:h("h-10 w-10",s.isComplete?"text-emerald-500":"text-primary")})})]})})})})]})},ns=()=>e.jsx(u,{className:"rounded-2xl border border-slate-200/50 bg-white/80 backdrop-blur-sm shadow-lg overflow-hidden",children:e.jsxs("div",{className:"p-4 lg:p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(g,{className:"h-6 w-48"}),e.jsx(g,{className:"h-8 w-8 rounded-full"})]}),e.jsx(g,{className:"h-2 w-full rounded-full"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(g,{className:"h-16 w-full"}),e.jsx(g,{className:"h-12 w-full"}),e.jsx(g,{className:"h-12 w-full"}),e.jsx(g,{className:"h-12 w-full"})]})]})}),ds=()=>{const{steps:s,billingSetup:a,completedCount:o,totalSteps:c,isAllComplete:y,isCollapsed:p,isDismissed:l,expandedStep:d,isLoading:i,error:v,toggleCollapse:C,dismiss:w,setExpandedStep:R}=as();if(i)return e.jsx(ns,{});if(v)return console.error("Onboarding status fetch failed:",v),null;if(y||l)return null;
17const k=o/c*100,j=c-o;return e.jsxs(u,{className:h("rounded-2xl border border-slate-200/50 bg-white/80 backdrop-blur-sm shadow-lg overflow-hidden","animate-in fade-in slide-in-from-bottom-4 duration-500"),children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-4 lg:px-6 lg:py-5 border-b border-slate-100",children:[e.jsxs("h3",{className:"font-semibold text-slate-900",children:[c," simple steps to start selling"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(f,{variant:"ghost",size:"icon",onClick:C,className:"h-8 w-8",children:e.jsx(Se,{className:h("h-4 w-4 text-slate-500 transition-transform duration-200",p&&"rotate-180")})}),e.jsx(f,{variant:"ghost",size:"icon",onClick:w,className:"h-8 w-8",children:e.jsx(ke,{className:"h-4 w-4 text-slate-500"})})]})]}),e.jsx("div",{className:h("grid transition-all duration-300 ease-in-out",p?"grid-rows-[0fr]":"grid-rows-[1fr]"),children:e.jsxs("div",{className:"overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-4 lg:px-6 lg:py-5 border-b border-slate-100 bg-slate-50/30",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2 mb-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["You're ",j,"/",c," step",j===1?"":"s"," away from making your first sale"]}),e.jsxs("span",{className:"text-sm font-medium text-slate-600",children:[o,"/",c," completed"]})]}),e.jsx("div",{className:"h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-500 ease-out",style:{width:`${k}%`}})})]}),e.jsx("div",{children:s.map((t,x)=>e.jsx(is,{step:t,billingSetup:a,isExpanded:d===t.id,onToggle:()=>R(d===t.id?null:t.id),index:x},t.id))})]})})]})},ae="max-sm:grid max-sm:grid-cols-[auto_minmax(0,1fr)_auto_auto] max-sm:gap-x-3 max-sm:p-4",_s=()=>{const{locale:s}=Oe(),a=t=>_e(t,s),[o,c]=n.useState(0),[y,p]=n.useState(!0),{data:l,loading:d}=F(Me,{fetchPolicy:"cache-and-network"});n.useEffect(()=>{(async()=>{try{p(!0);const m=(await Fe()).filter(E=>!E.isPublished&&!E.isTemplate).length;c(m)}catch(x){console.error("Failed to load design count:",x),c(0)}finally{p(!1)}})()},[]);const i=l==null?void 0:l.myDashboardOrderSummary,v={totalOrders:(i==null?void 0:i.totalOrders)||0,activeOrders:(i==null?void 0:i.activeOrders)||0,completedOrders:(i==null?void 0:i.completedOrders)||0},C=(i==null?void 0:i.recentOrders)||[],w={totalOrders:d?"...":v.totalOrders,activeOrders:d?"...":v.activeOrders,completedOrders:d?"...":v.completedOrders,draftDesigns:y?"...":o},R=t=>({PENDING_PAYMENT:{bg:"bg-slate-50",text:"text-slate-600",border:"border-slate-200",icon:z,glow:"shadow-slate-100"},PAYMENT_FAILED:{bg:"bg-red-50",text:"text-red-700",border:"border-red-200",icon:se,glow:"shadow-red-100"},PAYMENT_EXPIRED:{bg:"bg-slate-50",text:"text-slate-500",border:"border-slate-200",icon:z,glow:"shadow-slate-100"},PAID:{bg:"bg-amber-50",text:"text-amber-700",border:"border-amber-200",icon:M,glow:"shadow-amber-100"},PENDING_SHIPPING_INFO:{bg:"bg-amber-50",text:"text-amber-700",border:"border-amber-200",icon:Xe,glow:"shadow-amber-100"},PROCESSING:{bg:"bg-blue-50",text:"text-blue-700",border:"border-blue-200",icon:qe,glow:"shadow-blue-100"},ASSIGNED:{bg:"bg-violet-50",text:"text-violet-700",border:"border-violet-200",icon:H,glow:"shadow-violet-100"},AWAITING_PROVIDER_ACCEPTANCE:{bg:"bg-violet-50",text:"text-violet-700",border:"border-violet-200",icon:H,glow:"shadow-violet-100"},PROVIDER_ACCEPTED_PAYMENT_PENDING:{bg:"bg-amber-50",text:"text-amber-700",border:"border-amber-200",icon:M,glow:"shadow-amber-100"},ACCEPTED:{bg:"bg-emerald-50",text:"text-emerald-700",border:"border-emerald-200",icon:L,glow:"shadow-emerald-100"},IN_PRODUCTION:{bg:"bg-purple-50",text:"text-purple-700",border:"border-purple-200",icon:We,glow:"shadow-purple-100"},QUALITY_CHECK:{bg:"bg-indigo-50",text:"text-indigo-700",border:"border-indigo-200",icon:H,glow:"shadow-indigo-100"},READY_TO_SHIP:{bg:"bg-cyan-50",text:"text-cyan-700",border:"border-cyan-200",icon:N,glow:"shadow-cyan-100"},SHIPPED:{bg:"bg-blue-50",text:"text-blue-700",border:"border-blue-200",icon:te,glow:"shadow-blue-100"},IN_TRANSIT:{bg:"bg-sky-50",text:"text-sky-700",border:"border-sky-200",icon:te,glow:"shadow-sky-100"},OUT_FOR_DELIVERY:{bg:"bg-teal-50",text:"text-teal-700",border:"border-teal-200",icon:oe,glow:"shadow-teal-100"},DELIVERED:{bg:"bg-emerald-50",text:"text-emerald-700",border:"border-emerald-200",icon:Qe,glow:"shadow-emerald-100"},CANCELLED:{bg:"bg-red-50",text:"text-red-600",border:"border-red-200",icon:Ke,glow:"shadow-red-100"},RETURN_REQUESTED:{bg:"bg-orange-50",text:"text-orange-700",border:"border-orange-200",icon:X,glow:"shadow-orange-100"},RETURN_APPROVED:{bg:"bg-amber-50",text:"text-amber-700",border:"border-amber-200",icon:L,glow:"shadow-amber-100"},RETURN_RECEIVED:{bg:"bg-sky-50",text:"text-sky-700",border:"border-sky-200",icon:Ye,glow:"shadow-sky-100"},RETURN_REJECTED:{bg:"bg-red-50",text:"text-red-700",border:"border-red-200",icon:se,glow:"shadow-red-100"},RETURNED:{bg:"bg-slate-50",text:"text-slate-600",border:"border-slate-200",icon:X,glow:"shadow-slate-100"},REFUNDED:{bg:"bg-emerald-50",text:"text-emerald-700",border:"border-emerald-200",icon:Te,glow:"shadow-emerald-100"}})[t]||{bg:"bg-slate-50",text:"text-slate-600",border:"border-slate-200",icon:N,glow:"shadow-slate-100"},k=(t,x)=>Le(t,x),j=t=>{if(t.items&&t.items.length>0){const x=t.items[0],m=s==="ar"?Ae(x.productName,a):x.productName;return t.items.length>1?`${m} +${t.items.length-1} ${a("more")}`:m}return"Order"};return e.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 -z-10",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-slate-50 via-white to-emerald-50/30"}),e.jsx("div",{className:"absolute top-0 right-0 w-[800px] h-[800px] bg-gradient-to-bl from-primary/5 via-trans
17parent to-transparent rounded-full blur-3xl animate-pulse",style:{animationDuration:"8s"}}),e.jsx("div",{className:"absolute bottom-0 left-0 w-[600px] h-[600px] bg-gradient-to-tr from-blue-500/5 via-transparent to-transparent rounded-full blur-3xl animate-pulse",style:{animationDuration:"10s",animationDelay:"2s"}}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[1000px] h-[1000px] bg-gradient-radial from-amber-500/3 via-transparent to-transparent rounded-full"}),e.jsx("div",{className:"absolute inset-0 opacity-[0.015]",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}})]}),e.jsxs("div",{className:"container mx-auto px-4 py-8 space-y-10 relative",children:[e.jsxs("div",{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"h-2 w-2 rounded-full bg-primary animate-pulse"}),e.jsx("span",{className:"text-sm font-medium text-primary tracking-wide uppercase",children:"Creative Studio"})]}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold bg-gradient-to-r from-slate-900 via-slate-700 to-slate-900 bg-clip-text text-transparent",children:"Welcome back, Creator"}),e.jsx("p",{className:"text-lg text-muted-foreground mt-3 max-w-2xl",children:"Your creative journey continues. Here's what's happening with your designs and orders."})]}),e.jsx(ds,{}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-
175",children:[e.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-6 duration-700 fill-mode-both",style:{animationDelay:"100ms"},children:e.jsxs(u,{className:"group relative overflow-hidden rounded-2xl border border-white/50 bg-white/70 backdrop-blur-xl shadow-lg shadow-slate-200/50 hover:shadow-xl hover:shadow-primary/10 hover:-translate-y-1 transition-all duration-300",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-primary/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),e.jsx("div",{className:"absolute -right-8 -top-8 w-32 h-32 bg-primary/10 rounded-full blur-2xl group-hover:bg-primary/20 transition-colors duration-300"}),e.jsx(_,{className:"relative p-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-1",children:"Total Orders"}),e.jsx("p",{className:"text-4xl font-bold text-slate-900",children:w.totalOrders}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2 flex items-center gap-1",children:[e.jsx($e,{className:"h-3 w-3 text-primary"}),"All time orders"]})]}),e.jsx("div",{className:"h-12 w-12 rounded-2xl bg-gradient-to-br from-primary to-emerald-600 flex items-center justify-center shadow-lg shadow-primary/30",children:e.jsx(N,{className:"h-6 w-6 text-white"})})]})})]})}),e.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-6 duration-700 fill-mode-both",style:{animationDelay:"200ms"},children:e.jsxs(u,{className:"group relative overflow-hidden rounded-2xl border border-white/50 bg-white/70 backdrop-blur-xl shadow-lg shadow-slate-200/50 hover:shadow-xl hover:shadow-blue-500/10 hover:-translate-y-1 transition-all duration-300",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500/5 via-transparent to-blue-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),e.jsx("div",{className:"absolute -right-8 -top-8 w-32 h-32 bg-blue-500/10 rounded-full blur-2xl group-hover:bg-blue-500/20 transition-colors duration-300"}),e.jsx(_,{className:"relative p-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-1",children:"Active Orders"}),e.jsx("p",{className:"text-4xl font-bold text-slate-900",children:w.activeOrders}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2 flex items-center gap-1",children:[e.jsx(ee,{className:"h-3 w-3 text-blue-500"}),"Currently processing"]})]}),e.jsx("div",{className:"h-12 w-12 rounded-2xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/30",children:e.jsx(z,{className:"h-6 w-6 text-white"})})]})})]})}),e.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-6 duration-700 fill-mode-both",style:{animationDelay:"300ms"},children:e.jsxs(u,{className:"group relative overflow-hidden rounded-2xl border border-white/50 bg-white/70 backdrop-blur-xl shadow-lg shadow-slate-200/50 hover:shadow-xl hover:shadow-violet-500/10 hover:-translate-y-1 transition-all duration-300",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-violet-500/5 via-transparent to-violet-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),e.jsx("div",{className:"absolute -right-8 -top-8 w-32 h-32 bg-violet-500/10 rounded-full blur-2xl group-hover:bg-violet-500/20 transition-colors duration-300"}),e.jsx(_,{className:"relative p-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-1",children:"Completed"}),e.jsx("p",{className:"text-4xl font-bold text-slate-900",children:w.completedOrders}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2 flex items-center gap-1",children:[e.jsx(L,{className:"h-3 w-3 text-violet-500"}
17),"Successfully delivered"]})]}),e.jsx("div",{className:"h-12 w-12 rounded-2xl bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center shadow-lg shadow-violet-500/30",children:e.jsx(L,{className:"h-6 w-6 text-white"})})]})})]})}),e.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-6 duration-700 fill-mode-both",style:{animationDelay:"400ms"},children:e.jsxs(u,{className:"group relative overflow-hidden rounded-2xl border border-white/50 bg-white/70 backdrop-blur-xl shadow-lg shadow-slate-200/50 hover:shadow-xl hover:shadow-amber-500/10 hover:-translate-y-1 transition-all duration-300",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-amber-500/5 via-transparent to-amber-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),e.jsx("div",{className:"absolute -right-8 -top-8 w-32 h-32 bg-amber-500/10 rounded-full blur-2xl group-hover:bg-amber-500/20 transition-colors duration-300"}),e.jsx(_,{className:"relative p-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-1",children:"Draft Designs"}),e.jsx("p",{className:"text-4xl font-bold text-slate-900",children:w.draftDesigns}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-2 flex items-center gap-1",children:[e.jsx(V,{className:"h-3 w-3 text-amber-500"}),"Saved designs"]})]}),e.jsx("div",{className:"h-12 w-12 rounded-2xl bg-gradient-to-br from-amber-500 to-orange-600 flex items-center justify-center shadow-lg shadow-amber-500/30",children:e.jsx(Ue,{className:"h-6 w-6 text-white"})})]})})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsx("div",{className:"lg:col-span-2 animate-in fade-in slide-in-from-bottom-8 duration-700 fill-mode-both",style:{animationDelay:"500ms"},children:e.jsxs(u,{className:"rounded-2xl border border-slate-200/50 bg-white/80 backdrop-blur-sm shadow-lg overflow-hidden",children:[e.jsxs(Ie,{className:"flex flex-row items-center justify-between border-b border-slate-100 bg-slate-50/50 px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-xl bg-gradient-to-br from-slate-800 to-slate-900 flex items-center justify-center shadow-md",children:e.jsx(N,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{children:[e.jsx(Re,{className:"text-lg font-semibold",children:"Recent Orders"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Track your latest purchases"})]})]}),e.jsx(b,{to:"/dashboard/orders",children:e.jsxs(f,{variant:"ghost",size:"sm",className:"gap-2 text-primary hover:text-primary hover:bg-primary/10 font-medium",children:["View All",e.jsx(I,{className:"h-4 w-4"})]})})]}),e.jsx(_,{className:"p-0",children:d?e.jsx("div",{className:"divide-y divide-slate-100",children:[1,2,3].map(t=>e.jsxs("div",{className:`flex items-center justify-between p-5 ${ae} max-sm:gap-y-2`,children:[e.jsxs("div",{className:"flex items-center gap-4 max-sm:contents",children:[e.jsx(g,{className:"h-12 w-12 rounded-xl max-sm:row-span-2 max-sm:h-10 max-sm:w-10"}),e.jsxs("div",{className:"space-y-2 max-sm:contents",children:[e.jsx(g,{className:"h-4 w-24 max-sm:col-start-2 max-sm:row-start-1"}),e.jsx(g,{className:"h-3 w-32 max-sm:col-start-2 max-sm:row-start-2 max-sm:!mt-0 max-sm:max-w-full"})]})]}),e.jsxs("div",{className:"flex items-center gap-5 max-sm:contents",children:[e.jsx(g,{className:"h-6 w-20 rounded-full max-sm:col-span-2 max-sm:col-start-3 max-sm:row-start-1 max-sm:justify-self-end"}),e.jsx(g,{className:"h-4 w-16 max-sm:col-start-3 max-sm:row-start-2"}),e.jsx(g,{className:"h-8 w-14 rounded-md max-sm:col-start-4 max-sm:row-start-2"})]})]},`skeleton-${t}`))}):C.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-6 text-center",children:[e.jsx("div",{className:"h-16 w-16 rounded-2xl bg-slate-100 flex items-center justify-center mb-4",children:e.jsx(N,{className:"h-8 w-8 text-slate-400"})}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"No orders yet"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Start exploring our catalog to create your first order"}),e.jsx(b,{to:"/catalog",children:e.jsxs(f,{className:"gap-2",children:[e.jsx(q,{className:"h-4 w-4"}),"Browse Products"]})})]}):e.jsx("div",{className:"divide-y divide-slate-100",children:C.map((t,x)=>{var T;const m=R(t.status),E=m.icon,B=((T=Be[t.status])==null?void 0:T.label)||t.status;return e.jsxs("div",{className:`group flex items-center justify-between p-5 hover:bg-slate-50/80 transition-colors duration-200 ${ae} max-sm:gap-y-1`,style:{animationDelay:`${600+x*100}ms`},children:[e.jsxs("div",{className:"flex items-center gap-4 max-sm:contents",children:[e.jsx("div",{className:`h-12 w-12 rounded-xl ${m.bg} ${m.border} border flex items-center justify-center transition-transform duration-200 group-hover:scale-110 flex-shrink-0 max-sm:row-span-2 max-sm:h-10 max-sm:w-10`,children:e.jsx(E,{className:`h-5 w-5 ${m.text}`})}),e.jsxs("div",{className:"flex flex-col justify-center max-sm:contents",children:[e.jsx("p",{className:"font-semibold text-slate-900 max-sm:col-start-2 max-sm:row-start-1 max-sm:truncate",children:t.orderNumber}),e.jsx("p",{className:"text-sm text-muted-foreground max-sm:col-start-2 max-sm:row-start-2 max-sm:truncate",children:j(t)})]})]}),e.jsxs("div",{className:"flex items-center gap-5 max-sm:contents",children:[e.jsx("span",{className:`inline-flex items-center rounded-md border px-3 py-1 text-xs font-medium tracking-wide ${m.bg} ${m.text} ${m.border} shadow-sm ${m.glow} max-sm:col-span-2 max-sm:col-start-3 max-sm:row-start-1 max-sm:justify-self-end max-sm:whitespace-nowrap max-sm:px-2`,children:B}),e.jsx("p",{className:"font-bold text-slate-900 w-24 text-right tabular-nums max-sm:col-start-3 max-sm:row-start-2 max-sm:w-auto max-sm:whitespace-nowrap max-sm:text-sm",children:J(t)==null?a("Calculating"):k(J(t),t.currency)}),e.jsx(b,{to:`/dashboard/orders/${t.orderNumber}`,className:"max-sm:col-start-4 max-sm:row-start-2",children:e.jsx(f,{variant:"ghost",size:"sm",className:"opacity-0 group-hover:opacity-100 transition-opacity duration-200 hover:bg-primary hover:text-white max-sm:h-8 max-sm:px-2 max-sm:opacity-100",children:"View"})})]})]},t.orderId)})})})]})}),e.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-8 duration-700 fill-mode-both",style:{animationDelay:"600ms"},children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 px-1",children:[e.jsx(ee,{className:"h-5 w-5 text-primary"}),e.jsx("h2",{className:"text-lg font-semibold text-slate-900",children:"Qu
17ick Actions"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(b,{to:"/catalog",className:"block",children:e.jsx(u,{className:"group rounded-2xl border-2 border-transparent bg-gradient-to-br from-primary/5 to-emerald-500/5 hover:border-primary hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 overflow-hidden h-[72px]",children:e.jsxs("div",{className:"flex items-center gap-3 h-full px-4",children:[e.jsx("div",{className:"h-11 w-11 flex-shrink-0 rounded-xl bg-gradient-to-br from-primary to-emerald-600 flex items-center justify-center shadow-lg shadow-primary/30 group-hover:scale-105 transition-transform duration-300",children:e.jsx(q,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[e.jsx("h3",{className:"font-semibold text-slate-900 group-hover:text-primary transition-colors text-sm leading-tight",children:"Browse Products"}),e.jsx("p",{className:"text-xs text-muted-foreground leading-tight mt-0.5",children:"Explore our catalog"})]}),e.jsx(I,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground group-hover:text-primary group-hover:translate-x-1 transition-all duration-200"})]})})}),e.jsx(b,{to:"/dashboard/catalog",className:"block",children:e.jsx(u,{className:"group rounded-2xl border-2 border-transparent bg-gradient-to-br from-violet-500/5 to-purple-500/5 hover:border-violet-500 hover:shadow-lg hover:shadow-violet-500/10 transition-all duration-300 overflow-hidden h-[72px]",children:e.jsxs("div",{className:"flex items-center gap-3 h-full px-4",children:[e.jsx("div",{className:"h-11 w-11 flex-shrink-0 rounded-xl bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center shadow-lg shadow-violet-500/30 group-hover:scale-105 transition-transform duration-300",children:e.jsx(le,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[e.jsx("h3",{className:"font-semibold text-slate-900 group-hover:text-violet-600 transition-colors text-sm leading-tight",children:"Create Design"}),e.jsx("p",{className:"text-xs text-muted-foreground leading-tight mt-0.5",children:"Start designing now"})]}),e.jsx(I,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground group-hover:text-violet-500 group-hover:translate-x-1 transition-all duration-200"})]})})}),e.jsx(b,{to:"/dashboard/orders",className:"block",children:e.jsx(u,{className:"group rounded-2xl border-2 border-transparent bg-gradient-to-br from-blue-500/5 to-indigo-500/5 hover:border-blue-500 hover:shadow-lg hover:shadow-blue-500/10 transition-all duration-300 overflow-hidden h-[72px]",children:e.jsxs("div",{className:"flex items-center gap-3 h-full px-4",children:[e.jsx("div",{className:"h-11 w-11 flex-shrink-0 rounded-xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/30 group-hover:scale-105 transition-transform duration-300",children:e.jsx(N,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[e.jsx("h3",{className:"font-semibold text-slate-900 group-hover:text-blue-600 transition-colors text-sm leading-tight",children:"Track Orders"}),e.jsx("p",{className:"text-xs text-muted-foreground leading-tight mt-0.5",children:"View order history"})]}),e.jsx(I,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground group-hover:text-blue-500 group-hover:translate-x-1 transition-all duration-200"})]})})}),e.jsx(b,{to:"/dashboard/my-designs",className:"block",children:e.jsx(u,{className:"group rounded-2xl border-2 border-transparent bg-gradient-to-br from-amber-500/5 to-orange-500/5 hover:border-amber-500 hover:shadow-lg hover:shadow-amber-500/10 transition-all duration-300 overflow-hidden h-[72px]",children:e.jsxs("div",{className:"flex items-center gap-3 h-full px-4",children:[e.jsx("div",{className:"h-11 w-11 flex-shrink-0 rounded-xl bg-gradient-to-br from-amber-500 to-orange-600 flex items-center justify-center shadow-lg shadow-amber-500/30 group-hover:scale-105 transition-transform duration-300",children:e.jsx(V,{className:"h-5 w-5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[e.jsx("h3",{className:"font-semibold text-slate-900 group-hover:text-amber-600 transition-colors text-sm leading-tight",children:a("My Designs")}),e.jsx("p",{className:"text-xs text-muted-foreground leading-tight mt-0.5",children:a("View saved designs")})]}),e.jsx(I,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground group-hover:text-amber-500 group-hover:translate-x-1 transition-all duration-200"})]})})})]})]})})]}),e.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-10 duration-700 fill-mode-both",style:{animationDelay:"800ms"},children:e.jsxs(u,{className:"relative overflow-hidden rounded-3xl border-0 bg-gradient-to-r from-slate-900 via-slate-800 to-slate-900 text-white shadow-2xl",children:[e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml,%3Csvg%20width%3D%2260%22%20height%3D%2260%22%20viewBox%3D%220%200%2060%2060%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20fill%3D%22%23ffffff%22%20fill-opacity%3D%220.03%22%3E%3Cpath%20d%3D%22M36%2034v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6%2034v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6%204V0H4v4H0v2h4v4h2V6h4V4H6z%22%2F%3
17E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E')] opacity-50"}),e.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-gradient-to-bl from-primary/20 via-primary/5 to-transparent rounded-full blur-3xl"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-64 h-64 bg-gradient-to-tr from-violet-500/20 via-transparent to-transparent rounded-full blur-3xl"}),e.jsx("div",{className:"relative p-8 md:p-12",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[e.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/10 backdrop-blur-sm text-sm font-medium mb-4",children:[e.jsx(V,{className:"h-4 w-4 text-primary"}),a("Ready to create?")]}),e.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-2",children:a("Turn your ideas into reality")}),e.jsx("p",{className:"text-slate-300 max-w-md",children:a("Design custom products with our easy-to-use studio. No design skills required.")})]}),e.jsx(b,{to:"/dashboard/catalog",children:e.jsxs(f,{size:"lg",className:"bg-primary hover:bg-primary/90 text-white font-semibold px-8 py-6 rounded-2xl shadow-lg shadow-primary/30 hover:shadow-xl hover:shadow-primary/40 hover:-translate-y-0.5 transition-all duration-200",children:[a("Start Designing"),e.jsx(I,{className:"ml-2 h-5 w-5"})]})})]})})]})})]})]})};export{_s as DashboardPage};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.