import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../resource/string.gen.dart';
import '../utils/styles.dart';
import 'common_alert_dialog.dart';

void logoutAccountDialog({required VoidCallback confirmOnTap}) {
  final tag = 'logoutAccountDialog';
  CommonAlertDialog.show(
    titleWidget: Text(
      StringName.tip,
      style: Styles.getTextStyleBlack204W500(16.sp),
    ),
    descWidget: Text(
      StringName.logoutDialogDesc,
      style: TextStyle(
        color: Colors.black.withAlpha(204),
        fontSize: 14.sp,
        fontWeight: FontWeight.w400,
      ),
    ),
    cancelText: StringName.logoutDialogCancel,
    confirmText: StringName.logoutDialogConfirm,
    cancelOnTap: () {
      CommonAlertDialog.dismiss(tag: tag);
    },
    confirmOnTap: () {
      confirmOnTap();
      CommonAlertDialog.dismiss(tag: tag);
    },
    tag: tag,
  );
}
