import 'package:cargocalculaterapp/core/extension/build_context_extension.dart';
import 'package:cargocalculaterapp/core/theme/colors/app_colors.dart';
import 'package:cargocalculaterapp/generated/l10n.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

import '../../../../../core/utils/app_utils.dart';

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

  @override
  Widget build(BuildContext context) {
    return Dialog(
      backgroundColor: context.color.scaffoldBackgroundColor,
      insetPadding: AppUtils.kPaddingAll16,
      child: Padding(
        padding: const EdgeInsets.only(
          top: 32,
          left: 16,
          right: 16,
          bottom: 24,
        ),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            SvgPicture.asset(
              "assets/svg/ic_warning.svg",
              height: 48,
              width: 48,
            ),
            AppUtils.kBoxHeight16,
            Text(
              AppLocalization.current.delete_account_desc,
              style: context.text.secondaryText14,
              textAlign: TextAlign.center,
            ),
            AppUtils.kBoxHeight16,
            Row(
              children: [
                Expanded(
                  child: InkWell(
                    onTap: () {
                      Navigator.pop(context);
                    },
                    borderRadius: AppUtils.kBorderRadius24,
                    child: Ink(
                      decoration: BoxDecoration(
                        color: context.color.scaffoldBackgroundColor,
                        borderRadius: AppUtils.kBorderRadius24,
                        border: Border.all(color: context.color.primaryColor),
                      ),
                      height: 56,
                      padding: AppUtils.kPaddingHor16,
                      child: Center(
                        child: Text(
                          AppLocalization.current.cancel,
                          style: TextStyle(
                            fontSize: 16,
                            fontWeight: FontWeight.w700,
                            color: context.color.textColor,
                          ),
                        ),
                      ),
                    ),
                  ),
                ),
                AppUtils.kBoxWidth16,
                Expanded(
                  child: ElevatedButton(
                    style: ElevatedButton.styleFrom(
                      backgroundColor: LightThemeColors.errorColor,
                    ),
                    onPressed: () {
                      Navigator.pop(context, true);
                    },
                    child: Text(AppLocalization.current.delete),
                  ),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
