import 'package:cargocalculaterapp/core/extension/build_context_extension.dart';
import 'package:cargocalculaterapp/generated/l10n.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import '../../../../../core/utils/app_utils.dart';

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

  @override
  Widget build(BuildContext context) {
    return SliverToBoxAdapter(
      child: Container(
        margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
        width: double.infinity,
        // padding: const EdgeInsets.symmetric(vertical: 42, horizontal: 32),
        decoration: BoxDecoration(
          borderRadius: AppUtils.kBorderRadius16,
          color: context.color.statusBackground,
          border: Border.all(color: context.color.lightBorder),
        ),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ClipRRect(
              borderRadius: AppUtils.kBorderRadiusTop16,
              child: SvgPicture.asset(
                "assets/svg/ic_empty_box.svg",
                width: MediaQuery.sizeOf(context).width - 34,
              ),
            ),
            Text(
              AppLocalization.current.no_order,
              style: context.text.titleBig,
              textAlign: TextAlign.center,
            ),
            AppUtils.kBoxHeight12,
            Padding(
              padding: AppUtils.kPaddingHor24,
              child: Text(
                AppLocalization.current.no_order_desc,
                style: context.text.profileCategory.copyWith(
                  color: context.color.lightSecondary,
                ),
                textAlign: TextAlign.center,
              ),
            ),
            AppUtils.kBoxHeight48,
          ],
        ),
      ),
    );
  }
}
