import{i as e,t}from"./react-B8IZ02wI.js";import{t as n}from"./select-CDwQ-YxO.js";import{v as r}from"./authStore-BvQBJ9ky.js";import{n as i}from"./index-Bg7bo8aA.js";var a=e(t(),1),o=i();function s({value:e,onChange:t,placeholder:i=`选择员工`,allowClear:s=!0,disabled:c,mode:l}){let[u,d]=(0,a.useState)([]);return(0,a.useEffect)(()=>{r.users().then(e=>{d(e.data||[])}).catch(()=>d([]))},[]),(0,o.jsx)(n,{mode:l,allowClear:s,showSearch:!0,optionFilterProp:`label`,value:e,onChange:t,disabled:c,options:u.map(e=>({value:e.id,label:e.username?`${e.realName}（${e.username}）`:e.realName})),placeholder:i,style:{width:`100%`}})}export{s as t};