{"version":3,"sources":["../src/components/Drawer/DrawerHeaderTitle/useDrawerHeaderTitle.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useDrawerHeaderTitle_unstable } from '@fluentui/react-drawer';\n\nimport { useDialogContext } from '../../Dialog';\nimport type { DrawerHeaderTitleProps, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\n\n/**\n * Returns the state for a DrawerHeaderTitle component, given its props and ref.\n */\nexport const useDrawerHeaderTitle = (\n  props: DrawerHeaderTitleProps,\n  ref: React.Ref<HTMLDivElement>,\n): DrawerHeaderTitleState => {\n  const state = useDrawerHeaderTitle_unstable(props, ref);\n  const { dialogTitleId } = useDialogContext();\n\n  if (state.heading && dialogTitleId) {\n    // eslint-disable-next-line react-hooks/immutability\n    state.heading.id = dialogTitleId;\n  }\n\n  return state;\n};\n"],"names":["useDrawerHeaderTitle","props","ref","state","useDrawerHeaderTitle_unstable","dialogTitleId","useDialogContext","heading","id"],"mappings":"AAAA;;;;;+BAWaA;;;eAAAA;;;6BARiC;wBAEb;AAM1B,MAAMA,uBAAuB,CAClCC,OACAC;IAEA,MAAMC,QAAQC,IAAAA,0CAA6B,EAACH,OAAOC;IACnD,MAAM,EAAEG,aAAa,EAAE,GAAGC,IAAAA,wBAAgB;IAE1C,IAAIH,MAAMI,OAAO,IAAIF,eAAe;QAClC,oDAAoD;QACpDF,MAAMI,OAAO,CAACC,EAAE,GAAGH;IACrB;IAEA,OAAOF;AACT"}