import{r as m,S as x,j as e}from"./app-DB4YCWeF.js";import{W as h}from"./WithModal-BI-p938E.js";const u=r=>{const{data:t,handleClick:s}=r,n=`delete_${t==null?void 0:t.id}`,a=m.useRef(),{delete:c,processing:l}=x(),o=d=>{d.preventDefault(),c(`/admin/configuration/${t.id}`,{onSuccess:()=>{var i;(i=a.current)==null||i.click()}})};return e.jsx(h,{type:n,backdrop:!0,onClick:s,children:e.jsxs("form",{action:"",children:[e.jsx("h1",{className:"text-lg font-bold",children:"Konfirmasi"}),e.jsx("p",{children:"Apakah anda yakin ingin menghapus konfigurasi ini?"}),e.jsx("p",{className:"text-xl font-semibold text-center",children:t==null?void 0:t.type}),e.jsxs("div",{className:"modal-action",children:[e.jsx("label",{ref:a,onClick:s,htmlFor:`modal_${n}`,className:"btn btn-sm btn-neutral btn-outline",children:"Batal"}),e.jsx("button",{onClick:o,className:"btn btn-sm btn-error bg-red-600 text-white ",disabled:l,children:e.jsx("span",{className:`${l&&"loading"}`,children:"Hapus"})})]})]})})};export{u as default};
