import 'package:flutter/material.dart';

import 'package:pweb/widgets/dialogs/confirmation_dialog.dart';

import 'package:pweb/generated/i18n/app_localizations.dart';


Future<void> confirmPaymentMethodDelete(
  BuildContext context,
  VoidCallback onConfirmed,
) async {
  final l10n = AppLocalizations.of(context)!;
  final confirmed = await showConfirmationDialog(
    context: context,
    title: l10n.delete,
    message: l10n.deletePaymentConfirmation,
    confirmLabel: l10n.delete,
  );
  if (confirmed) {
    onConfirmed();
  }
}
