import React from 'react';
import { View, StyleSheet, ViewStyle, useColorScheme } from 'react-native';
import { Colors } from '@/constants/theme';

interface GlassCardProps {
  children: React.ReactNode;
  style?: ViewStyle | ViewStyle[];
  intensity?: number; // Kept for backwards compatibility but ignored
}

export default function GlassCard({ children, style }: GlassCardProps) {
  const colorScheme = useColorScheme() ?? 'light';
  const theme = Colors[colorScheme as 'light' | 'dark'];

  return (
    <View style={[styles.container, { backgroundColor: theme.surface, borderColor: theme.primary }, style]}>
      <View style={styles.content}>
        {children}
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    borderRadius: 16, // Material 3 rounded corners
    overflow: 'hidden',
    borderWidth: StyleSheet.hairlineWidth, // Use hairline for the fine thinness requested
  },
  content: {
    flex: 1,
    padding: 16,
  }
});
