import 'package:equatable/equatable.dart';
import 'package:syncrow_app/features/app_layout/model/space_model.dart';

abstract class ManageUnitEvent extends Equatable {
  const ManageUnitEvent();

  @override
  List<Object> get props => [];
}

class InitialEvent extends ManageUnitEvent {}

class LoadingEvent extends ManageUnitEvent {}

class FetchRoomsEvent extends ManageUnitEvent {
  final SpaceModel unit;

  const FetchRoomsEvent({required this.unit});

  @override
  List<Object> get props => [unit];
}

class FetchDevicesByRoomIdEvent extends ManageUnitEvent {
  final String roomId;
  final SpaceModel unit;

  const FetchDevicesByRoomIdEvent({required this.roomId, required this.unit});

  @override
  List<Object> get props => [roomId, unit];
}

class AddNewRoom extends ManageUnitEvent {
  final String roomName;
  final SpaceModel unit;

  const AddNewRoom({required this.roomName, required this.unit});

  @override
  List<Object> get props => [roomName, unit];
}

class AssignRoomEvent extends ManageUnitEvent {
  final String roomId;
  final String deviceId;
  final SpaceModel unit;

  const AssignRoomEvent(
      {required this.roomId, required this.deviceId, required this.unit});

  @override
  List<Object> get props => [roomId, unit];
}

class UnassignRoomEvent extends ManageUnitEvent {
  final String roomId;
  final String deviceId;
  final SpaceModel unit;

  const UnassignRoomEvent(
      {required this.roomId, required this.deviceId, required this.unit});

  @override
  List<Object> get props => [roomId, unit];
}
