{"version":3,"sources":["../../../../src/components/Toast/ToastTitle/useToastTitle.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useToastTitleBase_unstable } from '@fluentui/react-toast';\n\nimport type { ToastTitleProps, ToastTitleState } from './ToastTitle.types';\n\n/**\n * Returns the state for a ToastTitle component, given its props and ref.\n * The returned state can be modified with hooks before being passed to `renderToastTitle`.\n */\nexport const useToastTitle = (props: ToastTitleProps, ref: React.Ref<HTMLElement>): ToastTitleState => {\n  const state: ToastTitleState = useToastTitleBase_unstable(props, ref);\n\n  if (state.media) {\n    // eslint-disable-next-line react-hooks/immutability\n    state.media['data-intent'] = state.intent;\n  }\n\n  return state;\n};\n"],"names":["useToastTitle","props","ref","state","useToastTitleBase_unstable","media","intent"],"mappings":"AAAA;;;;;+BAWaA;;;eAAAA;;;4BAR8B;AAQpC,MAAMA,gBAAgB,CAACC,OAAwBC;IACpD,MAAMC,QAAyBC,IAAAA,sCAA0B,EAACH,OAAOC;IAEjE,IAAIC,MAAME,KAAK,EAAE;QACf,oDAAoD;QACpDF,MAAME,KAAK,CAAC,cAAc,GAAGF,MAAMG,MAAM;IAC3C;IAEA,OAAOH;AACT"}