import 'package:comwell_key_app/common/components/shimmer_loader/placeholders/content_placeholder.dart';
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';
import 'package:comwell_key_app/themes/light_theme.dart';

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

  @override
  Widget build(BuildContext context) {
    return Shimmer.fromColors(
      baseColor: sandColor[40]!,
      highlightColor: sandColor[10]!,
      enabled: true,
      child: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Container(
              width: 180,
              height: 28,
              color: Colors.white,
              margin: const EdgeInsets.only(bottom: 20),
            ),
            Row(
              children: [
                Container(
                  width: 40,
                  height: 24,
                  color: Colors.white,
                ),
                const SizedBox(width: 8),
                Container(
                  width: 100,
                  height: 16,
                  color: Colors.white,
                ),
              ],
            ),
            const SizedBox(height: 20),
            ...List.generate(
                4,
                (index) => const Padding(
                      padding: EdgeInsets.symmetric(vertical: 8.0),
                      child: ContentPlaceholder(
                          lineType: ContentLineType.twoLines),
                    )),
            const SizedBox(height: 16),
            const Padding(
              padding: EdgeInsets.symmetric(horizontal: 0.0),
              child: SizedBox(
                width: double.infinity,
                height: 48,
                child: DecoratedBox(
                  decoration: BoxDecoration(
                    color: Colors.white,
                    borderRadius: BorderRadius.all(Radius.circular(8)),
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}