import React, { createContext, useContext } from "react"; import { TextStyle, ViewStyle } from "react-native"; export interface Theme { button?: { buttonStyle?: ViewStyle; textStyle?: TextStyle; }; circle?: { style?: ViewStyle; }; slotList?: { listItem?: { buttonStyle?: ViewStyle; textStyle?: TextStyle; }; }; stepList?: { listItem?: { buttonStyle?: ViewStyle; textStyle?: TextStyle; }; }; variants?: { button?: { variant: string; style: { buttonStyle?: ViewStyle; textStyle?: TextStyle; }; circle?: { variant: string; backgroundColor?: string; style: ViewStyle; }; }[]; }; } /** * * @param {Theme} args - pass an incomplete theme object * @returns {Theme} A complete, ready-to-use theme object. */ export const createTheme = (args: Theme): Theme => { return args; }; interface ThemeProviderProps { theme: Theme; children: React.ReactNode | React.ReactNode[]; } const ThemeContext = createContext({}); /** * @component * Represents a SafecamThemeProvider instance * @example * * @param {Theme} theme - The theme to be applied. */ export const ThemeProvider: React.FC = ({ children, theme, }: ThemeProviderProps) => ( {children} ); export const useTheme = () => useContext(ThemeContext);