1import _ from"./DtfDc6gd.js";import g from"./D21fCrkA.js";import k from"./C9yiaWcE.js";import{_ as y,c as s,a as n,b as a,y as m,ai as p,q as f,e as d,j as S,w as I,t as x,o as l}from"./C_VzGqEg.js";const b={components:{IconDelete:g,Button:k},model:{prop:"modelValue",event:"update:modelValue"},props:{variant:{type:String,default:"default"},modelValue:{type:String,default:""},placeholder:{type:String,default:""}},data(){return{searchInput:this.modelValue,search:this.$t("advancedToplist.search"),games:this.$t("advancedToplist.gameProviderCard"),searchGames:this.$t("searchGames")}},watch:{modelValue(u){this.searchInput=u}},methods:{handleFilter(){this.$emit("update:modelValue",this.searchInput),this.$emit("handleFilter",this.searchInput)},handleSearch(){this.$emit("update:modelValue",this.searchInput),this.$emit("handleSearch",this.searchInput)},handleClick(){this.collapsible&&this.$emit("update:active",!this.active),this.$emit("click")},clearSearch(){this.searchInput="",this.$emit("update:modelValue",""),this.$emit("handleSearch",this.searchInput),this.handleFilter()}}},w={key:0},V={class:"sticky top-0"},C={class:"flex items-center justify-between relative rounded-md w-full"},B=["placeholder"],F={key:1},j={class:"sticky top-0 background-elevation-3"},D={class:"flex items-center justify-between relative rounded-md w-full"},G=["placeholder"],K={class:"text-foreground-3 text-sm"};function M(u,e,c,N,o,r){const i=_,h=g,v=k;return l(),s("div",null,[c.variant=="SearchRoundedPill"?(l(),s("div",w,[n("div",V,[n("div",C,[a(i,{name:"magnifier","aria-hidden":"true",role:"img",class:"w-md h-md text-foreground-1 absolute ml-md"}),m(n("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>o.searchInput=t),placeholder:`${o.searchGames}`,class:"text-foreground-3 color-stroke-3 text-sm focus:text-foreground-1 w-full outline-none rounded-pill border-sm focus:color-stroke-accent hover:color-stroke-accent background-elevation-3 py-sm px-md pl-[40px] flex items-center placeholder:text-foreground-3",onInput:e[1]||(e[1]=t=>r.handleFilter()),onKeyup:e[2]||(e[2]=f((...t)=>r.handleSearch&&r.handleSearch(...t),["enter"]))},null,40,B),[[p,o.searchInput]]),o.searchInput?(l(),s("span",{key:0,class:"absolute top-0 bottom-0 my-auto right-md flex items-center text-foreground-3 cursor-pointer",onClick:e[3]||(e[3]=(...t)=>r.clearSearch&&r.clearSearch(...t))},[a(h,{class:"text-foreground-3"})])):d("",!0)])])])):c.variant=="SearchRoundedMedium"?(l(),s("div",F,[n("div",j,[n("div",D,[a(i,{name:"magnifier","aria-hidden":"true",role:"img",class:"w-[13px] h-[13px] text-foreground-1 absolute ml-md"}),m(n("input",{"onUpdate:modelValue":e[4]||(e[4]=t=>o.searchInput=t),placeholder:c.placeholder,class:"text-foreground-3 color-stroke-3 focus:text-foreground-1 text-sm w-full outline-none rounded-md border-sm focus:color-stroke-accent background-elevation-3 py-xs px-md pl-[38px] flex items-center hover:color-stroke-accent placeholder:text-foreground-3",onInput:e[5]||(e[5]=t=>r.handleFilter()),onKeyup:e[6]||(e[6]=f((...t)=>r.handleSearch&&r.handleSearch(...t),["enter"]))},null,40,G),[[p,o.searchInput]]),o.searchInput?(l(),s("span",{key:0,class:"absolute top-0 bottom-0 my-auto right-md flex items-center text-foreground-3 cursor-pointer",onClick:e[7]||(e[7]=(...t)=>r.clearSearch&&r.clearSearch(...t))},[a(h,{class:"text-foreground-3"})])):d("",!0)])])])):c.variant=="SearchIcon"?(l(),S(v,{key:2,size:"SM",icon:"",iconOnly:"",variant:"ghost",full:"","full-height":"",class:"h-[30px] w-[30px]",onClick:r.handleClick},{"icon-only":I(()=>[a(i,{name:"magnifier",class:"w-sm h-sm flex-none text-ghost-foreground",size:12,"aria-hidden":"true",role:"img"})]),_:1},8,["onClick"])):c.variant==="SearchIconLarge"?(l(),s("div",{key:3,class:"w-[288px] h-2xl flex items-center color-stroke-3 focus:text-foreground-1 text-xs placeholder:text-xs outline-none rounded-pill border-sm focus:color-stroke-accent background-elevation-3 py-xs px-md hover:color-stroke-accent cursor-pointer",onClick:e[8]||(e[8]=(...t)=>r.handleClick&&r.handleClick(...t))},[a(i,{name:"magnifier","aria-hidden":"true",role:"img",class:"w-md h-md mr-xs text-foreground-1"}),n("span",K,x(o.search)+" "+x(o.games),1)])):d("",!0)])}const R=Object.assign(y(b,[["render",M]]),{__name:"Search"});export{R 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.