1import{d as I,r as g,A as C,Q as F,au as $,l as q,b as a,i as d,f as B,g as t,m,n as f,az as R,t as h,o as n}from"./entry.SA0OsS3s.js";import{L as T}from"./loop.Do7UWQip.js";import{c as z}from"./cross.CiU_E-hF.js";const A=["aria-label"],N={key:1,class:"text-base-blue","aria-hidden":"true"},V=["value","placeholder"],D={key:0,class:"absolute bottom-0 text-display5"},S=I({__name:"SearchInput",props:{resultsAmount:{},enableResultText:{type:Boolean},query:{default:""}},emits:["update:query","reset"],setup(b,{expose:y,emit:v}){const l=g(null),_=v,k=b,{resultsAmount:i,query:r,enableResultText:c}=C(k);F(async()=>{await $(),setTimeout(()=>{var e;u(),(e=l.value)==null||e.select()},0)});const w=e=>{e.target.select()},x=()=>{_("reset"),u()},u=()=>{var e;(e=l.value)==null||e.focus()};y({setInputFocus:u});const p=q(()=>{var e;return((e=r.value)==null?void 0:e.length)>0});return(e,s)=>(n(),a("div",{class:f(["relative",{"mb-1 pb-6":t(c)}])},[d("div",{class:f(["absolute top-0 min-h-input w-14 flex justify-center items-center overflow-hidden",{"pointer-events-none":!t(p)}])},[t(p)?(n(),a("button",{key:0,onClick:s[0]||(s[0]=o=>x()),type:"button",class:"text-base-blue p-2","aria-label":e.$t("aria_search_clear_input")},[m(t(z),{"aria-hidden":"true"})],8,A)):(n(),a("div",N,[m(t(T))]))],2),d("input",{ref_key:"searchInputField",ref:l,value:t(r),onInput:s[1]||(s[1]=o=>e.$emit("update:query",o.target.value)),onFocus:w,onKeydown:s[2]||(s[2]=R(o=>o.preventDefault(),["enter"])),class:"min-h-input min-w-[var(--search-input-min-width)] w-full pl-14 outline outline-1 outline-offset-0 focus-visible:outline-base-blue outline-base-athens-gray text-body rounded-none",placeholder:e.$t("placeholder_search"),type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",name:"search"},null,40,V),t(c)&&t(i)&&t(r)?(n(),a("p",D,h(t(i))+" "+h(e.$t("search_input_results")),1)):B("",!0)],2))}});export{S 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.