import{j as o,f as n,P as c}from"./antd.c323f587.js";import{r as m}from"./react.dcf569d1.js";import{u as g}from"./Groups.164b9901.js";import{u as b,s as P}from"./index.5fa92bd5.js";import{s as h}from"./index.a5de5d12.js";function I({item:s}){var a;const[i,e]=m.exports.useState(!1),u=g(s.groupFilter),f=m.exports.useMemo(()=>(u||[]).map(r=>({label:r.name,value:String(r.id)})),[u]),l=s.groupKey||"groupId",{[l]:p}=b();return o(n,{className:h.groupPicker,style:(a=s.styles)==null?void 0:a.default,children:o(n.Item,{label:s.label||"\u5F53\u524D\u5206\u7EC4",onClick:()=>{e(!0)},children:o(c,{visible:i,columns:[f],value:[String(p)],onClose:()=>e(!1),onConfirm:r=>{!(r!=null&&r[0])||P({[l]:Number(r[0])})},children:r=>{var t;return o("span",{children:((t=r==null?void 0:r[0])==null?void 0:t.label)||s.placeholder||"\u672A\u9009\u62E9"})}})})})}export{I as default};
