{"version":3,"file":"ThemeProvider.mjs","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,MAAM,EAAE,cAAc;AAE/B,OAAO,EAAE,sBAAsB,EAAE,8BAA0B;AAG3D,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAE9C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,WAAW,GAAG,KAAK,GAKpB,EAAE,EAAE;IACH,MAAM,YAAY,GAAsB,OAAO,CAAC,GAAG,EAAE;QACnD,MAAM,cAAc,GAAG,sBAAsB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAClE,MAAM,EAAE,GAAG,MAAM,CAAC,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,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACzC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,YAAY,CAAC,QAAQ,CAAC,CACzB,CAAC;AACJ,CAAC,CAAC","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"]}