import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';
import 'package:sizer/sizer.dart';

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

  @override
  Widget build(BuildContext context) {
    return Shimmer.fromColors(
      baseColor: Colors.grey.shade300,
      highlightColor: Colors.grey.shade100,
      child: SingleChildScrollView(
        physics: const NeverScrollableScrollPhysics(),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Container(width: 30.w, height: 2.h, color: Colors.white),
            SizedBox(height: 1.5.h),
            Container(
              height: 20.h,
              width: double.infinity,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(3.w),
              ),
            ),
            SizedBox(height: 3.h),
            _buildInputPlaceholder(),
            SizedBox(height: 3.h),
            _buildInputPlaceholder(),
            SizedBox(height: 3.h),
            _buildInputPlaceholder(),
            SizedBox(height: 3.h),

            Container(
              width: double.infinity,
              height: 7.h,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(2.w),
              ),
            ),
            SizedBox(height: 3.h),
            Container(
              width: double.infinity,
              height: 7.h,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(2.w),
              ),
            ),
            SizedBox(height: 3.h),

            Container(
              width: double.infinity,
              height: 18.h,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(3.w),
              ),
            ),
            SizedBox(height: 3.h),

            Container(
              width: double.infinity,
              height: 7.h,
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(3.w),
              ),
            ),
          ],
        ),
      ),
    );
  }

  Widget _buildInputPlaceholder() {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Container(width: 25.w, height: 1.5.h, color: Colors.white),
        SizedBox(height: 1.h),
        Container(
          width: double.infinity,
          height: 6.h,
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.circular(2.5.w),
          ),
        ),
      ],
    );
  }
}