(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63488,e=>{"use strict";let a=(0,e.i(75254).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"}]]);e.s(["Mail",()=>a],63488)},43432,46897,e=>{"use strict";var a=e.i(75254);let s=(0,a.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"}]]);e.s(["Phone",()=>s],43432);let r=(0,a.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"}]]);e.s(["MapPin",()=>r],46897)},19570,e=>{"use strict";var a=e.i(43476),s=e.i(71645),r=e.i(7471),t=e.i(63488),l=e.i(43432),i=e.i(46897);function d(){let[e,d]=(0,s.useState)([]),[n,o]=(0,s.useState)(!0),[c,x]=(0,s.useState)(null);(0,s.useEffect)(()=>{!async function(){let{data:e}=await r.supabase.from("users").select("*").order("created_at",{ascending:!1});d(e||[]),o(!1)}()},[]);let m=async(e,a)=>{x(a),await r.supabase.auth.resetPasswordForEmail(e,{redirectTo:`${window.location.origin}/auth/reset-password`}),x(null),alert(`Password reset email sent to ${e}`)};return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-gray-900 tracking-tight",children:"Users"}),(0,a.jsxs)("p",{className:"text-gray-500 text-sm mt-1",children:[e.length," registered users"]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:n?(0,a.jsx)("p",{className:"text-gray-500",children:"Loading users..."}):0===e.length?(0,a.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."}):e.map(e=>(0,a.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,a.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:e.avatar_url?(0,a.jsx)("img",{src:e.avatar_url,alt:e.full_name,className:"w-full h-full object-cover"}):(0,a.jsx)("span",{children:e.full_name?.[0]?.toUpperCase()||"?"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-bold text-gray-900 text-lg group-hover:text-brand-primary transition-colors",children:e.full_name||"—"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-2 mt-2",children:[(0,a.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,a.jsx)(t.Mail,{className:"w-3.5 h-3.5 text-gray-400"}),e.email]}),(0,a.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,a.jsx)(l.Phone,{className:"w-3.5 h-3.5 text-gray-400"}),e.whatsapp||"—"]}),(0,a.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,a.jsx)(i.MapPin,{className:"w-3.5 h-3.5 text-gray-400"}),e.address||"—"]})]}),(0,a.jsxs)("p",{className:"text-gray-400 text-xs mt-3 font-medium tracking-wide",children:["Joined ",new Date(e.created_at).toLocaleDateString()]})]}),(0,a.jsx)("button",{onClick:()=>m(e.email,e.id),disabled:c===e.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:c===e.id?"Sending...":"Reset Password"})]},e.id))})]})}e.s(["default",()=>d])}]);