import 'package:flutter/material.dart';

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


class PaymentConfigHeader extends StatelessWidget {
  final VoidCallback onAdd;
  const PaymentConfigHeader({super.key, required this.onAdd});

  @override
  Widget build(BuildContext context) {
    final l10n = AppLocalizations.of(context)!;
    final theme = Theme.of(context);

    return Column(
      children: [
        Text(
          l10n.paymentConfigTitle,
          style: theme.textTheme.headlineSmall,
          textAlign: TextAlign.center,
        ),
        const SizedBox(height: 4),
        Text(l10n.paymentConfigSubtitle, textAlign: TextAlign.center),
        const SizedBox(height: 12),
        SizedBox(
          width: double.infinity,
          child: OutlinedButton.icon(
            icon: const Icon(Icons.add),
            label: Text(l10n.addPaymentMethod),
            onPressed: onAdd,
          ),
        ),
      ],
    );
  }
}
