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

/// Helper class for showing modal sheets in the client home feature.
class ClientHomeSheets {
  /// Shows the shift order form bottom sheet.
  ///
  /// Optionally accepts [initialData] to pre-populate the form for reordering.
  /// Calls [onSubmit] when the user submits the form successfully.
  static void showOrderFormSheet(
    BuildContext context,
    Map<String, dynamic>? initialData, {
    required void Function(Map<String, dynamic>) onSubmit,
  }) {
    showModalBottomSheet(
      context: context,
      isScrollControlled: true,
      backgroundColor: Colors.transparent,
      builder: (BuildContext context) {
        return ShiftOrderFormSheet(
          initialData: initialData,
          onSubmit: onSubmit,
        );
      },
    );
  }
}
