import 'package:flutter/material.dart';

import '../../../../../../common/data/report_menu.dart';
import '../../../../../../common/theme/theme.dart';
import '../../../../../components/spaces/space.dart';

class ReportMenuCard extends StatelessWidget {
  final ReportMenu menu;
  final bool isActive;
  final Function() onTap;
  const ReportMenuCard({
    super.key,
    required this.menu,
    required this.isActive,
    required this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        padding: const EdgeInsets.all(12.0),
        decoration: BoxDecoration(
          border: Border(
            right: BorderSide(
              color: isActive ? AppColor.primary : Colors.transparent,
              width: 4.0,
            ),
          ),
        ),
        child: Row(
          children: [
            Icon(
              menu.icons,
              size: 24.0,
              color: isActive ? AppColor.primary : AppColor.textSecondary,
            ),
            const SpaceWidth(12),
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    menu.title,
                    style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
                  ),
                  const SpaceHeight(4.0),
                  Text(
                    menu.subtitle,
                    style: AppStyle.md.copyWith(color: AppColor.textSecondary),
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
