import React, { createContext, useState, useContext } from "react";

const darkColors = {
  isDark: true,
  bg: "#090d16",
  card: "#131c2e",
  cardBorder: "#1e293b",
  subCard: "#182338",
  text: "#f8fafc",
  textMuted: "#94a3b8",
  textDim: "#64748b",
  primary: "#10b981",
  primaryDark: "#059669",
  primaryLight: "rgba(16, 185, 129, 0.15)",
  danger: "#ef4444",
  dangerLight: "rgba(239, 68, 68, 0.15)",
  warning: "#f59e0b",
  warningLight: "rgba(245, 158, 11, 0.15)",
  inputBg: "#0b1120",
  inputBorder: "#243247",
  tabBarBg: "#0b1120",
  tabBarBorder: "#1e293b",
};

export const ThemeContext = createContext();

export const ThemeProvider = ({ children }) => {
  const [colors, setColors] = useState(darkColors);

  return (
    <ThemeContext.Provider value={{ colors }}>
      {children}
    </ThemeContext.Provider>
  );
};

export const useTheme = () => useContext(ThemeContext);
