"use strict";exports.id=4451,exports.ids=[4451],exports.modules={94451:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var n=r(16689),o=r.n(n),u=r(55494);let useDropdownItem=({ref:e,onClick:t,dismissOnClick:r=!0})=>{let{dropdownItemsRef:o,selectedDropdownItemIndexRef:s,close:d}=(0,u.x)(),[c,a]=(0,n.useState)(0),l=(0,n.useRef)(),onFocusItem=()=>{s.current=c,o?.current[s.current]?.focus()};return(0,n.useImperativeHandle)(e,()=>l.current,[]),{ref:e=>{e&&!o?.current.includes(e)&&(o?.current.push(e),a(o?.current.findIndex(t=>t===e)??0)),l.current=e},onFocus:onFocusItem,onMouseEnter:onFocusItem,onClick:e=>{t?.(e),r&&d?.()},role:"menuitem",tabIndex:-1,"data-index":c}},s=(0,n.forwardRef)(function({children:e,asChild:t,icon:r,onClick:u,dismissOnClick:s=!0,testId:d="fs-dropdown-item",...c},a){let l=useDropdownItem({ref:a,onClick:u,dismissOnClick:s}),m=o().isValidElement(e)?(0,n.cloneElement)(e,{...l,...e.props}):e;return o().createElement(o().Fragment,null,t?m:o().createElement("button",{"data-fs-dropdown-item":!0,"data-testid":d,...l,...c},!!r&&r,e))}),d=s}};