{"version":3,"sources":["../src/components/Dialog/DialogSurface/renderDialogSurface.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { DialogSurfaceContext } from '../dialogContext';\nimport type { DialogSurfaceSlots, DialogSurfaceState } from './DialogSurface.types';\n\n/**\n * Render the final JSX of DialogSurface.\n * Returns null when the dialog is closed and unmountOnClose is true.\n * Provides DialogSurfaceContext=true so DialogTrigger inside defaults to action=\"close\".\n *\n * DialogSurface is always rendered inline. For `modal`/`alert`, `<dialog showModal()>`\n * enters the browser top layer. For `non-modal`, the surface uses the native\n * popover API (`popover=\"manual\"` + `showPopover()`), which promotes it to the\n * top layer without enabling native light-dismiss.\n */\nexport const renderDialogSurface = (state: DialogSurfaceState): JSXElement | null => {\n  if (!state.shouldRender) {\n    return null;\n  }\n\n  assertSlots<DialogSurfaceSlots>(state);\n\n  const content = (\n    <DialogSurfaceContext.Provider value={true}>\n      <state.root />\n    </DialogSurfaceContext.Provider>\n  );\n\n  return content;\n};\n"],"names":["renderDialogSurface","state","shouldRender","assertSlots","content","DialogSurfaceContext","Provider","value","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;;;;+BAiBpCA;;;eAAAA;;;;gCAfe;+BAES;AAa9B,MAAMA,sBAAsB,CAACC;IAClC,IAAI,CAACA,MAAMC,YAAY,EAAE;QACvB,OAAO;IACT;IAEAC,IAAAA,2BAAW,EAAqBF;IAEhC,MAAMG,wBACJ,qBAACC,mCAAoB,CAACC,QAAQ;QAACC,OAAO;kBACpC,cAAA,qBAACN,MAAMO,IAAI;;IAIf,OAAOJ;AACT"}