module.exports=[69397,a=>{"use strict";var b=a.i(83174);a.s(["X",()=>b.default])},51970,a=>{"use strict";let b=(0,a.i(7879).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);a.s(["Edit",()=>b],51970)},70495,a=>{"use strict";let b=(0,a.i(7879).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);a.s(["Save",()=>b],70495)},38277,a=>{"use strict";var b=a.i(81139),c=a.i(99718),d=a.i(73086),e=a.i(6285),f=a.i(91243);let g=(0,f.createServerReference)("603ce0c2907fd5239c164b5e1ea10b93ea5959118e",f.callServer,void 0,f.findSourceMapURL,"updateUserQuota");var h=a.i(51970),i=a.i(70495),j=a.i(69397),k=a.i(13461);function l({initialData:a}){let[f,l]=(0,c.useState)(a),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(0),[q,r]=(0,c.useState)(!1),s=()=>{n(null)},t=async a=>{r(!0);try{let b=await g(a,o);b.success?(e.toast.success(b.message),l(f.map(b=>b.id===a?{...b,shortlink_quota:o}:b)),n(null)):e.toast.error(b.message)}catch(a){e.toast.error("Gagal memperbarui kuota",{description:a.message})}finally{r(!1)}},u=f.filter(a=>"admin"!==a.username);return(0,b.jsx)("div",{className:"space-y-4",children:(0,b.jsx)("div",{className:"border border-border/50 rounded-xl overflow-hidden bg-background",children:(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,b.jsx)("thead",{className:"bg-muted/50 text-muted-foreground font-medium border-b border-border/50",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-4 py-3",children:"Nama Akun (Bidang)"}),(0,b.jsx)("th",{className:"px-4 py-3",children:"Username"}),(0,b.jsx)("th",{className:"px-4 py-3 text-center",children:"Kuota LASER"}),(0,b.jsx)("th",{className:"px-4 py-3 text-right",children:"Aksi"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:u.length>0?u.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/30 transition-colors",children:[(0,b.jsx)("td",{className:"px-4 py-3 font-medium text-foreground",children:a.name}),(0,b.jsxs)("td",{className:"px-4 py-3 text-muted-foreground font-mono text-xs",children:["@",a.username]}),(0,b.jsx)("td",{className:"px-4 py-3 text-center",children:m===a.id?(0,b.jsx)(k.Input,{type:"number",min:"0",value:o,onChange:a=>p(parseInt(a.target.value)||0),className:"w-20 text-center mx-auto h-8"}):(0,b.jsx)("span",{className:"font-bold text-lg",children:a.shortlink_quota??5})}),(0,b.jsx)("td",{className:"px-4 py-3 text-right",children:(0,b.jsx)("div",{className:"flex justify-end gap-1",children:m===a.id?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-emerald-600 hover:text-emerald-700 hover:bg-emerald-50",onClick:()=>t(a.id),disabled:q,children:(0,b.jsx)(i.Save,{className:"h-4 w-4"})}),(0,b.jsx)(d.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-neutral-500 hover:bg-neutral-100",onClick:s,disabled:q,children:(0,b.jsx)(j.X,{className:"h-4 w-4"})})]}):(0,b.jsx)(d.Button,{variant:"ghost",size:"icon",className:"h-8 w-8 text-blue-600 hover:text-blue-700 hover:bg-blue-50",onClick:()=>{n(a.id),p(a.shortlink_quota||0)},children:(0,b.jsx)(h.Edit,{className:"h-4 w-4"})})})})]},a.id)):(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:4,className:"p-10 text-center text-muted-foreground",children:"Belum ada data akun bidang."})})})]})})})})}a.s(["default",()=>l],38277)}];

//# sourceMappingURL=_gemini_antigravity_scratch_HMF%20FPMIPA%20UPI_78b818d1._.js.map