import 'package:flutter/material.dart';
import '../core/theme/app_colors.dart';
import '../core/theme/app_typography.dart';

class CitationChip extends StatelessWidget {
  final String text;
  final VoidCallback? onTap;

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

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
        decoration: BoxDecoration(
          color: AppColors.royalBlue.withValues(alpha: 0.12),
          borderRadius: BorderRadius.circular(6),
          border: Border.all(
            color: AppColors.royalBlue.withValues(alpha: 0.3),
          ),
        ),
        child: Row(
          mainAxisSize: MainAxisSize.min,
          children: [
            Icon(
              Icons.gavel_rounded,
              size: 12,
              color: AppColors.gold,
            ),
            const SizedBox(width: 4),
            Text(
              text,
              style: AppTypography.citation.copyWith(
                color: AppColors.royalBlue,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
