{"version":3,"file":"Modal.context.cjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.context.ts"],"names":[],"mappings":";;;AAAA,iCAAkD;AAMrC,QAAA,YAAY,GAAG,IAAA,qBAAa,EACvC,SAAS,CACV,CAAC;AAEK,MAAM,eAAe,GAAG,GAAqB,EAAE;IACpD,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,oBAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,+GAA+G,CAChH,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,eAAe,mBAQ1B","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"]}