{"version":3,"sources":["../src/components/Toast/Toaster/renderToaster.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { AriaLiveAnnouncer } from '@fluentui/react-aria';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { ToasterSlotsInternal, ToasterState } from './Toaster.types';\nimport { AriaLive } from '../AriaLive';\n\n/**\n * Render the position-based containers for the headless Toaster.\n *\n * Each container is a `<div role=\"list\" data-toaster-position=\"...\">` that\n * consumers can target with CSS to apply positioning/styling. Containers use\n * the native Popover API to render in the browser top layer.\n */\nexport const renderToaster = (state: ToasterState): JSXElement => {\n  const { announceRef, renderAriaLive } = state;\n\n  assertSlots<ToasterSlotsInternal>(state);\n\n  const hasToasts =\n    !!state.bottomStart || !!state.bottomEnd || !!state.topStart || !!state.topEnd || !!state.top || !!state.bottom;\n\n  const ariaLive = renderAriaLive ? (\n    <AriaLiveAnnouncer>\n      <AriaLive announceRef={announceRef} />\n    </AriaLiveAnnouncer>\n  ) : null;\n\n  const positionSlots = (\n    <>\n      {state.bottom ? <state.bottom /> : null}\n      {state.bottomStart ? <state.bottomStart /> : null}\n      {state.bottomEnd ? <state.bottomEnd /> : null}\n      {state.topStart ? <state.topStart /> : null}\n      {state.topEnd ? <state.topEnd /> : null}\n      {state.top ? <state.top /> : null}\n    </>\n  );\n\n  return (\n    <>\n      {ariaLive}\n      {hasToasts ? positionSlots : null}\n    </>\n  );\n};\n"],"names":["renderToaster","state","announceRef","renderAriaLive","assertSlots","hasToasts","bottomStart","bottomEnd","topStart","topEnd","top","bottom","ariaLive","AriaLiveAnnouncer","AriaLive","positionSlots"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;;;;+BAepCA;;;eAAAA;;;;2BAbqB;gCACN;0BAGH;AASlB,MAAMA,gBAAgB,CAACC;IAC5B,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAE,GAAGF;IAExCG,IAAAA,2BAAW,EAAuBH;IAElC,MAAMI,YACJ,CAAC,CAACJ,MAAMK,WAAW,IAAI,CAAC,CAACL,MAAMM,SAAS,IAAI,CAAC,CAACN,MAAMO,QAAQ,IAAI,CAAC,CAACP,MAAMQ,MAAM,IAAI,CAAC,CAACR,MAAMS,GAAG,IAAI,CAAC,CAACT,MAAMU,MAAM;IAEjH,MAAMC,WAAWT,+BACf,qBAACU,4BAAiB;kBAChB,cAAA,qBAACC,kBAAQ;YAACZ,aAAaA;;SAEvB;IAEJ,MAAMa,8BACJ;;YACGd,MAAMU,MAAM,iBAAG,qBAACV,MAAMU,MAAM,QAAM;YAClCV,MAAMK,WAAW,iBAAG,qBAACL,MAAMK,WAAW,QAAM;YAC5CL,MAAMM,SAAS,iBAAG,qBAACN,MAAMM,SAAS,QAAM;YACxCN,MAAMO,QAAQ,iBAAG,qBAACP,MAAMO,QAAQ,QAAM;YACtCP,MAAMQ,MAAM,iBAAG,qBAACR,MAAMQ,MAAM,QAAM;YAClCR,MAAMS,GAAG,iBAAG,qBAACT,MAAMS,GAAG,QAAM;;;IAIjC,qBACE;;YACGE;YACAP,YAAYU,gBAAgB;;;AAGnC"}