import 'package:flutter/material.dart';

import 'package:pweb/controllers/payouts/multiple_payouts.dart';

import 'package:pweb/pages/dashboard/payouts/multiple/panels/upload_panel/drop_zone.dart';
import 'package:pweb/pages/dashboard/payouts/multiple/panels/upload_panel/actions.dart';
import 'package:pweb/pages/dashboard/payouts/multiple/panels/upload_panel/status.dart';
import 'package:pweb/pages/dashboard/payouts/multiple/panels/upload_panel/progress.dart';


class UploadPanel extends StatelessWidget {
  const UploadPanel({
    super.key,
    required this.controller,
  });

  final MultiplePayoutsController controller;

  @override
  Widget build(BuildContext context) {
    final hasFile = controller.selectedFileName != null;
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        UploadDropZone(controller: controller),
        UploadQuoteProgress(isQuoting: controller.isQuoting),
        if (hasFile) ...[
          const SizedBox(height: 12),
          UploadPanelActions(controller: controller),
        ],
        UploadPanelStatus(controller: controller),
      ],
    );
  }
}
