{"version":3,"sources":["../src/components/Toolbar/ToolbarGroup/useToolbarGroup.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useToolbarGroup_unstable } from '@fluentui/react-toolbar';\n\nimport type { ToolbarGroupProps, ToolbarGroupState } from './ToolbarGroup.types';\nimport { stringifyDataAttribute } from '../../../utils';\n\n/**\n * Returns the state for a ToolbarGroup component, given its props and ref.\n * The returned state can be modified with hooks before being passed to `renderToolbarGroup`.\n */\nexport const useToolbarGroup = (props: ToolbarGroupProps, ref: React.Ref<HTMLDivElement>): ToolbarGroupState => {\n  const state: ToolbarGroupState = useToolbarGroup_unstable(props, ref);\n\n  // Set data-vertical based on the toolbar context orientation.\n  // eslint-disable-next-line react-hooks/immutability\n  state.root['data-vertical'] = stringifyDataAttribute(state.vertical);\n\n  return state;\n};\n"],"names":["useToolbarGroup","props","ref","state","useToolbarGroup_unstable","root","stringifyDataAttribute","vertical"],"mappings":"AAAA;;;;;+BAYaA;;;eAAAA;;;8BAT4B;uBAGF;AAMhC,MAAMA,kBAAkB,CAACC,OAA0BC;IACxD,MAAMC,QAA2BC,IAAAA,sCAAwB,EAACH,OAAOC;IAEjE,8DAA8D;IAC9D,oDAAoD;IACpDC,MAAME,IAAI,CAAC,gBAAgB,GAAGC,IAAAA,6BAAsB,EAACH,MAAMI,QAAQ;IAEnE,OAAOJ;AACT"}