import{_ as s}from"./B6NdhJrI.js";import{d as a,a as l,h as c,i as e,b as r,P as p}from"./DkkR1ac8.js";import{L as o,M as i,H as d,$ as t,c as n,f as h,A as x,u,G as w,O as v,V as m,x as g,W as y}from"./DOfEu912.js";import{_ as f}from"./Bu0SLnXz.js";import{_ as k}from"./D5lkKAyn.js";import{_ as j}from"./CDGK9wbD.js";import"./Dnmkv-LO.js";import"./mqjJGHgV.js";const q={class:"my-10"},_={class:"flex-1 space-y-10 lg:col-span-9"},V={class:"grid grid-cols-1 xs:grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-y-8 gap-x-4"},b={class:"space-y-4"},$={class:"space-y-4"},L={class:"space-y-4"},O={class:"space-y-4"},A={class:"space-y-4"},C={class:"space-y-4"},D={class:"space-y-4"},E={class:"space-y-4"},F={class:"mt-10 flex justify-center gap-4"};const N=a({},[["render",function(a,l){const c=s;return o(),i("div",q,[d(c,{class:"h-[16px] w-[200px] mb-6 lg:mb-14"}),t("div",_,[t("div",V,[t("div",b,[d(c,{class:"h-[320px] w-[100%]"}),d(c,{class:"h-[14px] w-[70%]"}),d(c,{class:"h-[14px] w-[40%]"}),d(c,{class:"h-[14px] w-[50%]"})]),t("div",$,[d(c,{class:"h-[320px] w-[100%]"}),d(c,{class:"h-[14px] w-[70%]"}),d(c,{class:"h-[14px] w-[40%]"}),d(c,{class:"h-[14px] w-[50%]"})]),t("div",L,[d(c,{class:"h-[320px] w-[100%]"}),d(c,{class:"h-[14px] w-[70%]"}),d(c,{class:"h-[14px] w-[40%]"}),d(c,{class:"h-[14px] w-[50%]"})]),t("div",O,[d(c,{class:"h-[320px] w-[100%]"}),d(c,{class:"h-[14px] w-[70%]"}),d(c,{class:"h-[14px] w-[40%]"}),d(c,{class:"h-[14px] w-[50%]"})]),t("div",A,[d(c,{class:"h-[320px] w-[100%]"}),d(c,{class:"h-[14px] w-[70%]"}),d(c,{class:"h-[14px] w-[40%]"}),d(c,{class:"h-[14px] w-[50%]"})]),t("div",C,[d(c,{class:"h-[320px] w-[100%]"}),d(c,{class:"h-[14px] w-[70%]"}),d(c,{class:"h-[14px] w-[40%]"}),d(c,{class:"h-[14px] w-[50%]"})]),t("div",D,[d(c,{class:"h-[320px] w-[100%]"}),d(c,{class:"h-[14px] w-[70%]"}),d(c,{class:"h-[14px] w-[40%]"}),d(c,{class:"h-[14px] w-[50%]"})]),t("div",E,[d(c,{class:"h-[320px] w-[100%]"}),d(c,{class:"h-[14px] w-[70%]"}),d(c,{class:"h-[14px] w-[40%]"}),d(c,{class:"h-[14px] w-[50%]"})])]),t("div",F,[d(c,{class:"h-[30px] w-[60px]"}),d(c,{class:"h-[30px] w-[60px]"}),d(c,{class:"h-[30px] w-[60px]"})])])])}]]),P={key:0,class:"container my-10"},T={key:1,class:"my-10 container"},z={key:0},G={class:"grid grid-cols-1 mt-6 lg:mt-14 xs:grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-y-8 gap-x-4"},H={class:"mt-10"},I={key:1},K={__name:"search",setup(s){var a;const q=l().$axios,_=c(),V=n(+(null==(a=_.query)?void 0:a.page)||1),{data:b,status:$}=e("search",(()=>{var s,a;return q.get("search",{params:{keyword:null==(s=_.query)?void 0:s.keyword,page:null==(a=_.query)?void 0:a.page}}).then((s=>s.data)).catch((s=>s.response))}),{watch:[()=>{var s;return null==(s=_.query)?void 0:s.keyword},()=>{var s;return null==(s=_.query)?void 0:s.page}]}),{t:L}=r(),O=h((()=>{var s,a;return[{name:L("NAV.home"),to:"/"},{name:L("TITLES.search"),to:"",disabled:!0},{name:null==(s=_.query)?void 0:s.keyword,to:`/search?keyword=${null==(a=_.query)?void 0:a.keyword}`}]}));return(s,a)=>{var l,c,e,r;const n=N,h=f,q=k,_=x("VPagination"),L=j;return"pending"===u($)?(o(),i("div",P,[d(n)])):"success"===u($)?(o(),i("div",T,[d(h,{"data-aos":"fade-right",items:u(O)},null,8,["items"]),(null==(c=null==(l=u(b))?void 0:l.data)?void 0:c.length)?(o(),i("div",z,[t("div",G,[(o(!0),i(w,null,v(null==(e=u(b))?void 0:e.data,(s=>(o(),m(q,{key:s.id,product:s},null,8,["product"])))),128))]),t("div",H,[d(_,{modelValue:u(V),"onUpdate:modelValue":[a[0]||(a[0]=s=>g(V)?V.value=s:null),a[1]||(a[1]=a=>s.$router.push({query:Object.assign({},(s._.provides[p]||s.$route).query,{page:a})}))],pages:null==(r=u(b))?void 0:r.meta.last_page,"range-size":1,"active-color":"#DCEDFF"},null,8,["modelValue","pages"])])])):(o(),i("div",I,[d(L,{class:"!min-h-[35vh]"})]))])):y("",!0)}}};export{K as default};
