import{r as o,j as a}from"./app-Bup04Qnx.js";import{W as r}from"./WithModal-CbKxT3eW.js";const x=({id:s,action:m,form:i,handleSubmit:l})=>{const n=o.useRef(),{processing:t}=i;return a.jsx(r,{type:s,backdrop:!0,size:"max-w-md",boxClassName:"modal-box",children:a.jsxs("div",{className:"flex flex-col gap-4",children:[a.jsx("h3",{className:"font-bold text-lg",children:"Konfirmasi Simpan"}),a.jsx("p",{className:"text-sm text-gray-500",children:"Apakah anda yakin ingin menyimpan data realisasi ini?"}),a.jsxs("div",{className:"modal-action",children:[a.jsx("label",{ref:n,htmlFor:`modal_${s}`,className:"btn btn-sm btn-ghost",children:"Batal"}),a.jsxs("button",{onClick:()=>l(()=>{var e;return(e=n.current)==null?void 0:e.click()}),className:"btn btn-sm btn-primary",disabled:t,children:[t&&a.jsx("span",{className:"loading loading-spinner loading-xs"}),"Ya, Simpan"]})]})]})})};export{x as default};
