part of 'table_form_bloc.dart';

@freezed
class TableFormState with _$TableFormState {
  factory TableFormState({
    required String name,
    required int capacity,
    required Option<Either<TableFailure, Table>> failureOrTable,
    required Option<Either<TableFailure, Unit>> failureOrTableTransfer,
    @Default(false) bool isUpdating,
    @Default(false) bool isCreating,
    @Default(false) bool isTransfering,
  }) = _TableFormState;

  factory TableFormState.initial() => TableFormState(
    failureOrTable: none(),
    name: '',
    capacity: 0,
    failureOrTableTransfer: none(),
  );
}
