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

class AddSpaceButton extends StatelessWidget {
  final VoidCallback onTap;

  const AddSpaceButton({super.key, required this.onTap});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap, // Handle tap event
      child: Container(
        width: 120, // Width of the button
        height: 60, // Height of the button
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.circular(20), // Rounded corners
          boxShadow: [
            BoxShadow(
              color: Colors.grey.withOpacity(0.5), // Shadow color
              spreadRadius: 5, // Spread radius of the shadow
              blurRadius: 7, // Blur effect
              offset: const Offset(0, 3), // Shadow position
            ),
          ],
        ),
        child: Center(
          child: Container(
            width: 40, // Size of the inner circle
            height: 40,
            decoration: const BoxDecoration(
              color: ColorsManager.boxColor, // Light gray background
              shape: BoxShape.circle, // Circular shape for the icon container
            ),
            child: const Icon(
              Icons.add, // Add icon
              color: Colors.blue, // Icon color
            ),
          ),
        ),
      ),
    );
  }
}
