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

class OrderDialog extends StatelessWidget {
  const OrderDialog({super.key, required this.isCall});

  final bool isCall;

  @override
  Widget build(BuildContext context) {
    return Dialog(
      backgroundColor: context.color.scaffoldBackgroundColor,
      insetPadding: AppUtils.kPaddingAll16,
      child: Padding(
        padding: AppUtils.kPaddingVer24Hor16,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            SvgPicture.asset("assets/svg/ic_done.svg"),
            AppUtils.kBoxHeight20,
            Text(
              isCall
                  ? AppLocalization.current.done_phone
                  : AppLocalization.current.done_order,
              style: context.text.authDesc.copyWith(
                fontWeight: FontWeight.w500,
              ),
              textAlign: TextAlign.center,
            ),
            AppUtils.kBoxHeight20,
            ElevatedButton(
              onPressed: () {
                Navigator.pop(context, true);
              },
              child: Text(AppLocalization.current.done_ready),
            ),
          ],
        ),
      ),
    );
  }
}
