import{w as f,r as t}from"./index-Cox3ZWL0.js";const p=(r=!1)=>{const[S,e]=f(r),[l,a]=t.useState(null),[c,n]=t.useState(null),[o,d]=t.useState(""),m=t.useCallback((s,u)=>()=>{a(s),u&&n(u),l||e()},[e,l,c]),i=s=>{d(s),o||e()},I=t.useCallback(()=>{a(null),n(null),d(""),e()},[e]);return{isOpen:S,selectedId:l,selectedName:o,selectedFgId:c,handleClose:I,handleSelectItem:m,handleSelectItemByName:i}};export{p as u};
