import 'package:english_learning/core/widgets/loading/shimmer_loading_widget.dart';
import 'package:flutter/material.dart';

class TopicCardLoading extends StatelessWidget {
  const TopicCardLoading({super.key});

  @override
  Widget build(BuildContext context) {
    return Card(
      color: Colors.white,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(12),
      ),
      elevation: 0,
      margin: const EdgeInsets.symmetric(vertical: 8.0),
      child: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Row(
          children: [
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  // Title shimmer
                  ShimmerLoadingWidget(
                    width: double.infinity,
                    height: 16,
                    borderRadius: BorderRadius.circular(4),
                  ),
                  const SizedBox(height: 12),
                  // First line of description
                  ShimmerLoadingWidget(
                    width: double.infinity,
                    height: 12,
                    borderRadius: BorderRadius.circular(4),
                    padding: const EdgeInsets.only(bottom: 8),
                  ),
                  // Second line of description (shorter)
                  ShimmerLoadingWidget(
                    width: MediaQuery.of(context).size.width * 0.6,
                    height: 12,
                    borderRadius: BorderRadius.circular(4),
                  ),
                ],
              ),
            ),
            const SizedBox(width: 16),
            // Completion status icon shimmer
            ShimmerLoadingWidget(
              width: 24,
              height: 24,
              borderRadius: BorderRadius.circular(12), // Make it circular
            ),
          ],
        ),
      ),
    );
  }
}
