import 'package:flutter/material.dart';


class StatusPageSuccess extends StatelessWidget {
  final IconData? icon;
  final String successMessage;
  final String successDescription;
  final Widget? action;

  const StatusPageSuccess({ 
    super.key,
    required this.successMessage,
    required this.successDescription,
    this.action,
    this.icon,
  });

  @override
  Widget build(BuildContext context) => Center(
    child: Padding(
      padding: const EdgeInsets.all(16.0),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Icon(icon ?? Icons.check_circle_outline, size: 72, color: Theme.of(context).colorScheme.primary),
          const SizedBox(height: 16.0),
          Text(
            successMessage,
            style: Theme.of(context).textTheme.titleMedium,
            textAlign: TextAlign.center,
          ),
          const SizedBox(height: 8.0),
          Text(
            successDescription,
            textAlign: TextAlign.center,
            style: Theme.of(context).textTheme.bodyMedium,
          ),
          const SizedBox(height: 20.0),
          ?action,
        ],
      ),
    ),
  );
}
