{"version":3,"file":"mainQuestionContext.cjs","sources":["../../../../../src/components/feedback/main-question/mainQuestionContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport type { WithChildren } from \"../../../core/types.js\";\nimport type { FeedbackState } from \"../types.js\";\n\nconst mainQuestionContext = createContext<FeedbackState | undefined>(undefined);\n\nexport const useMainQuestionContext = (): FeedbackState | undefined =>\n    useContext(mainQuestionContext);\n\ninterface Props extends WithChildren {\n    state: FeedbackState;\n}\n\nexport const MainQuestionContextProvider: React.FC<Props> = ({\n    state,\n    children,\n}) => (\n    <mainQuestionContext.Provider value={state}>\n        {children}\n    </mainQuestionContext.Provider>\n);\n"],"names":["mainQuestionContext","createContext","state","children","Provider","value","useContext"],"mappings":"wIAIMA,EAAsBC,EAAAA,mBAAyC,uCAST,EACxDC,MAAAA,EACAC,SAAAA,WAECH,EAAoBI,SAApB,CAA6BC,MAAOH,EAChCC,SAAAA,mCAZ6B,IAClCG,EAAAA,WAAWN"}