import{q as p,r as u,j as l}from"./app-Bup04Qnx.js";import{W as f}from"./WithModal-CbKxT3eW.js";import{D as i}from"./DetailModalItem-BOaAAJ7m.js";const k=e=>{var r;const{id:t,data:a=null,tableHeader:c,content:o=null,handleClick:s,size:d="",label:m=null}=e,{props:x}=p(),n=`detail_${t}`,b=u.useRef();return l.jsx(f,{type:n,backdrop:!0,onClick:s,modalBoxSize:d,children:l.jsxs("form",{action:"",children:[l.jsx("h1",{className:"text-lg font-bold",children:m??`Detail ${(r=x.page)==null?void 0:r.label}`}),l.jsx("div",{className:"",children:a&&o&&typeof o=="function"?o(a):l.jsx(i,{data:a,tableHeader:c})}),l.jsx("div",{className:"modal-action",children:l.jsx("label",{ref:b,onClick:s,htmlFor:`modal_${n}`,className:"btn btn-sm btn-neutral btn-outline",children:"Kembali"})})]})})},M=(e,t)=>l.jsx("div",{className:"w-full border p-2",children:l.jsx(i,{data:e,tableHeader:t})});export{k as D,M as a};
