%PDF- %PDF-
| Direktori : /home2/rezakur1/ai.rezakurnia.com/assets/ |
| Current File : //home2/rezakur1/ai.rezakurnia.com/assets/AdminUsersPage-Dz8cyylE.js |
import{r as a,j as e,a as A,b as ae}from"./index-Bu042oJp.js";import{B as E}from"./Button-CsqZL9Xc.js";import{C as ne,a as re,b as le}from"./Card-TlRU04W7.js";import{B as b}from"./Badge-BhTU663i.js";import{I as F}from"./Input-x6BCAoBW.js";import{M as G}from"./Modal-D2xuPxb5.js";import{g as ie,e as Y,d as R,c as N}from"./format-CjhWL3Ta.js";import"./index-Cfl-v9NS.js";function Q({items:s,align:l="right",className:j=""}){const[o,c]=a.useState(!1),u=a.useRef(null);return a.useEffect(()=>{if(!o)return;const d=g=>{u.current&&!u.current.contains(g.target)&&c(!1)},f=g=>{g.key==="Escape"&&c(!1)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",f)}},[o]),e.jsxs("div",{ref:u,className:`relative inline-flex ${j}`,children:[e.jsx("button",{type:"button","aria-haspopup":"menu","aria-expanded":o,onClick:()=>c(d=>!d),className:"flex h-8 w-8 items-center justify-center rounded-lg text-slate-400 transition hover:bg-white/[0.06] hover:text-slate-200",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-4.5 w-4.5","aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"5",r:"1.7"}),e.jsx("circle",{cx:"12",cy:"12",r:"1.7"}),e.jsx("circle",{cx:"12",cy:"19",r:"1.7"})]})}),o&&e.jsx("div",{role:"menu",className:`absolute top-full z-20 mt-1 w-48 overflow-hidden rounded-xl border border-white/[0.08] bg-ink-900 py-1 shadow-xl shadow-black/30 ${l==="right"?"right-0":"left-0"}`,children:s.map(d=>e.jsxs("button",{type:"button",role:"menuitem",disabled:d.disabled,onClick:()=>{c(!1),d.onClick()},className:`flex w-full items-center gap-2.5 px-3.5 py-2 text-left text-xs font-medium transition disabled:cursor-not-allowed disabled:opacity-40 ${d.tone==="danger"?"text-red-400 hover:bg-red-500/10":"text-slate-300 hover:bg-white/[0.05] hover:text-white"}`,children:[d.icon&&e.jsx("span",{className:"shrink-0 opacity-80",children:d.icon}),d.label]},d.key))})]})}const J={total:0,active:0,suspended:0,admins:0,total_balance:0};function de(){const[s,l]=a.useState([]),[j,o]=a.useState(J),[c,u]=a.useState(!0),[d,f]=a.useState(null),[g,w]=a.useState(0),[h,L]=a.useState("all"),x=a.useCallback(()=>w(n=>n+1),[]);a.useEffect(()=>{let n=!1;u(!0);const p=h==="all"?"":`&status=${h}`;return A(`/admin/users?days=30${p}`).then(m=>{n||(l(m.users),o(m.summary??J),f(null))}).catch(m=>{n||f(m.message)}).finally(()=>{n||u(!1)}),()=>{n=!0}},[g,h]);const y=a.useCallback(async(n,p)=>{const m=`/admin/users/${n}/${p?"reactivate":"suspend"}`;await A(m,{method:"POST"}),x()},[x]),_=a.useCallback(async n=>{await A(`/admin/users/${n}`,{method:"DELETE"}),x()},[x]),k=a.useCallback(async(n,p)=>{await A(`/admin/users/${n}/balance`,{method:"PATCH",body:{balance:p}}),x()},[x]);return{users:s,summary:j,loading:c,error:d,refresh:x,status:h,setStatus:L,setActive:y,removeUser:_,setBalance:k}}function M({label:s,value:l,tone:j="default",bare:o=!1}){const c={default:"text-white",success:"text-emerald-300",danger:"text-red-300",info:"text-blue-300"};return e.jsxs("div",{className:o?"":"rounded-xl border border-white/[0.06] bg-white/[0.02] px-4 py-3",children:[e.jsx("p",{className:"text-[10px] font-medium uppercase tracking-wider text-slate-500",children:s}),e.jsx("p",{className:`mt-1 text-xl font-bold tabular-nums sm:text-2xl ${c[j]}`,children:l})]})}function oe({className:s="h-4 w-4"}){return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:[e.jsx("circle",{cx:"9",cy:"8",r:"3.5",stroke:"currentColor",strokeWidth:"1.7"}),e.jsx("path",{d:"M3.5 20c.6-3.5 2.8-5.5 5.5-5.5s4.9 2 5.5 5.5M16 4.8a3.5 3.5 0 0 1 0 6.4m1.5 3.8c1.8.8 2.8 2.4 3 5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function ce({className:s="h-4 w-4"}){return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"12",r:"8.5",stroke:"currentColor",strokeWidth:"1.7"}),e.jsx("path",{d:"m8.5 12.2 2.4 2.4 4.6-5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}function xe({className:s="h-4 w-4"}){return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"12",r:"8.5",stroke:"currentColor",strokeWidth:"1.7"}),e.jsx("path",{d:"m5.6 5.6 12.8 12.8",stroke:"currentColor",strokeWidth:"1.7"})]})}function me({className:s="h-4 w-4"}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:e.jsx("path",{d:"M12 3.5 5 6v5.5c0 4.2 2.9 7.6 7 9 4.1-1.4 7-4.8 7-9V6l-7-2.5z",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"})})}function ue({className:s="h-4 w-4"}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:e.jsx("path",{d:"M4 20V10m5.5 10V4m5.5 16v-7m5.5 7V7",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function he({className:s="h-4 w-4"}){return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:[e.jsx("path",{d:"M4 7.5A2.5 2.5 0 0 1 6.5 5H18a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6.5A2.5 2.5 0 0 1 4 16.5v-9z",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 12.5h3.5a1.5 1.5 0 0 1 0 3H15a1.5 1.5 0 0 1 0-3z",fill:"currentColor"})]})}function pe({className:s="h-4 w-4"}){return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"12",r:"8.5",stroke:"currentColor",strokeWidth:"1.7"}),e.jsx("path",{d:"m5.6 5.6 12.8 12.8",stroke:"currentColor",strokeWidth:"1.7"})]})}function be({className:s="h-4 w-4"}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:e.jsx("path",{d:"M20 8v4h-4M19.2 12a7.5 7.5 0 1 1-2-5.2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function je({className:s="h-4 w-4"}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0,children:e.jsx("path",{d:"M4 7h16m-9 4v6m4-6v6M6.5 7l1 13h9l1-13M9.5 7V4h5v3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function Se(){const{users:s,summary:l,loading:j,error:o,status:c,setStatus:u,setActive:d,removeUser:f,setBalance:g}=de(),w=ae(),[h,L]=a.useState(""),[x,y]=a.useState(null),[_,k]=a.useState(!1),[n,p]=a.useState(null),[m,$]=a.useState(""),[I,U]=a.useState(!1),[H,v]=a.useState(null),[X,C]=a.useState(!1),[r,O]=a.useState(null),[W,D]=a.useState(""),[P,V]=a.useState(!1),[q,S]=a.useState(null),Z=async()=>{if(r){V(!0),S(null);try{await f(r.id),C(!1),O(null),D("")}catch(t){S(t instanceof Error?t.message:"Gagal menghapus akun"),V(!1)}}},ee=t=>{O(t),D(""),S(null),C(!0)},te=t=>{p(t),$(String(Number(t.balance)||0)),v(null),k(!0)},se=async()=>{if(!n)return;const t=m.trim();if(!/^\d+(\.\d{1,6})?$/.test(t)){v("Saldo tidak valid (angka ≥ 0, maks 6 desimal).");return}const i=Number(t);if(!Number.isFinite(i)||i<0||i>1e9){v("Saldo di luar rentang (0 – Rp1.000.000.000).");return}U(!0),v(null);try{await g(n.id,t),k(!1),p(null),$("")}catch(z){v(z instanceof Error?z.message:"Gagal menyimpan saldo"),U(!1)}},B=a.useMemo(()=>{const t=h.trim().toLowerCase();return t?s.filter(i=>i.email.toLowerCase().includes(t)||i.name.toLowerCase().includes(t)):s},[s,h]),K=async t=>{y(t.id);try{await d(t.id,t.is_active!==1)}catch{}finally{y(null)}},T=t=>{const i=[{key:"analytics",label:"Analisa",icon:e.jsx(ue,{}),onClick:()=>w(`/admin/analytics?user=${t.id}`)}];return Number(t.is_admin)!==1&&(i.push({key:"balance",label:"Edit Saldo",icon:e.jsx(he,{}),onClick:()=>te(t)}),i.push(Number(t.is_active)===1?{key:"suspend",label:"Suspend",icon:e.jsx(pe,{}),disabled:x===t.id,onClick:()=>K(t)}:{key:"reactivate",label:"Reaktivasi",icon:e.jsx(be,{}),disabled:x===t.id,onClick:()=>K(t)}),i.push({key:"delete",label:"Hapus",tone:"danger",icon:e.jsx(je,{}),onClick:()=>ee(t)})),i};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4 lg:gap-4",children:[e.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-white/[0.06] bg-white/[0.02] p-4 sm:p-5",children:[e.jsx("div",{className:"pointer-events-none absolute -right-3 -top-3 text-slate-700/50",children:e.jsx(oe,{className:"h-10 w-10"})}),e.jsx(M,{bare:!0,label:"Total Pengguna",value:String(l.total)}),e.jsxs("p",{className:"mt-1.5 text-[10px] text-slate-500",children:[l.active," aktif · ",l.suspended," suspend"]})]}),e.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-emerald-500/15 bg-emerald-500/[0.05] p-4 sm:p-5",children:[e.jsx("div",{className:"pointer-events-none absolute -right-3 -top-3 text-emerald-700/40",children:e.jsx(ce,{className:"h-10 w-10"})}),e.jsx(M,{bare:!0,label:"Aktif",value:String(l.active),tone:"success"}),e.jsx("p",{className:"mt-1.5 text-[10px] text-slate-500",children:l.total>0?`${Math.round(l.active/l.total*100)}% dari total`:"—"})]}),e.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-red-500/15 bg-red-500/[0.05] p-4 sm:p-5",children:[e.jsx("div",{className:"pointer-events-none absolute -right-3 -top-3 text-red-700/40",children:e.jsx(xe,{className:"h-10 w-10"})}),e.jsx(M,{bare:!0,label:"Suspend",value:String(l.suspended),tone:"danger"}),e.jsx("p",{className:"mt-1.5 text-[10px] text-slate-500",children:l.suspended>0?"Perlu perhatian":"Tidak ada suspend"})]}),e.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-white/[0.06] bg-white/[0.02] p-4 sm:p-5",children:[e.jsx("div",{className:"pointer-events-none absolute -right-3 -top-3 text-slate-700/50",children:e.jsx(me,{className:"h-10 w-10"})}),e.jsx(M,{bare:!0,label:"Total Saldo Wallet",value:ie(l.total_balance)}),e.jsxs("p",{className:"mt-1.5 text-[10px] text-slate-500",children:[l.admins," admin terdaftar"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2.5",children:[[{key:"all",label:"Semua"},{key:"active",label:"Aktif"},{key:"suspended",label:"Suspend"},{key:"admin",label:"Admin"}].map(t=>e.jsx("button",{type:"button",onClick:()=>u(t.key),className:`rounded-full border px-4 py-2 text-xs font-semibold transition ${c===t.key?"border-blue-400/40 bg-blue-500/15 text-blue-200":"border-white/[0.08] bg-white/[0.02] text-slate-400 hover:bg-white/[0.05] hover:text-slate-200"}`,children:t.label},t.key)),e.jsxs("span",{className:"w-full text-xs text-slate-600 sm:ml-auto sm:w-auto",children:["Menampilkan ",B.length," dari ",l.total," pengguna"]})]}),e.jsxs(ne,{children:[e.jsx(re,{title:"Daftar Pengguna",subtitle:"Akun & pemakaian 30 hari terakhir",action:e.jsx("input",{type:"search",placeholder:"Cari nama / email…",value:h,onChange:t=>L(t.target.value),className:"input-solid w-full sm:w-56"})}),e.jsxs(le,{className:"p-0",children:[o&&e.jsxs("div",{className:"p-5 text-sm text-red-300",children:["Gagal memuat: ",o]}),j?e.jsx("div",{className:"space-y-3 p-4 sm:p-5",children:[...Array(4)].map((t,i)=>e.jsx("div",{className:"h-20 animate-pulse rounded-xl bg-white/[0.02]"},i))}):B.length===0?e.jsx("div",{className:"px-5 py-10 text-center text-sm text-slate-500",children:"Tidak ada pengguna yang cocok."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"divide-y divide-white/[0.04] md:hidden",children:B.map(t=>e.jsxs("div",{onClick:()=>w(`/admin/users/${t.id}`),className:"cursor-pointer p-4 transition-colors hover:bg-white/[0.02] sm:p-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-ink-700 text-xs font-semibold text-white",children:t.name.charAt(0).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"flex flex-wrap items-center gap-2 font-medium text-white",children:[e.jsx("span",{className:"truncate",children:t.name}),Number(t.is_admin)===1&&e.jsx(b,{tone:"info",children:"Admin"}),Number(t.is_unlimited)===1&&e.jsx(b,{tone:"warning",children:"Unlimited"}),Number(t.is_active)===1?e.jsx(b,{tone:"success",children:"Aktif"}):e.jsx(b,{tone:"danger",children:"Suspend"})]}),e.jsx("p",{className:"truncate text-xs text-slate-500",children:t.email}),e.jsxs("p",{className:"mt-0.5 text-[10px] tabular-nums text-slate-600",children:["Terdaftar ",Y(t.created_at)]})]})]}),e.jsxs("div",{className:"mt-3.5 grid grid-cols-2 gap-2.5 text-xs",children:[e.jsxs("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.02] px-3 py-2",children:[e.jsx("p",{className:"text-[10px] text-slate-500",children:"Saldo"}),e.jsx("p",{className:"mt-0.5 font-semibold tabular-nums text-slate-200",children:R(t.balance)})]}),e.jsxs("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.02] px-3 py-2",children:[e.jsx("p",{className:"text-[10px] text-slate-500",children:"Requests"}),e.jsx("p",{className:"mt-0.5 font-semibold tabular-nums text-slate-200",children:t.requests})]}),e.jsxs("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.02] px-3 py-2",children:[e.jsx("p",{className:"text-[10px] text-slate-500",children:"Input"}),e.jsx("p",{className:"mt-0.5 font-medium tabular-nums text-slate-300",children:N(t.input_tokens)})]}),e.jsxs("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.02] px-3 py-2",children:[e.jsx("p",{className:"text-[10px] text-slate-500",children:"Output"}),e.jsx("p",{className:"mt-0.5 font-medium tabular-nums text-slate-300",children:N(t.output_tokens)})]})]}),e.jsx("div",{className:"mt-3.5 flex items-center justify-end border-t border-white/[0.04] pt-3",onClick:i=>i.stopPropagation(),children:e.jsx(Q,{items:T(t)})})]},t.id))}),e.jsx("div",{className:"hidden overflow-x-auto md:block",children:e.jsxs("table",{className:"w-full min-w-[820px] text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/[0.06] bg-white/[0.02] text-[11px] uppercase tracking-wider text-slate-500",children:[e.jsx("th",{className:"px-5 py-3 font-semibold",children:"Pengguna"}),e.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Saldo"}),e.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Requests"}),e.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Input"}),e.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Cached"}),e.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Output"}),e.jsx("th",{className:"px-4 py-3 font-semibold",children:"Status"}),e.jsx("th",{className:"px-4 py-3 font-semibold",children:"Terdaftar"}),e.jsx("th",{className:"px-5 py-3 text-right font-semibold",children:"Aksi"})]})}),e.jsx("tbody",{children:B.map(t=>e.jsxs("tr",{onClick:()=>w(`/admin/users/${t.id}`),className:"cursor-pointer border-b border-white/[0.04] align-middle transition-colors last:border-0 hover:bg-white/[0.02]",children:[e.jsx("td",{className:"px-5 py-3.5",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-ink-700 text-xs font-semibold text-white",children:t.name.charAt(0).toUpperCase()}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"flex items-center gap-2 font-medium text-white",children:[t.name,Number(t.is_admin)===1&&e.jsx(b,{tone:"info",children:"Admin"}),Number(t.is_unlimited)===1&&e.jsx(b,{tone:"warning",children:"Unlimited"})]}),e.jsx("p",{className:"truncate text-xs text-slate-500",children:t.email})]})]})}),e.jsx("td",{className:"px-4 py-3.5 text-right font-medium tabular-nums text-slate-300",children:R(t.balance)}),e.jsx("td",{className:"px-4 py-3.5 text-right font-medium tabular-nums whitespace-nowrap text-slate-300",children:t.requests}),e.jsx("td",{className:"px-4 py-3.5 text-right font-medium tabular-nums whitespace-nowrap text-slate-400",children:N(t.input_tokens)}),e.jsx("td",{className:"px-4 py-3.5 text-right font-medium tabular-nums whitespace-nowrap text-slate-500",children:N(t.cached_tokens)}),e.jsx("td",{className:"px-4 py-3.5 text-right font-medium tabular-nums whitespace-nowrap text-slate-400",children:N(t.output_tokens)}),e.jsx("td",{className:"px-4 py-3.5",children:Number(t.is_active)===1?e.jsx(b,{tone:"success",children:"Aktif"}):e.jsx(b,{tone:"danger",children:"Suspend"})}),e.jsx("td",{className:"px-4 py-3.5 text-xs tabular-nums text-slate-500",children:Y(t.created_at)}),e.jsx("td",{className:"px-5 py-3.5 text-right",children:e.jsx("div",{className:"flex items-center justify-end",onClick:i=>i.stopPropagation(),children:e.jsx(Q,{items:T(t)})})})]},t.id))})]})})]})]})]}),e.jsx(G,{open:X,onClose:()=>{P||C(!1)},title:"Hapus Akun Permanen",subtitle:"Tindakan ini tidak dapat dibatalkan",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-xl border border-red-500/25 bg-red-500/10 px-4 py-3 text-xs leading-relaxed text-red-300",children:["Anda akan ",e.jsx("strong",{children:"menghapus permanen"})," akun"," ",e.jsx("strong",{children:r==null?void 0:r.name})," (",e.jsx("strong",{children:r==null?void 0:r.email}),"). Semua data akan hilang: saldo, transaksi, API key, riwayat pemakaian, paket, dan sesi. Tindakan ini tidak bisa dikembalikan."]}),e.jsx(F,{label:`Ketik email untuk konfirmasi: ${(r==null?void 0:r.email)??""}`,value:W,onChange:t=>{D(t.target.value),S(null)},placeholder:(r==null?void 0:r.email)??"",autoFocus:!0}),q&&e.jsx("p",{className:"text-xs font-medium text-red-400",children:q}),e.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[e.jsx(E,{variant:"ghost",onClick:()=>C(!1),disabled:P,children:"Batal"}),e.jsx(E,{variant:"danger",isLoading:P,disabled:W.trim()!==(r==null?void 0:r.email),onClick:Z,children:"Ya, Hapus Permanen"})]}),W.trim()!==(r==null?void 0:r.email)&&e.jsx("p",{className:"text-right text-[11px] text-slate-500",children:"Ketik email lengkap untuk mengaktifkan tombol."})]})}),e.jsx(G,{open:_,onClose:()=>{I||k(!1)},title:"Edit Saldo Wallet",subtitle:n?`${n.name} · ${n.email}`:"",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] px-4 py-3 text-xs",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-slate-500",children:"Saldo saat ini"}),e.jsx("span",{className:"font-semibold tabular-nums text-slate-200",children:n?R(n.balance):"…"})]}),e.jsxs("p",{className:"mt-1.5 text-[11px] leading-relaxed text-slate-500",children:["Saldo akan di-",e.jsx("strong",{children:"set"})," ke nilai baru (bukan ditambah/dikurangi). Perubahan dicatat di riwayat transaksi."]})]}),e.jsx(F,{label:"Saldo baru (IDR)",type:"number",min:0,step:1e3,inputMode:"decimal",placeholder:"cth: 25000",value:m,onChange:t=>{$(t.target.value),v(null)},autoFocus:!0}),H&&e.jsx("p",{className:"text-xs font-medium text-red-400",children:H}),e.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[e.jsx(E,{variant:"ghost",onClick:()=>k(!1),disabled:I,children:"Batal"}),e.jsx(E,{isLoading:I,disabled:m.trim()==="",onClick:se,children:"Simpan Saldo"})]})]})})]})}export{Se as default};