{"version":3,"file":"Spacing.module-790621eb.js","sources":["../../../client-app/src/common/components/UploadDocuments/Context.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport { DocumentRequirement } from './SingleUploadBox';\n\nexport type DocumentationContextType = {\n requirements: DocumentRequirement[];\n createUploadDocumentHandler: (documentType: string) => (data: FormData) => Promise;\n deleteDocument: (documentId: string) => Promise;\n trustedUpload: () => Promise;\n completeUpload: () => Promise;\n country: Country;\n};\n\nexport const DocumentationContext = createContext(null);\n\nexport function useDocumentationContext() {\n const context = useContext(DocumentationContext);\n if (!context) {\n throw new Error('useDocumentationContext hook is only useable in tree under DocumentationContextProvider element.');\n }\n return context;\n}\n"],"names":["DocumentationContext","createContext","useDocumentationContext","context","useContext"],"mappings":"22DAYaA,EAAuBC,gBAA+C,IAAI,EAEhF,SAASC,IAA0B,CAChC,MAAAC,EAAUC,aAAWJ,CAAoB,EAC/C,GAAI,CAACG,EACK,MAAA,IAAI,MAAM,kGAAkG,EAE/G,OAAAA,CACX"}