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

class PendingPayCard extends StatelessWidget {

  const PendingPayCard({
    super.key,
    required this.amount,
    required this.onCashOut,
  });
  final double amount;
  final VoidCallback onCashOut;

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(UiConstants.space4),
      decoration: BoxDecoration(
        color: UiColors.tagInProgress,
        borderRadius: BorderRadius.circular(UiConstants.radiusBase),
        boxShadow: <BoxShadow>[
          BoxShadow(
            color: UiColors.black.withValues(alpha: 0.05),
            blurRadius: 2,
            offset: const Offset(0, 1),
          ),
        ],
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          Row(
            children: <Widget>[
              Container(
                width: UiConstants.space10,
                height: UiConstants.space10,
                decoration: BoxDecoration(
                  color: UiColors.white.withValues(alpha: 0.2),
                  borderRadius: BorderRadius.circular(UiConstants.radiusMdValue),
                ),
                child: const Icon(
                  UiIcons.chart,
                  color: UiColors.primary,
                  size: 20,
                ),
              ),
              const SizedBox(width: UiConstants.space3),
              Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Text(
                    "Pending",
                    style: UiTypography.body2b.textPrimary,
                  ),
                  Text(
                    "\$${amount.toStringAsFixed(0)} available",
                    style: UiTypography.body3m.textSecondary,
                  ),
                ],
              ),
            ],
          ),
        ],
      ),
    );
  }
}
