import{j as a,q as o,J as u}from"./app-Bup04Qnx.js";import{A as b}from"./AuthenticatedLayout-BdDF4YYO.js";import{T as x}from"./Table-B-yOTLCP.js";import{u as h}from"./format-CisCU4Rs.js";import"./index-DdNKWgRS.js";import"./clsx-B-dksMZM.js";import"./index-CtjruoRR.js";import"./floating-ui.dom-CwWDmSD9.js";import"./index-Dy_g3AZ5.js";import"./WithModal-CbKxT3eW.js";import"./Select-Cs0aMrtU.js";import"./BaseForm-wkPKZ5Eg.js";import"./table-2-B1MKhBGJ.js";function r(t){return a.jsx(b,{title:t==null?void 0:t.title,children:a.jsx(c,{})})}const c=t=>{var l,n,s;let{tableHeader:i=null}=t;const{props:e}=o();return i||(i=d()),a.jsx(a.Fragment,{children:a.jsx(x,{search:!0,addButton:!1,tableHeader:i,tableBody:((n=e==null?void 0:e[(l=e==null?void 0:e.page)==null?void 0:l.name])==null?void 0:n.data)??[],tablePage:e==null?void 0:e[(s=e==null?void 0:e.page)==null?void 0:s.name],tableAction:m=>a.jsx(a.Fragment,{children:a.jsx("li",{children:a.jsx(u,{href:`/app/notifications/${m.id}`,className:"",children:"Lihat Notifikasi"})})}),...t})})},d=()=>{const{page:t,isAdmin:i,location:e}=o().props;return h(e),[{label:"#",value:"id",type:"numbering"},{value:"title",label:"Judul",isSearchable:!0,className:"text-[13px] w-[10%] md:w-[200px] !whitespace-pre"},{value:"message",label:"Pesan",isSearchable:!0},{value:"is_read",label:"Dibaca",type:"boolean"},{label:"Waktu",value:"created_at",type:"date",isSearchable:!0,className:"text-[13px] w-[10%] md:w-[100px] !whitespace-pre"},{label:"Aksi",value:"id",type:"action"}]},f=()=>[],p=({children:t})=>{const i=d();return t(i)},v=({children:t})=>{const i=f();return t(i)};r.Table=c;r.HeaderProvider=p;r.FilterProvider=v;const I=r;export{I as default};
