module.exports=[92258,a=>{"use strict";let b=(0,a.i(70106).default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);a.s(["Mail",()=>b],92258)},63519,24987,a=>{"use strict";var b=a.i(70106);let c=(0,b.default)("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);a.s(["Phone",()=>c],63519);let d=(0,b.default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);a.s(["MapPin",()=>d],24987)},42098,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(10849),e=a.i(92258),f=a.i(63519),g=a.i(24987);function h(){let[a,h]=(0,c.useState)([]),[i,j]=(0,c.useState)(!0),[k,l]=(0,c.useState)(null);(0,c.useEffect)(()=>{!async function(){let{data:a}=await d.supabase.from("users").select("*").order("created_at",{ascending:!1});h(a||[]),j(!1)}()},[]);let m=async(a,b)=>{l(b),await d.supabase.auth.resetPasswordForEmail(a,{redirectTo:`${window.location.origin}/auth/reset-password`}),l(null),alert(`Password reset email sent to ${a}`)};return(0,b.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-gray-900 tracking-tight",children:"Users"}),(0,b.jsxs)("p",{className:"text-gray-500 text-sm mt-1",children:[a.length," registered users"]})]}),(0,b.jsx)("div",{className:"flex flex-col gap-4",children:i?(0,b.jsx)("p",{className:"text-gray-500",children:"Loading users..."}):0===a.length?(0,b.jsx)("div",{className:"bg-white border border-gray-200 shadow-sm rounded-2xl p-10 text-center text-gray-500",children:"No users registered yet."}):a.map(a=>(0,b.jsxs)("div",{className:"bg-white border border-gray-200 shadow-sm hover:shadow-md transition-shadow rounded-2xl p-5 sm:p-6 flex flex-col sm:flex-row items-start gap-5 group",children:[(0,b.jsx)("div",{className:"w-14 h-14 rounded-2xl bg-brand-primary/10 text-brand-primary flex items-center justify-center shrink-0 overflow-hidden shadow-inner font-bold text-xl ring-1 ring-brand-primary/20",children:a.avatar_url?(0,b.jsx)("img",{src:a.avatar_url,alt:a.full_name,className:"w-full h-full object-cover"}):(0,b.jsx)("span",{children:a.full_name?.[0]?.toUpperCase()||"?"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"font-bold text-gray-900 text-lg group-hover:text-brand-primary transition-colors",children:a.full_name||"—"}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-2 mt-2",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-gray-600 text-sm bg-gray-50 px-2.5 py-1 rounded-md border border-gray-100",children:[(0,b.jsx)(e.Mail,{className:"w-3.5 h-3.5 text-gray-400"}),a.email]}),(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-gray-600 text-sm bg-gray-50 px-2.5 py-1 rounded-md border border-gray-100",children:[(0,b.jsx)(f.Phone,{className:"w-3.5 h-3.5 text-gray-400"}),a.whatsapp||"—"]}),(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-gray-600 text-sm bg-gray-50 px-2.5 py-1 rounded-md border border-gray-100",children:[(0,b.jsx)(g.MapPin,{className:"w-3.5 h-3.5 text-gray-400"}),a.address||"—"]})]}),(0,b.jsxs)("p",{className:"text-gray-400 text-xs mt-3 font-medium tracking-wide",children:["Joined ",new Date(a.created_at).toLocaleDateString()]})]}),(0,b.jsx)("button",{onClick:()=>m(a.email,a.id),disabled:k===a.id,className:"shrink-0 text-sm font-semibold bg-white hover:bg-gray-50 border border-gray-200 px-4 py-2.5 rounded-xl text-gray-700 hover:text-brand-primary transition-all hover:shadow-sm disabled:opacity-50 mt-2 sm:mt-0 shadow-sm w-full sm:w-auto text-center",children:k===a.id?"Sending...":"Reset Password"})]},a.id))})]})}a.s(["default",()=>h])}];

//# sourceMappingURL=_22a29917._.js.map