import{d as y,m as b,q as L}from"./dav-D-0Zsvk_.chunk.mjs";import{N,a as S}from"./NcSelect-DrKzKPZL-BfehGCjx.chunk.mjs";import{n as g,e as o,r as h,h as B,i as I}from"./index-VDTWCae_.chunk.mjs";import{G as _}from"./GenRandomId-F5ebeBB_-DI-yuh7g.chunk.mjs";h(I,B);const v={model:{prop:"modelValue",event:"update:modelValue"}},C=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:()=>_()},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 r=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),n=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),u=r-2*n;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:r,gridBaseLine:n,avatarSize:u,localFilterBy:p,NcListItemIcon:S,NcSelect:N}}});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))},O=[],V=g(C,w,O,!1,null,"7f7ecbfe");const $=V.exports;export{$ as N};
//# sourceMappingURL=NcSelectUsers-z2bZafO2-Dkf7D5WK.chunk.mjs.map
