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

class PendingPayCard extends StatelessWidget {
  final double amount;
  final VoidCallback onCashOut;

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

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(14),
      decoration: BoxDecoration(
        gradient: const LinearGradient(
          colors: [Color(0xFFEFF6FF), Color(0xFFEFF6FF)], // blue-50 to blue-50
          begin: Alignment.topLeft,
          end: Alignment.bottomRight,
        ),
        borderRadius: BorderRadius.circular(16),
        boxShadow: [
          BoxShadow(
            color: Colors.black.withOpacity(0.05),
            blurRadius: 2,
            offset: const Offset(0, 1),
          ),
        ],
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Row(
            children: [
              Container(
                width: 40,
                height: 40,
                decoration: BoxDecoration(
                  color: const Color(0xFFE8F0FF),
                  borderRadius: BorderRadius.circular(8),
                ),
                child: const Icon(
                  LucideIcons.dollarSign,
                  color: Color(0xFF0047FF),
                  size: 20,
                ),
              ),
              const SizedBox(width: 10),
              Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  const Text(
                    "Pending",
                    style: TextStyle(
                      fontWeight: FontWeight.bold,
                      color: Color(0xFF0F172A), // slate-900
                      fontSize: 14,
                    ),
                  ),
                  Text(
                    "\$${amount.toStringAsFixed(0)} available",
                    style: const TextStyle(
                      fontSize: 12,
                      color: Color(0xFF475569), // slate-600
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                ],
              ),
            ],
          ),
          /*
          ElevatedButton.icon(
            onPressed: onCashOut,
            icon: const Icon(LucideIcons.zap, size: 14),
            label: const Text("Early Pay"),
            style: ElevatedButton.styleFrom(
              backgroundColor: const Color(0xFF0047FF),
              foregroundColor: Colors.white,
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(8),
              ),
              padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
              elevation: 4,
              shadowColor: Colors.black.withOpacity(0.2),
              textStyle: const TextStyle(
                fontSize: 14,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
          */
        ],
      ),
    );
  }
}
