{"version":3,"sources":["../src/components/Badge/PresenceBadge/usePresenceBadge.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { usePresenceBadgeBase_unstable } from '@fluentui/react-badge';\n\nimport { toDataAttributeValue } from '../../../utils';\nimport type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';\n\n/**\n * Returns the state for a PresenceBadge component, given its props and ref.\n * The returned state can be modified with hooks before being passed to `renderPresenceBadge`.\n */\nexport const usePresenceBadge = (props: PresenceBadgeProps, ref: React.Ref<HTMLDivElement>): PresenceBadgeState => {\n  const state = usePresenceBadgeBase_unstable(props, ref);\n\n  return {\n    ...state,\n    root: {\n      ...state.root,\n      'data-status': state.status,\n      'data-out-of-office': toDataAttributeValue(state.outOfOffice),\n    },\n  };\n};\n"],"names":["usePresenceBadge","props","ref","state","usePresenceBadgeBase_unstable","root","status","toDataAttributeValue","outOfOffice"],"mappings":"AAAA;;;;;+BAYaA;;;eAAAA;;;4BATiC;uBAET;AAO9B,MAAMA,mBAAmB,CAACC,OAA2BC;IAC1D,MAAMC,QAAQC,IAAAA,yCAA6B,EAACH,OAAOC;IAEnD,OAAO;QACL,GAAGC,KAAK;QACRE,MAAM;YACJ,GAAGF,MAAME,IAAI;YACb,eAAeF,MAAMG,MAAM;YAC3B,sBAAsBC,IAAAA,2BAAoB,EAACJ,MAAMK,WAAW;QAC9D;IACF;AACF"}