import 'package:flutter/material.dart';
import 'package:syncrow_web/utils/color_manager.dart';

class RoleCard extends StatelessWidget {
  final String name;
  const RoleCard({super.key, required this.name});

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: ColorsManager.whiteColors, // Card background color
        borderRadius: BorderRadius.circular(20), // Rounded corners
        boxShadow: [
          BoxShadow(
            color: ColorsManager.blackColor.withOpacity(0.2), // Shadow color
            blurRadius: 20, // Spread of the shadow
            offset: const Offset(2, 2), // No directional bias
            spreadRadius: 1, // Ensures the shadow is more noticeable
          ),
        ],
      ),
      child: Container(
        decoration: BoxDecoration(
          color: ColorsManager.whiteColors,
          borderRadius: BorderRadius.circular(20), 
        ),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: [
            const CircleAvatar(
              backgroundColor: ColorsManager.neutralGray,
              radius: 65,
              child: CircleAvatar(
                backgroundColor: ColorsManager.circleRolesBackground,
                radius: 62,
                child: Icon(
                  Icons.admin_panel_settings,
                  size: 40,
                  color: Colors.blue,
                ),
              ),
            ),
            Text(
              name,
              style: const TextStyle(
                fontSize: 18,
                fontWeight: FontWeight.bold,
                color: Colors.black87,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
