import{r as n,j as e}from"./login-aN2dRsX6.js";import{a as u}from"./query-c3dDncii.js";import{D as d}from"./DataTable-D2rA17vR.js";import{M as s}from"./Modal-Dn58D0E5.js";const j=({onSelected:l})=>{const[o,i]=n.useState(!1),m=()=>{i(!0)},t=()=>{i(!1)},r=u(),c=n.useMemo(()=>[{label:e.jsx("center",{children:"ID"}),width:120,align:"center",value:a=>a.id},{label:"Nama Lengkap",value:a=>a.nama_lengkap},{label:"Alamat",value:a=>a.alamat},{label:e.jsx("center",{children:"RT"}),width:80,align:"center",value:a=>a.rt},{label:e.jsx("center",{children:"RW"}),width:80,align:"center",value:a=>a.rw},{label:"Kelurahan",value:a=>a.kelurahan},{label:"Kecamatan",value:a=>a.kecamatan},{label:e.jsx("center",{}),width:80,align:"center",value:a=>e.jsx("span",{className:"badge text-bg-primary c-pointer",onClick:()=>{t(),l==null||l(a)},children:"Pilih"})}],[l]);return{modal:n.useMemo(()=>e.jsxs(s,{show:o,onHide:t,size:"xl",scrollable:!0,dialogClassName:"modal-transparent",children:[e.jsx(s.Header,{closeButton:!0,children:e.jsx("h5",{className:"m-0",children:"Daftar Anggota"})}),e.jsx(s.Body,{children:e.jsx(d,{data:r.data??[],column:c,search:!0,pagination:!0,item_per_page:13,loading:r.isLoading})}),e.jsx(s.Footer,{children:e.jsx("button",{className:"btn btn-primary",onClick:t,children:"Tutup"})})]}),[r.data,r.isLoading,c,o]),open:m,close:t}};export{j as u};
