{"version":3,"sources":["../src/components/Dialog/useDialogContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { DialogContextValue, DialogSurfaceContextValue } from './dialogContext';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport const useDialogContextValues = (state: DialogState): DialogContextValues => {\n  const { open, modalType, dialogTitleId, isNestedDialog, inertTrapFocus, unmountOnClose, requestOpenChange } = state;\n\n  const dialog: DialogContextValue = React.useMemo(\n    () => ({\n      open,\n      modalType,\n      dialogTitleId,\n      isNestedDialog,\n      inertTrapFocus,\n      unmountOnClose,\n      requestOpenChange,\n    }),\n    [open, modalType, dialogTitleId, isNestedDialog, inertTrapFocus, unmountOnClose, requestOpenChange],\n  );\n\n  const dialogSurface: DialogSurfaceContextValue = false;\n\n  return { dialog, dialogSurface };\n};\n"],"names":["useDialogContextValues","state","open","modalType","dialogTitleId","isNestedDialog","inertTrapFocus","unmountOnClose","requestOpenChange","dialog","React","useMemo","dialogSurface"],"mappings":"AAAA;;;;;+BAMaA;;;eAAAA;;;;iEAJU;AAIhB,MAAMA,yBAAyB,CAACC;IACrC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAEC,aAAa,EAAEC,cAAc,EAAEC,cAAc,EAAEC,cAAc,EAAEC,iBAAiB,EAAE,GAAGP;IAE9G,MAAMQ,SAA6BC,OAAMC,OAAO,CAC9C,IAAO,CAAA;YACLT;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;QACF,CAAA,GACA;QAACN;QAAMC;QAAWC;QAAeC;QAAgBC;QAAgBC;QAAgBC;KAAkB;IAGrG,MAAMI,gBAA2C;IAEjD,OAAO;QAAEH;QAAQG;IAAc;AACjC"}