import{a as y,j as b,w as L}from"./preload-helper-B5suVMXI.chunk.mjs";import{N,a as S}from"./NcSelect-DrKzKPZL-DG1sBZoM.chunk.mjs";import{n as g,t as o,G as h,r as B,e as I,f as _}from"./index-jVniDJU4.chunk.mjs";B(_,I);const v={model:{prop:"modelValue",event:"update:modelValue"}},w=y({...v,__name:"NcSelectUsers",props:{ariaLabelClearSelected:{type:String,default:o("Clear selected")},ariaLabelListbox:{type:String,default:o("Options")},ariaLabelDeselectOption:{type:Function,default:t=>o("Deselect {option}",{option:t})},keepOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},filterBy:{type:Function,default:null},inputId:{type:String,default:()=>h()},inputLabel:{type:String,default:o("Select account")},labelOutside:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},required:{type:Boolean,default:!1},modelValue:{type:Object,default:null}},emits:["search","update:modelValue"],setup(t,{emit:l}){const a=t,e=b("");L(e,()=>{l("search",e.value)});const n=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),r=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),u=n-2*r;function p(s,d,i){if(a.filterBy)return a.filterBy;const f=/[^<]*<([^>]+)/,c=i.match(f),m=s.subname?.toLocaleLowerCase()??"";return c&&m.indexOf(c[1].toLocaleLowerCase())>-1||`${d} ${s.subname}`.toLocaleLowerCase().indexOf(i.toLocaleLowerCase())>-1}return{__sfc:!0,props:a,emit:l,search:e,clickableArea:n,gridBaseLine:r,avatarSize:u,localFilterBy:p,NcListItemIcon:S,NcSelect:N}}});var C=function(){var t=this,l=t._self._c,a=t._self._setupProxy;return l(a.NcSelect,t._b({staticClass:"nc-select-users",attrs:{"filter-by":a.localFilterBy,label:"displayName"},on:{search:function(e){a.search=e},"update:model-value":function(e){return t.$emit("update:modelValue",e)}},scopedSlots:t._u([{key:"option",fn:function(e){return[l(a.NcListItemIcon,t._b({attrs:{"avatar-size":32,name:e.displayName,search:a.search}},"NcListItemIcon",e,!1))]}},{key:"selected-option",fn:function(e){return[l(a.NcListItemIcon,t._b({attrs:{"avatar-size":a.avatarSize,name:e.displayName,"no-margin":"",search:a.search}},"NcListItemIcon",e,!1))]}}])},"NcSelect",t.$props,!1))},O=[],V=g(w,C,O,!1,null,"7f7ecbfe");const F=V.exports;export{F as N};
//# sourceMappingURL=NcSelectUsers-z2bZafO2-D17UArSl.chunk.mjs.map
