"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1697],{99570:function(e,n,r){r.r(n),r.d(n,{default:function(){return a}});var t=r(44194),o=r(83339),u=r(55494);let useDropdownTrigger=({triggerRef:e})=>{let{toggle:n,dropdownTriggerRef:r,addDropdownTriggerRef:o,isOpen:d,id:a}=(0,u.x)();return(0,t.useImperativeHandle)(e,()=>r.current,[r]),{onClick:n,ref:o,"aria-expanded":d,"aria-controls":a,"aria-haspopup":"menu"}},d=(0,t.forwardRef)(function({testId:e="fs-dropdown-button",children:n,asChild:r=!1,...u},d){let a=useDropdownTrigger({triggerRef:d}),l=t.isValidElement(n)?(0,t.cloneElement)(n,{...a,...n.props}):n;return t.createElement(t.Fragment,null,r?l:t.createElement(o.Z,{"data-fs-dropdown-button":!0,"data-testid":e,variant:"tertiary",...a,...u},n))});var a=d},49642:function(e,n,r){var t=r(44194);let o=(0,t.createContext)({isOpen:!1,dropdownTriggerRef:null,selectedDropdownItemIndexRef:null,dropdownItemsRef:null,id:"fs-dropdown"});n.Z=o},55494:function(e,n,r){r.d(n,{x:function(){return useDropdown}});var t=r(44194),o=r(49642);let useDropdown=()=>{let e=(0,t.useContext)(o.Z);if(void 0===e)throw Error("Do not use useDropdown hook outside the Dropdown context.");return e}}}]);