import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:shimmer/shimmer.dart';

class GetAttendanceTrackingShimmer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,
      clipBehavior: Clip.antiAlias,
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(15),
        boxShadow: [
          BoxShadow(
            color: const Color(0xff000000).withOpacity(.05),
            blurRadius: 26,
            offset: const Offset(0, -3),
          ),
        ],
      ),
      child: Stack(
        alignment: Alignment.center,
        children: [
          // SvgPicture.asset("assets/images/"),
          Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Expanded(
                child: Column(
                  mainAxisSize: MainAxisSize.min,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    LocaleKeys.markAttendance.tr().toText14(color: Colors.white, isBold: true).toShimmer(),
                    16.height,
                    "07:55:12".toText10(color: Colors.white, isBold: true).toShimmer(),
                    3.height,
                    LocaleKeys.timeLeftToday.tr().toText10(color: Colors.white).toShimmer(),
                    9.height,
                    const ClipRRect(
                      borderRadius: BorderRadius.all(
                        Radius.circular(20),
                      ),
                      child: LinearProgressIndicator(
                        value: 0.7,
                        minHeight: 8,
                        valueColor: const AlwaysStoppedAnimation<Color>(Colors.white),
                        backgroundColor: const Color(0xff196D73),
                      ),
                    ).toShimmer(),
                  ],
                ).paddingOnly(top: 12, right: 15, left: 12),
              ),
              Row(
                children: [
                  Expanded(
                    child: Column(
                      mainAxisSize: MainAxisSize.min,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [LocaleKeys.checkIn.tr().toText12(color: Colors.white).toShimmer(),],
                    ).paddingOnly(left: 12),
                  ),
                  Container(
                    width: 45,
                    height: 45,
                    // color: Colors.blue,
                    padding: const EdgeInsets.only(left: 14, right: 14),
                  ).toShimmer(),
                ],
              ),
            ],
          ),
        ],
      ),
    );
  }
}
