{"version":3,"sources":["../src/components/Toolbar/ToolbarDivider/useToolbarDivider.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useToolbarDividerBase_unstable } from '@fluentui/react-toolbar';\n\nimport type { ToolbarDividerProps, ToolbarDividerState } from './ToolbarDivider.types';\nimport { stringifyDataAttribute } from '../../../utils';\n\n/**\n * Returns the state for a ToolbarDivider component, given its props and ref.\n * The returned state can be modified with hooks before being passed to `renderToolbarDivider`.\n */\nexport const useToolbarDivider = (props: ToolbarDividerProps, ref: React.Ref<HTMLElement>): ToolbarDividerState => {\n  const state: ToolbarDividerState = useToolbarDividerBase_unstable(props, ref);\n\n  // Set data-vertical based on the resolved orientation of the divider (already inverted relative to the toolbar).\n  // eslint-disable-next-line react-hooks/immutability\n  state.root['data-vertical'] = stringifyDataAttribute(state.vertical);\n\n  return state;\n};\n"],"names":["useToolbarDivider","props","ref","state","useToolbarDividerBase_unstable","root","stringifyDataAttribute","vertical"],"mappings":"AAAA;;;;;+BAYaA;;;eAAAA;;;8BATkC;uBAGR;AAMhC,MAAMA,oBAAoB,CAACC,OAA4BC;IAC5D,MAAMC,QAA6BC,IAAAA,4CAA8B,EAACH,OAAOC;IAEzE,iHAAiH;IACjH,oDAAoD;IACpDC,MAAME,IAAI,CAAC,gBAAgB,GAAGC,IAAAA,6BAAsB,EAACH,MAAMI,QAAQ;IAEnE,OAAOJ;AACT"}