import{d as p,r as d,w as u,W as m,H as i,c as f,o as h,g as b,b as n,v as y}from"./app-DJb_CRLj.js";import{D as w}from"./debounce-CDPmhVE8.js";const g={class:"search-file-container mb-3",action:"javascript:void(0)"},k=["placeholder"],x=p({__name:"SearchList",props:{placeholder:{},keyword:{},s:{type:Boolean},routeParam:{}},setup(l){const s=l,c=(...r)=>{let e=i().url;if(e.indexOf("?")===-1)return{};e=e.substring(e.indexOf("?")+1);let t=Object.fromEntries(new URLSearchParams(e));for(let a in t)(a=="page"||a=="p")&&delete t[a];return Object.assign(t,...r)},o=d(s.keyword.search);return u(o,w(r=>{let e={...c(),search:r};s.s!=null&&s.s&&(e={...c(),s:r}),(r==null||r=="")&&(delete e.search,delete e.s),m.get(route(i().props.currentRouteName,s.routeParam),e,{preserveState:!0,replace:!0})},300)),(r,e)=>(h(),f("form",g,[b(n("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),class:"form-control",type:"text",name:"keyword",placeholder:r.placeholder},null,8,k),[[y,o.value]]),e[1]||(e[1]=n("button",{class:"btn btn-primary",type:"button"},[n("i",{class:"ri-search-2-line"})],-1))]))}});export{x as _};
