import{r as o,j as a}from"./login-aN2dRsX6.js";import{a as h}from"./api_laporan-C-kpoJQw.js";import{B as x}from"./button_submit-wN0ayemz.js";import{S as j}from"./Select-B6FG_hRH.js";import{M as l}from"./Modal-Dn58D0E5.js";import"./ThemeProvider-Cx_yflmw.js";import"./defineProperty-DRmM3rRU.js";import"./typeof-QjJsDpFa.js";import"./setPrototypeOf-B4fUID9J.js";import"./index-Ci65TyJp.js";import"./app-gmlkJjeD.js";import"./floating-ui.dom-C5vApqfE.js";const d=[{label:"1 : Aktif",value:"1"},{label:"0 : Non Aktif",value:"0"}];function T(){const[s,t]=o.useState({status:1}),r=b(),c=o.useCallback(async()=>{const n=await(await h(s)).json();console.log(n),r.open(n,s)},[s,r]);return a.jsxs(a.Fragment,{children:[a.jsx("div",{children:a.jsx("div",{className:"container",style:{width:640},children:a.jsxs("div",{className:"card rounded-4 shadow-lg",children:[a.jsx("div",{className:"card-header py-3 bg-transparent",children:a.jsx("h5",{className:"m-0",children:"Laporan Laba Rugi"})}),a.jsx("div",{className:"card-body",children:a.jsxs("div",{className:"row mb-2",children:[a.jsx("label",{className:"col-form-label col-md-4",children:"Status"}),a.jsx("div",{className:"col-md-8",children:a.jsx(j,{options:d,placeholder:"Pilih Status Anggota",value:d.find(e=>e.value===String(s.status)),onChange:e=>{t(e?{...s,status:Number(e.value)}:{...s,status:void 0})}})})]})}),a.jsx("div",{className:"card-footer py-3 justify-content-end d-flex bg-transparent",children:a.jsx(x,{className:"btn btn-primary",onClick:async()=>c(),children:"Sumbit"})})]})})}),r.modal]})}const b=()=>{const[s,t]=o.useState(!1),[r,c]=o.useState([]),[e,n]=o.useState(),m=(p,u)=>{n(u),c(p),t(!0)},i=()=>t(!1);return{modal:o.useMemo(()=>a.jsxs(l,{show:s,onHide:i,fullscreen:!0,children:[a.jsx(l.Header,{closeButton:!0,children:a.jsx("h6",{className:"m-0",children:"Laporan Laba Rugi"})}),a.jsx(l.Body,{className:"bg-secondary"}),a.jsx(l.Footer,{})]}),[r,s]),open:m,close:i}};export{T as default};
