import{_ as s}from"./DMV8vdHs.js";import{d as a,a as l,h as e,i as c,b as d,P as r}from"./Dmpkuq_I.js";import{L as p,M as o,H as i,$ as t,c as n,f as u,A as h,u as x,G as m,O as w,V as v,x as g,W as y}from"./DOfEu912.js";import{_ as f}from"./DUtrifWY.js";import{_ as k}from"./C-A16w1-.js";import{_ as j}from"./BEvI9Du6.js";import"./D_PHhcf1.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"},P={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:"space-y-4"},L={class:"mt-10 flex justify-center gap-4"};const M=a({},[["render",function(a,l){const e=s;return p(),o("div",q,[i(e,{class:"h-[16px] w-[200px] mb-6 lg:mb-14"}),t("div",_,[t("div",V,[t("div",b,[i(e,{class:"h-[300px] w-[100%] rounded-md"}),i(e,{class:"h-[14px] w-[70%]"}),i(e,{class:"h-[14px] w-[40%]"}),i(e,{class:"h-[14px] w-[50%]"})]),t("div",$,[i(e,{class:"h-[300px] w-[100%] rounded-md"}),i(e,{class:"h-[14px] w-[70%]"}),i(e,{class:"h-[14px] w-[40%]"}),i(e,{class:"h-[14px] w-[50%]"})]),t("div",P,[i(e,{class:"h-[300px] w-[100%] rounded-md"}),i(e,{class:"h-[14px] w-[70%]"}),i(e,{class:"h-[14px] w-[40%]"}),i(e,{class:"h-[14px] w-[50%]"})]),t("div",A,[i(e,{class:"h-[300px] w-[100%] rounded-md"}),i(e,{class:"h-[14px] w-[70%]"}),i(e,{class:"h-[14px] w-[40%]"}),i(e,{class:"h-[14px] w-[50%]"})]),t("div",C,[i(e,{class:"h-[300px] w-[100%] rounded-md"}),i(e,{class:"h-[14px] w-[70%]"}),i(e,{class:"h-[14px] w-[40%]"}),i(e,{class:"h-[14px] w-[50%]"})]),t("div",D,[i(e,{class:"h-[300px] w-[100%] rounded-md"}),i(e,{class:"h-[14px] w-[70%]"}),i(e,{class:"h-[14px] w-[40%]"}),i(e,{class:"h-[14px] w-[50%]"})]),t("div",E,[i(e,{class:"h-[300px] w-[100%] rounded-md"}),i(e,{class:"h-[14px] w-[70%]"}),i(e,{class:"h-[14px] w-[40%]"}),i(e,{class:"h-[14px] w-[50%]"})]),t("div",F,[i(e,{class:"h-[300px] w-[100%] rounded-md"}),i(e,{class:"h-[14px] w-[70%]"}),i(e,{class:"h-[14px] w-[40%]"}),i(e,{class:"h-[14px] w-[50%]"})])]),t("div",L,[i(e,{class:"h-[30px] w-[60px]"}),i(e,{class:"h-[30px] w-[60px]"}),i(e,{class:"h-[30px] w-[60px]"})])])])}]]),N={key:0,class:"container my-10"},O={key:1,class:"my-10 container"},T={key:0},z={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"},G={class:"mt-10"},H={key:1},I={__name:"search",setup(s){var a;const q=l().$axios,_=e(),V=n(+(null==(a=_.query)?void 0:a.page)||1),{data:b,status:$}=c("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:P}=d(),A=u((()=>{var s,a;return[{name:P("NAV.home"),to:"/"},{name:P("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,e,c,d;const n=M,u=f,q=k,_=h("VPagination"),P=j;return"pending"===x($)?(p(),o("div",N,[i(n)])):"success"===x($)?(p(),o("div",O,[i(u,{"data-aos":"fade-right",items:x(A)},null,8,["items"]),(null==(e=null==(l=x(b))?void 0:l.data)?void 0:e.length)?(p(),o("div",T,[t("div",z,[(p(!0),o(m,null,w(null==(c=x(b))?void 0:c.data,(s=>(p(),v(q,{key:s.id,product:s},null,8,["product"])))),128))]),t("div",G,[i(_,{modelValue:x(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[r]||s.$route).query,{page:a})}))],pages:null==(d=x(b))?void 0:d.meta.last_page,"range-size":1,"active-color":"#DCEDFF"},null,8,["modelValue","pages"])])])):(p(),o("div",H,[i(P,{class:"!min-h-[35vh]"})]))])):y("",!0)}}};export{I as default};
