import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_modular/flutter_modular.dart';
import '../blocs/one_time_order_bloc.dart';
import '../widgets/one_time_order/one_time_order_view.dart';

/// Page for creating a one-time staffing order.
/// Users can specify the date, location, and multiple staff positions required.
///
/// This page initializes the [OneTimeOrderBloc] and displays the [OneTimeOrderView].
/// It follows the Krow Clean Architecture by being a [StatelessWidget] and
/// delegating its state and UI to other components.
class OneTimeOrderPage extends StatelessWidget {
  /// Creates a [OneTimeOrderPage].
  const OneTimeOrderPage({super.key});

  @override
  Widget build(BuildContext context) {
    return BlocProvider<OneTimeOrderBloc>(
      create: (BuildContext context) => Modular.get<OneTimeOrderBloc>(),
      child: const OneTimeOrderView(),
    );
  }
}
