import{j as c,L as y}from"./app-DC5MhnUn.js";import{c as x}from"./compiler-runtime-x4HYykYJ.js";function v(l){const e=x.c(9),{children:t,className:s,pagination:a}=l,o=s===void 0?"":s,r=a&&typeof a.total=="number"&&a.total>0&&typeof a.last_page=="number"&&a.last_page>1&&Array.isArray(a.links)&&a.links.length>0,n=`min-w-full divide-y divide-gray-200 dark:divide-gray-700 ${o}`;let i;e[0]!==t||e[1]!==n?(i=c.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsx("table",{className:n,children:t})})}),e[0]=t,e[1]=n,e[2]=i):i=e[2];let d;e[3]!==a||e[4]!==r?(d=r&&c.jsx(u,{pagination:a}),e[3]=a,e[4]=r,e[5]=d):d=e[5];let g;return e[6]!==i||e[7]!==d?(g=c.jsxs("div",{className:"space-y-4",children:[i,d]}),e[6]=i,e[7]=d,e[8]=g):g=e[8],g}function j(l){const e=x.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:c.jsx("tr",{children:t})}),e[0]=t,e[1]=s):s=e[1],s}function k(l){const e=x.c(3),{children:t,className:s}=l,o=`px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400 ${s===void 0?"":s}`;let r;return e[0]!==t||e[1]!==o?(r=c.jsx("th",{scope:"col",className:o,children:t}),e[0]=t,e[1]=o,e[2]=r):r=e[2],r}function w(l){const e=x.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx("tbody",{className:"divide-y divide-gray-200 bg-white dark:divide-gray-700 dark:bg-gray-800",children:t}),e[0]=t,e[1]=s):s=e[1],s}function $(l){const e=x.c(4),{children:t,className:s,onClick:a}=l,r=`transition-colors hover:bg-gray-50 dark:hover:bg-gray-700/50 ${a?"cursor-pointer":""} ${s===void 0?"":s}`;let n;return e[0]!==t||e[1]!==a||e[2]!==r?(n=c.jsx("tr",{className:r,onClick:a,children:t}),e[0]=t,e[1]=a,e[2]=r,e[3]=n):n=e[3],n}function T(l){const e=x.c(4),{children:t,className:s,colSpan:a}=l,r=`whitespace-nowrap px-6 py-4 text-sm text-gray-900 dark:text-gray-300 ${s===void 0?"":s}`;let n;return e[0]!==t||e[1]!==a||e[2]!==r?(n=c.jsx("td",{colSpan:a,className:r,children:t}),e[0]=t,e[1]=a,e[2]=r,e[3]=n):n=e[3],n}function u(l){const e=x.c(15),{pagination:t}=l,s=b;let a;e[0]!==t.data.length?(a=c.jsx("span",{className:"font-medium",children:t.data.length}),e[0]=t.data.length,e[1]=a):a=e[1];let o;e[2]!==t.total?(o=c.jsx("span",{className:"font-medium",children:t.total}),e[2]=t.total,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==o?(r=c.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Menampilkan ",a," dari"," ",o," hasil"]}),e[4]=a,e[5]=o,e[6]=r):r=e[6];let n;if(e[7]!==t.links){let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=(m,f)=>{if(m.url===null)return c.jsx("span",{className:`px-3 py-2 text-sm rounded-md ${m.active?"bg-[#d4af37] text-white dark:bg-[#b8941f]":"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300 cursor-not-allowed"}`,dangerouslySetInnerHTML:{__html:m.label}},f);const h=s(m.url);return c.jsx(y,{href:h||m.url,className:`px-3 py-2 text-sm rounded-md transition-colors ${m.active?"bg-[#d4af37] text-white dark:bg-[#b8941f]":"bg-white text-gray-700 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700"}`,dangerouslySetInnerHTML:{__html:m.label}},f)},e[9]=g):g=e[9],n=t.links.map(g),e[7]=t.links,e[8]=n}else n=e[8];let i;e[10]!==n?(i=c.jsx("div",{className:"flex flex-wrap items-center gap-2",children:n}),e[10]=n,e[11]=i):i=e[11];let d;return e[12]!==r||e[13]!==i?(d=c.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-200 bg-white px-4 py-3 dark:border-gray-700 dark:bg-gray-800 sm:px-6",children:[r,i]}),e[12]=r,e[13]=i,e[14]=d):d=e[14],d}function b(l){if(!l)return null;if(l.startsWith("/"))return l;try{const e=new URL(l);return e.pathname+e.search}catch{const e=l.match(/https?:\/\/[^/]+(.+)/);return e?e[1]:l}}export{$ as T,T as a,j as b,k as c,w as d,v as e};
