import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/presentation/blocs/steps_cubit/cubit/steps_cubit.dart';
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/presentation/widgets/space_step_part_widget.dart';
import 'package:syncrow_web/pages/access_management/manage_bookable_spaces/presentation/widgets/step_two_details_widget.dart';

class DetailsStepsWidget extends StatelessWidget {
  final TextEditingController pointsController;
  const DetailsStepsWidget({
    super.key,
    required this.pointsController,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 20),
      child: BlocBuilder<StepsCubit, StepsState>(
        builder: (context, state) {
          if (state is StepOneState) {
            return const SpacesStepDetailsWidget();
          } else if (state is StepTwoState) {
            return StepTwoDetailsWidget(
              pointsController: pointsController,
            );
          } else {
            return const SizedBox();
          }
        },
      ),
    );
  }
}
