{"version":3,"file":"Modal.context.mjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc;AAMlD,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CACvC,SAAS,CACV,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAqB,EAAE;IACpD,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,+GAA+G,CAChH,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { createContext, useContext } from 'react';\n\nimport type { ModalProps } from './Modal.types';\n\nexport type ModalContextType = Omit<ModalProps, 'children'>;\n\nexport const ModalContext = createContext<ModalContextType | undefined>(\n  undefined,\n);\n\nexport const useModalContext = (): ModalContextType => {\n  const context = useContext(ModalContext);\n  if (!context) {\n    throw new Error(\n      'useModalContext must be used within a Modal — make sure the consuming component is rendered inside <Modal />.',\n    );\n  }\n  return context;\n};\n"]}