import{ab as i,$ as l,K as e,M as c,d as o,L as t,H as x,U as m}from"./index-CqfREQhZ.js";import{P as h}from"./package-D58BUA8K.js";import{S as u}from"./settings-Bm4D1Whm.js";function p(){const{user:s,logout:d}=i(),[a,r]=l.useState(!1),n=async()=>{r(!0),await d(),r(!1)};return s?e.jsx("div",{className:"container mx-auto px-4 py-10 max-w-4xl",children:e.jsxs("div",{className:"bg-card border border-border rounded-3xl overflow-hidden",children:[e.jsx("div",{className:"bg-gradient-to-r from-primary to-primary/80 p-8 text-white",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-brand text-brand-foreground grid place-items-center font-bold text-3xl",children:s.name?.charAt(0).toUpperCase()||"U"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold",children:s.name||"User"}),e.jsxs("p",{className:"text-white/80 flex items-center gap-2",children:[e.jsx(c,{className:"w-4 h-4"})," ",s.email]})]})]}),e.jsxs("button",{onClick:n,disabled:a,className:"inline-flex items-center gap-2 bg-white/20 hover:bg-white/30 disabled:opacity-60 text-white px-6 py-3 rounded-full font-semibold transition",children:[e.jsx(o,{className:"w-4 h-4"})," ",a?"Logging out...":"Log out"]})]})}),e.jsxs("div",{className:"p-8 border-b border-border",children:[e.jsx("h2",{className:"font-bold text-lg mb-4",children:"Account Overview"}),e.jsxs("div",{className:"grid sm:grid-cols-3 gap-4",children:[e.jsxs(t,{to:"/cart",className:"bg-secondary rounded-2xl p-5 hover-lift transition",children:[e.jsx(h,{className:"w-6 h-6 text-brand mx-auto mb-2"}),e.jsx("div",{className:"font-semibold text-sm text-center",children:"My Orders"}),e.jsx("div",{className:"text-xs text-muted-foreground text-center",children:"Track your purchases"})]}),e.jsxs(t,{to:"/wishlist",className:"bg-secondary rounded-2xl p-5 hover-lift transition",children:[e.jsx(x,{className:"w-6 h-6 text-brand mx-auto mb-2"}),e.jsx("div",{className:"font-semibold text-sm text-center",children:"Wishlist"}),e.jsx("div",{className:"text-xs text-muted-foreground text-center",children:"Saved items"})]}),e.jsxs(t,{to:"/account",className:"bg-secondary rounded-2xl p-5 hover-lift transition",children:[e.jsx(u,{className:"w-6 h-6 text-brand mx-auto mb-2"}),e.jsx("div",{className:"font-semibold text-sm text-center",children:"Settings"}),e.jsx("div",{className:"text-xs text-muted-foreground text-center",children:"Manage account"})]})]})]}),e.jsxs("div",{className:"p-8",children:[e.jsx("h2",{className:"font-bold text-lg mb-4",children:"Account Information"}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase",children:"Name"}),e.jsx("p",{className:"text-lg font-medium mt-1",children:s.name})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase",children:"Email"}),e.jsx("p",{className:"text-lg font-medium mt-1",children:s.email})]})]})]})]})}):e.jsx("div",{className:"container mx-auto px-4 py-10 max-w-3xl",children:e.jsxs("div",{className:"bg-card border border-border rounded-3xl p-10 text-center",children:[e.jsx("div",{className:"w-20 h-20 mx-auto rounded-full bg-brand/10 grid place-items-center text-brand",children:e.jsx(m,{className:"w-10 h-10"})}),e.jsx("h1",{className:"text-3xl font-bold text-primary mt-4",children:"My Account"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"Sign in to view orders, manage addresses and more."})]})})}export{p as component};
