{"version":3,"file":"ThemeProvider.cjs","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,iCAA+B;AAE/B,2DAA2D;AAG3D,qDAA8C;AAE9C;;;;;;;;GAQG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,WAAW,GAAG,KAAK,GAKpB,EAAE,EAAE;IACH,MAAM,YAAY,GAAsB,IAAA,eAAO,EAAC,GAAG,EAAE;QACnD,MAAM,cAAc,GAAG,IAAA,wCAAsB,EAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAClE,MAAM,EAAE,GAAG,IAAA,cAAM,EAAC,cAAc,CAAC,CAAC;QAClC,OAAO;YACL,EAAE;YACF,KAAK;YACL,WAAW;SACZ,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IAEzB,OAAO,CACL,CAAC,2BAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACzC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,2BAAY,CAAC,QAAQ,CAAC,CACzB,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,aAAa,iBAwBxB","sourcesContent":["import React, { useMemo } from 'react';\nimport { create } from 'twrnc';\n\nimport { generateTailwindConfig } from './tailwind.config';\nimport type { Theme } from './Theme.types';\nimport type { ThemeContextProps } from './ThemeContext';\nimport { ThemeContext } from './ThemeContext';\n\n/**\n * Theme provider component that wraps child components with theme context\n *\n * @param options - Component props\n * @param options.children - Child components to render\n * @param options.theme - Theme to apply (light or dark)\n * @param options.isPureBlack - When true with dark theme, uses pureBlackDarkTheme token values\n * @returns React component that provides theme context to children\n */\nexport const ThemeProvider = ({\n  children,\n  theme,\n  isPureBlack = false,\n}: {\n  children: React.ReactNode;\n  theme: Theme;\n  isPureBlack?: boolean;\n}) => {\n  const contextValue: ThemeContextProps = useMemo(() => {\n    const tailwindConfig = generateTailwindConfig(theme, isPureBlack);\n    const tw = create(tailwindConfig);\n    return {\n      tw,\n      theme,\n      isPureBlack,\n    };\n  }, [theme, isPureBlack]);\n\n  return (\n    <ThemeContext.Provider value={contextValue}>\n      {children}\n    </ThemeContext.Provider>\n  );\n};\n"]}