
import 'package:flutter/material.dart';

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


class PaymentDetailsError extends StatelessWidget {
  final String message;
  final VoidCallback onRetry;

  const PaymentDetailsError({
    super.key,
    required this.message,
    required this.onRetry,
  });

  @override
  Widget build(BuildContext context) {
    final loc = AppLocalizations.of(context)!;
    return Center(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Text(loc.notificationError(message)),
          const SizedBox(height: 12),
          ElevatedButton(
            onPressed: onRetry,
            child: Text(loc.retry),
          ),
        ],
      ),
    );
  }
}
