import e from"prop-types";import{get as r}from"lodash";import s from"./ChipSelector.js";import{AvatarComponent as t}from"../../Avatar/index.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var o={container:{display:"flex",justifyContent:"start",alignItems:"center"},username:{marginLeft:20}},a=function(e){return n("div",{style:o.container,children:[i(t,{displayName:r(e,"displayName"),imgSrc:r(e,"profilePhoto")}),i("div",{style:o.username,children:r(e,"displayName")})]})},d=function(e){var t=e.users,n=e.selectedUsers,o=e.onAddUser,d=e.onRemoveUser;return i(s,{items:t,selectedItems:n,onAdd:o,onRemove:d,chipFormatter:function(e){return r(e,"displayName")},listItemFormatter:a,hintText:"Type user name...",errorText:"You can not add not existing user",listTitle:"Recent users"})};d.propTypes={selectedUsers:e.shape([]).isRequired,onAddUser:e.func.isRequired,onRemoveUser:e.func.isRequired,users:e.arrayOf(e.shape({id:e.oneOfType([e.string,e.number]).isRequired,displayName:e.string.isRequired,persistent:e.bool})).isRequired};export{d as default};
