import 'package:flutter/material.dart';

import 'package:design_system/design_system.dart';


/// Widget for a quick action button on the home page, using design system tokens.
class QuickActionItem extends StatelessWidget {
  /// The icon to display.
  final IconData icon;
  /// The label for the action.
  final String label;
  /// The callback when tapped.
  final VoidCallback onTap;

  /// Creates a [QuickActionItem].
  const QuickActionItem({super.key, required this.icon, required this.label, required this.onTap});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Column(
        children: [
          Container(
            width: 64,
            height: 64,
            padding: const EdgeInsets.all(UiConstants.space4),
            decoration: BoxDecoration(
              color: UiColors.bgBanner,
              borderRadius: BorderRadius.circular(UiConstants.radiusBase),
              border: Border.all(color: UiColors.bgSecondary),
              boxShadow: [
                BoxShadow(
                  color: UiColors.foreground.withOpacity(0.05),
                  blurRadius: 4,
                  offset: const Offset(0, 2),
                ),
              ],
            ),
            child: Icon(icon, color: UiColors.primary, size: 24),
          ),
          const SizedBox(height: UiConstants.space2),
          Text(
            label,
            style: UiTypography.body3r.copyWith(color: UiColors.foreground),
          ),
        ],
      ),
    );
  }
}
