import{k as e}from"./client-only-CuDeK6DU.mjs";import{ref as o,watch as r,nextTick as a,computed as t,mergeProps as l,useSSRContext as s}from"vue";import{ssrRenderAttrs as n,ssrRenderComponent as u}from"vue/server-renderer";import{a as i,b as m,u as v}from"./server.mjs";import"../_/nitro.mjs";import"node:http";import"node:https";import"nitropack/dist/runtime/plugin";import"packrup";import"node:fs";import"node:url";import"consola/core";import"node:path";import"unhead";import"@unhead/shared";import"vue-router";import"pinia";import"axios";const c={__name:"HomeSearch",__ssrInlineRender:!0,setup(s){i();const{t:c,locale:d,setLocale:p}=m();let f=v();o("ar"==d.value?"اختر ماركة السيارة ":"choose car brand");let w=o("ar"==d.value?"اختر موديل السيارة ":"choose car model"),L=o("ar"==d.value?"اختر اسم السيارة ":"choose car name"),C=o(""),S=o(""),_=o("");o();let b=o(),g=o();const H=o(null),j=o(null),y=o(null),k=o(null),h=()=>{const e=k.value;(void 0).querySelector(".load-more-dropdown")&&(e.scrollHeight,e.scrollTop,e.clientHeight)};r((()=>H.value.isOpen),(async e=>{e?(await a(),k.value&&k.value.addEventListener("scroll",h)):k.value&&k.value.removeEventListener("scroll",h)})),t((()=>H.value.items.filter((e=>e.name.toLowerCase().includes(C.value.toLowerCase())))));let x=o([]),D=o([]);return t((()=>x.value.filter((e=>e.name.toLowerCase().includes(S.value.toLowerCase()))))),t((()=>D.value.filter((e=>e.name.toLowerCase().includes(_.value.toLowerCase()))))),r([()=>f.SearchCars2,()=>f.brands,()=>f.SearchModels2,()=>f.brands2],(([e,o,r,a])=>{H.value.items=a,j.value.items=r,y.value.items=e})),r((()=>x.value),(e=>{0==e.length&&(D.value=[],b.value=void 0,g.value=void 0,j.value.selected=w.value,y.value.selected=L.value)})),(o,r,a,t)=>{const s=e;r(`<div${n(l({class:"container search-home-p"},t))}>`),r(u(s,null,{},a)),r("</div>")}}},d=c.setup;c.setup=(e,o)=>{const r=s();return(r.modules||(r.modules=new Set)).add("components/home/HomeSearch.vue"),d?d(e,o):void 0};export{c as default};
