import{i as y,w as b}from"./preload-helper-DadE4qT2.chunk.mjs";import{N as L,a as N}from"./NcSelect-DTniMiUS-BlM1kmZS.chunk.mjs";import{n as S,t as o,G as g,r as h,e as B,f as I}from"./index-4VW8tlR1.chunk.mjs";h(I,B);const _={model:{prop:"modelValue",event:"update:modelValue"}},v=Object.assign(_,{__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:()=>g()},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=y("");b(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:N,NcSelect:L}}});var w=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))},C=[],O=S(v,w,C,!1,null,"e5d43b0e");const z=O.exports;export{z as N};
//# sourceMappingURL=NcSelectUsers-RyUVUaWQ-i6ykqGF1.chunk.mjs.map
