import{i as p,p as y,o,e as a,a as t,t as n,u as s,F as g,h as k,c as m,n as x,w as u,g as b,b as f,r as _,f as v}from"./app-WJL2kJBE.js";import{a as $}from"./AppLayout-BWrI3d7K.js";const V={class:"hidden lg:flex items-center justify-between"},C={class:"mr-4"},L={class:"flex flex-wrap -mb-1"},S=["innerHTML"],B={class:"flex items-center justify-between lg:hidden"},N={key:1,class:"inline-block whitespace-nowrap mr-1 mb-1 px-4 py-2 text-sm leading-4 shadow rounded-md text-gray-600 bg-gray-100 dark:bg-gray-800 cursor-default"},T={class:"mx-3"},j={key:3,class:"inline-block whitespace-nowrap mr-1 mb-1 px-4 py-2 text-sm leading-4 shadow rounded-md text-gray-600 bg-gray-100 dark:bg-gray-800 cursor-default"},q={__name:"Pagination",props:["meta","links"],setup(l){const e=l,{t:r}=p({});return(i,h)=>{const d=y("Link");return o(),a("div",null,[t("div",V,[t("div",C,n(s(r)("Showing from {from} to {to} of total {total} records",{from:e.meta.from,to:e.meta.to,total:e.meta.total})),1),t("div",L,[(o(!0),a(g,null,k(e.meta.links,(c,w)=>(o(),a(g,{key:"link_"+w},[c.url===null?(o(),a("div",{key:0,class:"mr-1 mb-1 px-4 py-2 text-sm leading-4 text-gray-400 dark:text-gray-600 shadow opacity-50 bg-white dark:bg-gray-800 rounded-md cursor-default",innerHTML:c.label},null,8,S)):(o(),m(d,{key:1,href:c.url,innerHTML:c.label,class:x([c.active?"bg-blue-600 border-blue-700 text-white":"bg-white dark:bg-gray-800","inline-block whitespace-nowrap mr-1 mb-1 px-4 py-2 text-sm leading-4 shadow rounded-md hover:bg-blue-700 hover:text-white hover:border-blue-700 focus:border-blue-600 focus:text-white"])},null,8,["href","innerHTML","class"]))],64))),128))])]),t("div",B,[e.links.prev?(o(),m(d,{key:0,href:e.links.prev,class:"inline-block whitespace-nowrap mr-1 mb-1 px-4 py-2 text-sm leading-4 shadow rounded-md bg-white dark:bg-gray-800 hover:bg-blue-700 hover:text-white hover:border-blue-700 focus:border-blue-600 focus:text-white"},{default:u(()=>[b(" « "+n(s(r)("Previous")),1)]),_:1},8,["href"])):(o(),a("span",N," « "+n(s(r)("Previous")),1)),t("div",T,n(s(r)("Showing from {from} to {to} of total {total} records",{from:e.meta.from,to:e.meta.to,total:e.meta.total})),1),e.links.next?(o(),m(d,{key:2,href:e.links.next,class:"inline-block whitespace-nowrap mr-1 mb-1 px-4 py-2 text-sm leading-4 shadow rounded-md bg-white dark:bg-gray-800 hover:bg-blue-700 hover:text-white hover:border-blue-700 focus:border-blue-600 focus:text-white"},{default:u(()=>[b(n(s(r)("Next"))+" » ",1)]),_:1},8,["href"])):(o(),a("span",j,n(s(r)("Next"))+" » ",1))])])}}},F={class:"mt-4 sm:mt-0 p-px w-full flex items-stretch justify-stretch group bg-white dark:bg-gray-900 border dark:border-gray-700 rounded-md focus-within:border-blue-300 focus-within:ring-2 focus-within:ring-blue-200 dark:focus-within:ring-opacity-50"},H={class:"relative w-full flex items-stretch"},M={class:"flex items-center w-full rounded-md"},z=["value","placeholder"],P={key:0,class:"flex items-stretch"},I={type:"button",class:"flex min-w-fit py-1 px-1 md:pl-2 md:pr-0 items-center justify-center rounded-r-md focus:outline-none relative transition duration-150 ease-in-out bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 focus:bg-gray-100 dark:focus:bg-gray-700"},O={class:"hidden md:block min-w-fit"},D={class:"p-4"},A={__name:"SearchFilter",props:{modelValue:String,close:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!0}},emits:["update:modelValue","reset"],setup(l){const{t:e}=p({});return(r,i)=>{const h=y("icons");return o(),a("div",F,[t("div",H,[t("div",M,[t("input",{type:"text",name:"search",autocomplete:"off",value:l.modelValue,placeholder:s(e)("Search"),class:x([{"rounded-l-md":!l.dropdown},"flex-1 text-sm z-0 w-full pl-3 pr-2 py-2 border-0 border-r border-gray-200 dark:border-gray-700 rounded-l-md focus:outline-none focus:ring-0 focus:border-0 dark:bg-gray-800"]),onInput:i[0]||(i[0]=d=>r.$emit("update:modelValue",d.target.value))},null,42,z)]),t("button",{type:"button",onClick:i[1]||(i[1]=d=>r.$emit("reset")),class:"hidden group-hover:block absolute top-0 my-1 right-2 px-2 py-1 text-sm text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 focus:text-blue-500 rounded-md focus:outline-none"},n(s(e)("Reset")),1)]),l.dropdown?(o(),a("div",P,[f($,{align:"right",width:"56",closeOnClick:l.close},{trigger:u(()=>[t("button",I,[t("span",O,n(s(e)("Filter")),1),f(h,{name:"chevron-down",size:"h-4 w-4 min-w-fit text-gray-400 md:mx-1"})])]),content:u(()=>[t("div",D,[_(r.$slots,"default")])]),_:3},8,["closeOnClick"])])):v("",!0)])}}};export{A as _,q as a};
