import { View, type ViewStyle } from "react-native";
import { useTheme } from "../theme";

interface CardProps {
  children: React.ReactNode;
  style?: ViewStyle;
  onPress?: () => void;
}

export function Card({ children, style, onPress }: CardProps) {
  const theme = useTheme();

  return (
    <View
      style={[
        {
          backgroundColor: theme.colors.card,
          borderRadius: theme.radius.lg,
          padding: theme.spacing.md,
          boxShadow: "0 1px 3px rgba(0, 0, 0, 0.08)",
        },
        style,
      ]}
    >
      {children}
    </View>
  );
}