import 'package:flutter/material.dart';

class DetailStatWidget extends StatelessWidget {
  final IconData icon;
  final String label;
  final String value;
  final Color iconColor;
  final double valueSize;
  final FontWeight valueWeight;

  const DetailStatWidget({
    super.key,
    required this.icon,
    required this.label,
    required this.value,
    this.iconColor = Colors.blueGrey,
    this.valueSize = 18,
    this.valueWeight = FontWeight.w600,
  });

  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        Container(
          padding: const EdgeInsets.all(12),
          decoration: BoxDecoration(
            color: iconColor.withAlpha(100),
            borderRadius: BorderRadius.circular(12),
          ),
          child: Icon(icon, color: iconColor, size: 28),
        ),
        const SizedBox(width: 16),
        Expanded(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(
                label,
                style: TextStyle(
                  fontSize: 13,
                  color: Colors.grey[600],
                  fontWeight: FontWeight.w500,
                ),
              ),
              const SizedBox(height: 4),
              Text(
                value,
                style: TextStyle(
                  fontSize: valueSize,
                  fontWeight: valueWeight,
                  color: Colors.grey[900],
                ),
              ),
            ],
          ),
        ),
      ],
    );
  }
}
