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

type ServiceCardProps = {
  title: string;
  icon: React.ReactNode;
};

export default function ServiceCard({ title, icon }: ServiceCardProps) {
  const colorScheme = 'dark';

  return (
    <View style={[styles.container, { backgroundColor: Colors[colorScheme].secondary }]}>
      <View style={styles.content}>
        <View style={styles.iconContainer}>{icon}</View>
        <Text style={styles.title}>{title}</Text>
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    borderRadius: 15,
    padding: 15,
    marginVertical: 10,
    justifyContent: 'center',
    alignItems: 'center',
    aspectRatio: 1,
  },
  content: {
    justifyContent: 'center',
    alignItems: 'center',
    flex: 1,
  },
  iconContainer: {
    marginBottom: 10,
  },
  title: {
    fontSize: 16,
    fontWeight: 'bold',
    color: Colors.dark.text,
    textAlign: 'center',
  },
});
