1import{_ as T}from"./CRd4z7HC.js";import{_ as L,a as M}from"./Dcy8oVke.js";import{_ as N}from"./Cjb8fmty.js";import{_ as R}from"./DaWMykhG.js";import{_ as E}from"./Cggf-Cwm.js";import{d as I,l as P,m as j,y as _,o as q,p as z,a1 as G,h as X,z as Z,c as S,e as d,j as i,w as f,f as n,g as v,B as D,L as J,_ as K}from"./CgDnksnM.js";import{u as Q}from"./BLmhnPGu.js";import"./7bDPPfED.js";import"./DhHGWOs9.js";const W={class:"filter_doma"},Y={class:"type"},h={class:"area"},ee={class:"location"},te=I({__name:"Uchastok",setup(oe){const a=P(),H=j(),s=_(null),C=async()=>{try{const{data:o}=await Q("/api/searchFilters/uchastki","$XE0VagnZMS");s.value=o.value}catch(o){console.error("ÐÑибка загÑÑзки ÑилÑÑÑов ÑÑаÑÑков:",o),s.value={city:[],subCity:[],address:[]}}};q(C);const U=z(),e=G({newHouse:[],priceOt:"",priceDo:"",lotAreaOt:"",lotAreaDo:"",locationCity:"",locationStreet:"",locationArea:""});q(()=>{if(a.query.newHouse)try{const o=a.query.newHouse;o.includes(",")?e.newHouse=o.split(","):e.newHouse=[o]}catch(o){console.warn("Error parsing newHouse parameter:",o)}a.query.priceOt&&(e.priceOt=a.query.priceOt),a.query.priceDo&&(e.priceDo=a.query.priceDo),a.query.lotAreaOt&&(e.lotAreaOt=a.query.lotAreaOt),a.query.lotAreaDo&&(e.lotAreaDo=a.query.lotAreaDo),a.query.locationCity&&(e.locationCity=a.query.locationCity),a.query.locationArea&&(e.locationArea=a.query.locationArea),a.query.locationStreet&&(e.locationStreet=a.query.locationStreet)});const r=_(""),m=o=>{const t=r.value===o;r.value=t?"":o,o==="chetvertii"&&(u.value=t?"":"ÐоÑод")},u=_(""),w=o=>{u.value=u.value===o?"":o},x=X(()=>e.locationCity||e.locationArea||e.locationStreet),c=_(!1),g=()=>{e.locationCity="",e.locationStreet="",e.locationArea="",c.value=!0,C(),setTimeout(()=>c.value=!1,1e3)},$=async()=>{const o={};for(const t in e)Array.isArray(e[t])&&e[t].length?o[t]=e[t].join(","):e[t]&&(typeof e[t]=="string"||typeof e[t]=="number")&&(o[t]=e[t]);H.isLessThan("screen769")&&(o.autoOpen="true"),await J({path:"/uchastki",query:o}),U.value=!1};return Z(()=>[e.locationCity,e.locationArea,e.locationStreet],async o=>{const t=await $fetch("/api/searchFilters/uchastki/changeLocation",{query:{localityName:o[0],subLocalityName:o[1],address:o[2]}});s.value=t}),(o,t)=>{const A=T,y=L,B=M,O=N,V=R,F=E;return d(),S("div",W,[i(y,{class:"filter_hide_mobile",title:"Тип ÑÑаÑÑка",selected:e.newHouse.length?e.newHouse.map(l=>l==="0"?"ÐÐС":l==="1"?"СÐТ":l==="2"?"ÐÐÐ":l):[],open:r.value==="pervii",onClickDropdown:t[3]||(t[3]=()=>m("pervii"))},{default:f(()=>[n("div",Y,[i(A,{class:"type__label",title:"ÐÐС",value:"0",modelValue:e.newHouse,"onUpdate:modelValue":t[0]||(t[0]=l=>e.newHouse=l)},null,8,["modelValue"]),i(A,{class:"type__label",title:"СÐТ",value:"1",modelValue:e.newHouse,"onUpdate:modelValue":t[1]||(t[1]=l=>e.newHouse=l)},null,8,["modelValue"]),i(A,{class:"type__label",title:"ÐÐÐ",value:"2",modelValue:e.newHouse,"onUpdate:modelValue":t[2]||(t[2]=l=>e.newHouse=l)},null,8,["modelValue"])])]),_:1},8,["selected","open"]),i(y,{class:"filter_hide_mobile",title:"Цена",selected:e.priceOt&&e.priceDo?`${e.priceOt} â ${e.priceDo}`:e.priceOt?`Ð¾Ñ ${e.priceOt}`:e.priceDo?`до ${e.priceDo}`:"",open:r.value==="price",onClickDropdown:t[6]||(t[6]=()=>m("price"))},{default:f(()=>[i(B,{priceOt:e.priceOt,"onUpdate:priceOt":t[4]||(t[4]=l=>e.priceOt=l),priceDo:e.priceDo,"onUpdate:priceDo":t[5]||(t[5]=l=>e.priceDo=l)},null,8,["priceOt","priceDo"])]),_:1},8,["selected","open"]),i(y,{class:"filter_hide_mobile",title:"ÐлоÑадÑ",selected:e.lotAreaOt&&e.lotAreaDo?`${e.lotAreaOt} â ${e.lotAreaDo} ÑоÑ.`:e.lotAreaOt?`Ð¾Ñ ${e.lotAreaOt} ÑоÑ.`:e.lotAreaDo?`до ${e.lotAreaDo} ÑоÑ.`:"",open:r.value==="tretii",onClickDropdown:t[9]||(t[9]=()=>m("tretii"))},{default:f(()=>[n("div",h,[i(O,{leftText:"оÑ",sup:"",rightText:"ÑоÑ.",modelValue:e.lotAreaOt,"onUpdate:modelValue":t[7]||(t[7]=l=>e.lotAreaOt=l)},null,8,["modelValue"]),i(O,{leftText:"до",sup:"",rightText:"ÑоÑ.",modelValue:e.lotAreaDo,"onUpdate:modelValue":t[8]||(t[8]=l=>e.lotAreaDo=l)},null,8,["modelValue"])])]),_:1},8,["selected","open"]),i(y,{class:"filter_hide_mobile",title:"Район, ÑлиÑа",selected:e.locationStreet||e.locationArea||e.locationCity||void 0,open:r.value==="chetvertii",onClickDropdown:t[16]||(t[16]=()=>m("chetvertii"))},{default:f(()=>{var l,k,b;return[n("ul",ee,[n("li",null,[x.value?(d(),S("button",{key:0,class:"location__reset",type:"button",onClick:g}," СбÑоÑиÑÑ ")):v("",!0)]),n("li",null,[t[17]||(t[17]=n("span",{class:"location__title"},"ÐоÑод",-1)),(l=s.value)!=null&&l.city?(d(),D(V,{key:0,searchable:"",list:s.value.city,modelValue:e.locationCity,"onUpdate:modelValue":t[10]||(t[10]=p=>e.locationCity=p),reset:c.value,open:u.value==="ÐоÑод",onClickSelect:t[11]||(t[11]=()=>w("ÐоÑод")),class:"location__select"},null,8,["list","modelValue","reset","open"])):v("",!0)]),n("li",null,[t[18]||(t[18]=n("span",{class:"location__title"},"Район",-1)),(k=s.value)!=null&&k.subCity?(d(),D(V,{key:0,searchable:"",list:s.value.subCity,modelValue:e.locationArea,"onUpdate:modelValue":t[12]||(t[12]=p=>e.locationArea=p),reset:c.value,open:u.value==="Район",onClickSelect:t[13]||(t[13]=()=>w("Район")),class:"location__select"},null,8,["list","modelValue","reset","open"])):v("",!0)]),n("li",null,[t[19]||(t[19]=n("span",{class:"location__title"},"УлиÑа",-1)),(b=s.value)!=null&&b.address?(d(),D(V,{key:0,searchable:"",list:s.value.address,modelValue:e.locationStreet,"onUpdate:modelValue":t[14]||(t[14]=p=>e.locationStreet=p),reset:c.value,open:u.value==="УлиÑа",onClickSelect:t[15]||(t[15]=()=>w("УлиÑа")),class:"location__select"},null,8,["list","modelValue","reset","open"])):v("",!0)])])]}),_:1},8,["selected","open"]),i(F,{class:"view_vars btn-welcome-green",title:"ÐоказаÑÑ Ð¿ÑедложениÑ",onBtnClick:$})])}}}),de=K(te,[["__scopeId","data-v-4dcb2035"]]);export{de as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.