{"version":3,"sources":["../src/components/Menu/MenuList/useMenuList.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useMenuListBase_unstable } from '@fluentui/react-menu';\nimport type { MenuListProps, MenuListState } from './MenuList.types';\n\n/**\n * Returns the state for a MenuList.\n * Uses the native focusgroup attribute for arrow key navigation. Focus is moved\n * into the list by MenuPopover via the HTML autofocus attribute on the first\n * focusable MenuItem (set imperatively because React skips autoFocus on divs).\n */\nexport const useMenuList = (props: MenuListProps, ref: React.Ref<HTMLElement>): MenuListState => {\n  const baseState: MenuListState = useMenuListBase_unstable(props, ref);\n\n  // eslint-disable-next-line react-hooks/immutability -- attribute is mutated to opt into the focusgroup polyfill.\n  baseState.root.focusgroup = 'menu block wrap';\n\n  return baseState;\n};\n"],"names":["useMenuList","props","ref","baseState","useMenuListBase_unstable","root","focusgroup"],"mappings":"AAAA;;;;;+BAYaA;;;eAAAA;;;2BAT4B;AASlC,MAAMA,cAAc,CAACC,OAAsBC;IAChD,MAAMC,YAA2BC,IAAAA,mCAAwB,EAACH,OAAOC;IAEjE,iHAAiH;IACjHC,UAAUE,IAAI,CAACC,UAAU,GAAG;IAE5B,OAAOH;AACT"}