{"version":3,"file":"DrawerContext.cjs","sources":["../../../src/components/Drawer/DrawerContext.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport type { ThemingProps } from \"../../types\";\nimport type { DrawerTheme } from \"./Drawer\";\n\nexport interface DrawerContextValue extends ThemingProps<DrawerTheme> {\n  id?: string;\n  isOpen?: boolean;\n  onClose?: () => void;\n}\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(undefined);\n\nexport function useDrawerContext(): DrawerContextValue {\n  const context = useContext(DrawerContext);\n\n  if (!context) {\n    throw new Error(\"useDrawerContext should be used within the DrawerContext provider!\");\n  }\n\n  return context;\n}\n"],"names":["createContext","useContext"],"mappings":";;;;AAGY,MAAC,aAAa,GAAGA,mBAAa,CAAC,MAAM;AAC1C,SAAS,gBAAgB,GAAG;AACnC,EAAE,MAAM,OAAO,GAAGC,gBAAU,CAAC,aAAa,CAAC;AAC3C,EAAE,IAAI,CAAC,OAAO,EAAE;AAChB,IAAI,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC;AACzF,EAAE;AACF,EAAE,OAAO,OAAO;AAChB;;;;;"}