import{j as e,$ as l}from"./app-DZfefqwY.js";/* empty css            */const n=({tagihans:t})=>{const a=s=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR",minimumFractionDigits:0}).format(s),r=s=>{switch(s){case"lunas":return e.jsx("span",{className:"rounded-full bg-green-100 px-2 py-1 text-xs font-semibold text-green-800",children:"Lunas"});case"belum_lunas":return e.jsx("span",{className:"rounded-full bg-yellow-100 px-2 py-1 text-xs font-semibold text-yellow-800",children:"Belum Lunas"});case"jatuh_tempo":return e.jsx("span",{className:"rounded-full bg-red-100 px-2 py-1 text-xs font-semibold text-red-800",children:"Jatuh Tempo"});default:return e.jsx("span",{className:"rounded-full bg-gray-100 px-2 py-1 text-xs font-semibold text-gray-800",children:s})}};return e.jsx("div",{className:"py-6",children:e.jsx("div",{className:"mx-auto max-w-7xl sm:px-6 lg:px-8",children:e.jsx("div",{className:"overflow-hidden bg-white shadow-sm sm:rounded-lg",children:e.jsxs("div",{className:"border-b border-gray-200 bg-white p-6",children:[e.jsxs("div",{className:"mb-6 flex flex-col space-y-4 md:flex-row md:items-center md:space-y-0 md:space-x-4",children:[e.jsxs("div",{className:"w-full md:w-1/3",children:[e.jsx("label",{htmlFor:"search",className:"block text-sm font-medium text-gray-700",children:"Cari Nomor Tagihan"}),e.jsx("input",{type:"text",id:"search",className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",placeholder:"Cari..."})]}),e.jsxs("div",{className:"w-full md:w-1/3",children:[e.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700",children:"Status"}),e.jsxs("select",{id:"status",className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",children:[e.jsx("option",{value:"",children:"Semua Status"}),e.jsx("option",{value:"lunas",children:"Lunas"}),e.jsx("option",{value:"belum_lunas",children:"Belum Lunas"}),e.jsx("option",{value:"jatuh_tempo",children:"Jatuh Tempo"})]})]}),e.jsx("div",{className:"flex w-full items-end md:w-1/3",children:e.jsx("button",{type:"button",className:"rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-none",children:"Filter"})})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[e.jsx("thead",{className:"bg-gray-50",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium tracking-wider text-gray-500 uppercase",children:"No. Tagihan"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium tracking-wider text-gray-500 uppercase",children:"Tanggal Tagihan"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium tracking-wider text-gray-500 uppercase",children:"Jatuh Tempo"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium tracking-wider text-gray-500 uppercase",children:"Jumlah"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium tracking-wider text-gray-500 uppercase",children:"Status"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium tracking-wider text-gray-500 uppercase",children:"Aksi"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:t.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"text-sm font-medium text-gray-900",children:s.nomor_tagihan})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"text-sm text-gray-500",children:new Date(s.tanggal_tagihan).toLocaleDateString("id-ID")})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"text-sm text-gray-500",children:new Date(s.jatuh_tempo).toLocaleDateString("id-ID")})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("div",{className:"text-sm font-medium text-gray-900",children:a(s.jumlah)})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:r(s.status)}),e.jsx("td",{className:"px-6 py-4 text-sm font-medium whitespace-nowrap",children:e.jsx(l,{href:route("tagihan.detail",s.id),className:"text-indigo-600 hover:text-indigo-900",children:"Detail"})})]},s.id))})]})})]})})})})};export{n as default};
