1import{y as k,o as n,c as g,f as v,u as y,a as u,z as e,A as B,C as x,E as $,e as V,r as w,F as A,G as z,H as F}from"./C-haIAPt.js";import S from"./BgetnllG.js";import{u as b,s as G,a as O,b as T}from"./1jDFYZCR.js";import{k as L}from"./B6wXlRvC.js";const P={key:1,class:"flex flex-col sm:flex-row gap-3 items-center self-stretch md:self-auto justify-center md:px-12"},M={__name:"autocomplete",props:{noButton:{type:Boolean,default:!1},mobile:{type:Boolean,default:!1},header:{type:Boolean,default:!1}},setup(p){const t=F(),{loadScript:i,loadAutocomplete:d,typing:m,handleGeocode:C}=b(),{itemsAutocomplete:s,loadingAutocomplete:h}=k(b()),r=async()=>{if(!t.value?.placeId&&!s.value)return;s.value&&(t.value=s.value[0]);const a=await C(t.value.placeId);z("/louer-un-bureau/"+L(T(a?.address_components)))};return(a,o)=>{const f=B,c=S;return n(),g(A,null,[p.header?(n(),v(e(O),{key:0,iconPosition:"right"},{default:y(()=>[u(e(G),null,{default:y(()=>[u(f,{icon:e(h)?"pi pi-spin pi-spinner":"pi pi-search",onClick:r,class:"w-[24px] h-[24px] z-20 relative bottom-1 left-1 !leading-normal",size:"small",pt:{icon:{style:"line-height: normal !important;"}}},null,8,["icon"])]),_:1}),u(c,{class:"rounded w-full md:h-[40px] md:w-[400px] !bg-[#f8f8f9]",outlined:"",placeholder:"Où voulez-vous travailler ?",modelValue:e(t),"onUpdate:modelValue":o[0]||(o[0]=l=>x(t)?t.value=l:null),suggestions:e(s),variant:"filled",optionLabel:"formatted",onComplete:o[1]||(o[1]=l=>e(m)(e(t))),onFocus:o[2]||(o[2]=l=>{e(i)(),e(d)()}),ptOptions:{mergeProps:!1},pt:{emptyMessage:"px-5",input:"rounded pl-2 w-full outline-none !bg-[#f8f8f9]"}},null,8,["modelValue","suggestions"])]),_:1})):(n(),g("div",P,[u(c,{class:"rounded h-[40px] w-full md:w-[300px]",placeholder:"Où voulez-vous travailler ?",modelValue:e(t),"onUpdate:modelValue":o[3]||(o[3]=l=>x(t)?t.value=l:null),suggestions:e(s),optionLabel:"formatted",onComplete:o[4]||(o[4]=l=>e(m)(e(t))),onFocus:o[5]||(o[5]=l=>{e(i)(),e(d)()}),onKeyup:$(r,["enter"]),ptOptions:{mergeProps:!1},pt:{emptyMessage:"px-5",input:"rounded pl-2 w-full inputSearch outline-none"}},null,8,["modelValue","suggestions"]),p.noButton?V("",!0):(n(),v(f,{key:0,label:"Rechercher",class:"place-self-auto md:place-self-end",onClick:r,pt:{root:"w-full sm:!w-[126px]",label:"flex-initial"}})),w(a.$slots,"default")])),w(a.$slots,"customButton")],64)}}};export{M as _};
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.