import{_ as m,D as h,o as b,c as v,d as a,w as r,a as i,k as p,t as d,f as S}from"./entry.DPwc-EV0.js";import{V}from"./vue-select-DlY5_TFh.mjs";const f={components:{VueSelect:V},props:{value:{type:String},sortOptions:{type:Array}},emits:["updateSort"],data(){return{localSortVal:this.value}},computed:{sortSelectOptions(){return[{value:"relevance",label:"Relevance",icon:"mdi:trophy"},{value:"published",label:"Published",icon:"mdi:calendar"},{value:"updated_desc",label:"Updated",icon:"ic:outline-change-circle"},{value:"alpha",label:"Title",icon:"bi:sort-alpha-up"},{value:"alpha_desc",label:"Title",icon:"bi:sort-alpha-down"}].filter(o=>this.sortOptions.find(c=>c===o.value))}},watch:{localSortVal(t){this.$emit("updateSort",t)}}},x={class:"search-sort"},y={class:"option"},O={class:"option"};function k(t,o,c,w,s,u){const n=S,_=h("VueSelect");return b(),v("div",x,[a(_,{modelValue:s.localSortVal,"onUpdate:modelValue":o[0]||(o[0]=e=>s.localSortVal=e),placeholder:"Sort by...",class:"sort-select",options:u.sortSelectOptions,clearable:!1,searchable:!1,reduce:e=>e.value,label:"label"},{option:r(({label:e,icon:l})=>[i("div",y,[a(n,{icon:l,"icon-color":"black"},null,8,["icon"]),p(" "+d(e),1)])]),"selected-option":r(({label:e,icon:l})=>[i("div",O,[a(n,{icon:l,"icon-color":"black"},null,8,["icon"]),p(" Sort: "+d(e),1)])]),_:1},8,["modelValue","options","reduce"])])}const N=m(f,[["render",k],["__scopeId","data-v-c90b40ce"]]);export{N as _};