import 'package:flutter/material.dart';
import '../widgets/finance_summary_card.dart';
import '../widgets/work_day_card.dart';

class FinanceScreen extends StatefulWidget {
  const FinanceScreen({super.key});

  @override
  State<FinanceScreen> createState() => _FinanceScreenState();
}

class _FinanceScreenState extends State<FinanceScreen> {
  String dropdownValue = "الكل";

  @override
  Widget build(BuildContext context) {
    return ListView(
      padding: const EdgeInsets.only(top: 20, bottom: 120),
      children: [
        FinanceSummaryCard(
          totalAmount: "333,000",
          dropdownValue: dropdownValue,
          onCalendarTap: () => showDatePicker(
            context: context,
            initialDate: DateTime.now(),
            firstDate: DateTime(2020),
            lastDate: DateTime(2030),
          ),
          onDropdownChanged: (value) {
            setState(() => dropdownValue = value!);
          },
        ),

        const WorkDayCard(),
        const WorkDayCard(),
        const WorkDayCard(),
      ],
    );
  }
}
