// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of 'table_loader_bloc.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
  'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);

/// @nodoc
mixin _$TableLoaderEvent {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isRefresh, String? status) fetched,
    required TResult Function(String id, Offset position) updatedPostion,
    required TResult Function(Table? table) setSelectedTable,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isRefresh, String? status)? fetched,
    TResult? Function(String id, Offset position)? updatedPostion,
    TResult? Function(Table? table)? setSelectedTable,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isRefresh, String? status)? fetched,
    TResult Function(String id, Offset position)? updatedPostion,
    TResult Function(Table? table)? setSelectedTable,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Fetched value) fetched,
    required TResult Function(_UpdatedPosition value) updatedPostion,
    required TResult Function(_SetSelectedTable value) setSelectedTable,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Fetched value)? fetched,
    TResult? Function(_UpdatedPosition value)? updatedPostion,
    TResult? Function(_SetSelectedTable value)? setSelectedTable,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Fetched value)? fetched,
    TResult Function(_UpdatedPosition value)? updatedPostion,
    TResult Function(_SetSelectedTable value)? setSelectedTable,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $TableLoaderEventCopyWith<$Res> {
  factory $TableLoaderEventCopyWith(
    TableLoaderEvent value,
    $Res Function(TableLoaderEvent) then,
  ) = _$TableLoaderEventCopyWithImpl<$Res, TableLoaderEvent>;
}

/// @nodoc
class _$TableLoaderEventCopyWithImpl<$Res, $Val extends TableLoaderEvent>
    implements $TableLoaderEventCopyWith<$Res> {
  _$TableLoaderEventCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
}

/// @nodoc
abstract class _$$FetchedImplCopyWith<$Res> {
  factory _$$FetchedImplCopyWith(
    _$FetchedImpl value,
    $Res Function(_$FetchedImpl) then,
  ) = __$$FetchedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({bool isRefresh, String? status});
}

/// @nodoc
class __$$FetchedImplCopyWithImpl<$Res>
    extends _$TableLoaderEventCopyWithImpl<$Res, _$FetchedImpl>
    implements _$$FetchedImplCopyWith<$Res> {
  __$$FetchedImplCopyWithImpl(
    _$FetchedImpl _value,
    $Res Function(_$FetchedImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? isRefresh = null, Object? status = freezed}) {
    return _then(
      _$FetchedImpl(
        isRefresh: null == isRefresh
            ? _value.isRefresh
            : isRefresh // ignore: cast_nullable_to_non_nullable
                  as bool,
        status: freezed == status
            ? _value.status
            : status // ignore: cast_nullable_to_non_nullable
                  as String?,
      ),
    );
  }
}

/// @nodoc

class _$FetchedImpl implements _Fetched {
  const _$FetchedImpl({this.isRefresh = false, this.status});

  @override
  @JsonKey()
  final bool isRefresh;
  @override
  final String? status;

  @override
  String toString() {
    return 'TableLoaderEvent.fetched(isRefresh: $isRefresh, status: $status)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$FetchedImpl &&
            (identical(other.isRefresh, isRefresh) ||
                other.isRefresh == isRefresh) &&
            (identical(other.status, status) || other.status == status));
  }

  @override
  int get hashCode => Object.hash(runtimeType, isRefresh, status);

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$FetchedImplCopyWith<_$FetchedImpl> get copyWith =>
      __$$FetchedImplCopyWithImpl<_$FetchedImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isRefresh, String? status) fetched,
    required TResult Function(String id, Offset position) updatedPostion,
    required TResult Function(Table? table) setSelectedTable,
  }) {
    return fetched(isRefresh, status);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isRefresh, String? status)? fetched,
    TResult? Function(String id, Offset position)? updatedPostion,
    TResult? Function(Table? table)? setSelectedTable,
  }) {
    return fetched?.call(isRefresh, status);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isRefresh, String? status)? fetched,
    TResult Function(String id, Offset position)? updatedPostion,
    TResult Function(Table? table)? setSelectedTable,
    required TResult orElse(),
  }) {
    if (fetched != null) {
      return fetched(isRefresh, status);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Fetched value) fetched,
    required TResult Function(_UpdatedPosition value) updatedPostion,
    required TResult Function(_SetSelectedTable value) setSelectedTable,
  }) {
    return fetched(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Fetched value)? fetched,
    TResult? Function(_UpdatedPosition value)? updatedPostion,
    TResult? Function(_SetSelectedTable value)? setSelectedTable,
  }) {
    return fetched?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Fetched value)? fetched,
    TResult Function(_UpdatedPosition value)? updatedPostion,
    TResult Function(_SetSelectedTable value)? setSelectedTable,
    required TResult orElse(),
  }) {
    if (fetched != null) {
      return fetched(this);
    }
    return orElse();
  }
}

abstract class _Fetched implements TableLoaderEvent {
  const factory _Fetched({final bool isRefresh, final String? status}) =
      _$FetchedImpl;

  bool get isRefresh;
  String? get status;

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$FetchedImplCopyWith<_$FetchedImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$UpdatedPositionImplCopyWith<$Res> {
  factory _$$UpdatedPositionImplCopyWith(
    _$UpdatedPositionImpl value,
    $Res Function(_$UpdatedPositionImpl) then,
  ) = __$$UpdatedPositionImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String id, Offset position});
}

/// @nodoc
class __$$UpdatedPositionImplCopyWithImpl<$Res>
    extends _$TableLoaderEventCopyWithImpl<$Res, _$UpdatedPositionImpl>
    implements _$$UpdatedPositionImplCopyWith<$Res> {
  __$$UpdatedPositionImplCopyWithImpl(
    _$UpdatedPositionImpl _value,
    $Res Function(_$UpdatedPositionImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? id = null, Object? position = null}) {
    return _then(
      _$UpdatedPositionImpl(
        id: null == id
            ? _value.id
            : id // ignore: cast_nullable_to_non_nullable
                  as String,
        position: null == position
            ? _value.position
            : position // ignore: cast_nullable_to_non_nullable
                  as Offset,
      ),
    );
  }
}

/// @nodoc

class _$UpdatedPositionImpl implements _UpdatedPosition {
  const _$UpdatedPositionImpl({required this.id, required this.position});

  @override
  final String id;
  @override
  final Offset position;

  @override
  String toString() {
    return 'TableLoaderEvent.updatedPostion(id: $id, position: $position)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$UpdatedPositionImpl &&
            (identical(other.id, id) || other.id == id) &&
            (identical(other.position, position) ||
                other.position == position));
  }

  @override
  int get hashCode => Object.hash(runtimeType, id, position);

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$UpdatedPositionImplCopyWith<_$UpdatedPositionImpl> get copyWith =>
      __$$UpdatedPositionImplCopyWithImpl<_$UpdatedPositionImpl>(
        this,
        _$identity,
      );

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isRefresh, String? status) fetched,
    required TResult Function(String id, Offset position) updatedPostion,
    required TResult Function(Table? table) setSelectedTable,
  }) {
    return updatedPostion(id, position);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isRefresh, String? status)? fetched,
    TResult? Function(String id, Offset position)? updatedPostion,
    TResult? Function(Table? table)? setSelectedTable,
  }) {
    return updatedPostion?.call(id, position);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isRefresh, String? status)? fetched,
    TResult Function(String id, Offset position)? updatedPostion,
    TResult Function(Table? table)? setSelectedTable,
    required TResult orElse(),
  }) {
    if (updatedPostion != null) {
      return updatedPostion(id, position);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Fetched value) fetched,
    required TResult Function(_UpdatedPosition value) updatedPostion,
    required TResult Function(_SetSelectedTable value) setSelectedTable,
  }) {
    return updatedPostion(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Fetched value)? fetched,
    TResult? Function(_UpdatedPosition value)? updatedPostion,
    TResult? Function(_SetSelectedTable value)? setSelectedTable,
  }) {
    return updatedPostion?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Fetched value)? fetched,
    TResult Function(_UpdatedPosition value)? updatedPostion,
    TResult Function(_SetSelectedTable value)? setSelectedTable,
    required TResult orElse(),
  }) {
    if (updatedPostion != null) {
      return updatedPostion(this);
    }
    return orElse();
  }
}

abstract class _UpdatedPosition implements TableLoaderEvent {
  const factory _UpdatedPosition({
    required final String id,
    required final Offset position,
  }) = _$UpdatedPositionImpl;

  String get id;
  Offset get position;

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$UpdatedPositionImplCopyWith<_$UpdatedPositionImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$SetSelectedTableImplCopyWith<$Res> {
  factory _$$SetSelectedTableImplCopyWith(
    _$SetSelectedTableImpl value,
    $Res Function(_$SetSelectedTableImpl) then,
  ) = __$$SetSelectedTableImplCopyWithImpl<$Res>;
  @useResult
  $Res call({Table? table});

  $TableCopyWith<$Res>? get table;
}

/// @nodoc
class __$$SetSelectedTableImplCopyWithImpl<$Res>
    extends _$TableLoaderEventCopyWithImpl<$Res, _$SetSelectedTableImpl>
    implements _$$SetSelectedTableImplCopyWith<$Res> {
  __$$SetSelectedTableImplCopyWithImpl(
    _$SetSelectedTableImpl _value,
    $Res Function(_$SetSelectedTableImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? table = freezed}) {
    return _then(
      _$SetSelectedTableImpl(
        freezed == table
            ? _value.table
            : table // ignore: cast_nullable_to_non_nullable
                  as Table?,
      ),
    );
  }

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $TableCopyWith<$Res>? get table {
    if (_value.table == null) {
      return null;
    }

    return $TableCopyWith<$Res>(_value.table!, (value) {
      return _then(_value.copyWith(table: value));
    });
  }
}

/// @nodoc

class _$SetSelectedTableImpl implements _SetSelectedTable {
  const _$SetSelectedTableImpl(this.table);

  @override
  final Table? table;

  @override
  String toString() {
    return 'TableLoaderEvent.setSelectedTable(table: $table)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$SetSelectedTableImpl &&
            (identical(other.table, table) || other.table == table));
  }

  @override
  int get hashCode => Object.hash(runtimeType, table);

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$SetSelectedTableImplCopyWith<_$SetSelectedTableImpl> get copyWith =>
      __$$SetSelectedTableImplCopyWithImpl<_$SetSelectedTableImpl>(
        this,
        _$identity,
      );

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isRefresh, String? status) fetched,
    required TResult Function(String id, Offset position) updatedPostion,
    required TResult Function(Table? table) setSelectedTable,
  }) {
    return setSelectedTable(table);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isRefresh, String? status)? fetched,
    TResult? Function(String id, Offset position)? updatedPostion,
    TResult? Function(Table? table)? setSelectedTable,
  }) {
    return setSelectedTable?.call(table);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isRefresh, String? status)? fetched,
    TResult Function(String id, Offset position)? updatedPostion,
    TResult Function(Table? table)? setSelectedTable,
    required TResult orElse(),
  }) {
    if (setSelectedTable != null) {
      return setSelectedTable(table);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Fetched value) fetched,
    required TResult Function(_UpdatedPosition value) updatedPostion,
    required TResult Function(_SetSelectedTable value) setSelectedTable,
  }) {
    return setSelectedTable(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Fetched value)? fetched,
    TResult? Function(_UpdatedPosition value)? updatedPostion,
    TResult? Function(_SetSelectedTable value)? setSelectedTable,
  }) {
    return setSelectedTable?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Fetched value)? fetched,
    TResult Function(_UpdatedPosition value)? updatedPostion,
    TResult Function(_SetSelectedTable value)? setSelectedTable,
    required TResult orElse(),
  }) {
    if (setSelectedTable != null) {
      return setSelectedTable(this);
    }
    return orElse();
  }
}

abstract class _SetSelectedTable implements TableLoaderEvent {
  const factory _SetSelectedTable(final Table? table) = _$SetSelectedTableImpl;

  Table? get table;

  /// Create a copy of TableLoaderEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$SetSelectedTableImplCopyWith<_$SetSelectedTableImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
mixin _$TableLoaderState {
  List<Table> get tables => throw _privateConstructorUsedError;
  Option<TableFailure> get failureOption => throw _privateConstructorUsedError;
  Table? get selectedTable => throw _privateConstructorUsedError;
  bool get isFetching => throw _privateConstructorUsedError;
  bool get hasReachedMax => throw _privateConstructorUsedError;
  int get page => throw _privateConstructorUsedError;

  /// Create a copy of TableLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  $TableLoaderStateCopyWith<TableLoaderState> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $TableLoaderStateCopyWith<$Res> {
  factory $TableLoaderStateCopyWith(
    TableLoaderState value,
    $Res Function(TableLoaderState) then,
  ) = _$TableLoaderStateCopyWithImpl<$Res, TableLoaderState>;
  @useResult
  $Res call({
    List<Table> tables,
    Option<TableFailure> failureOption,
    Table? selectedTable,
    bool isFetching,
    bool hasReachedMax,
    int page,
  });

  $TableCopyWith<$Res>? get selectedTable;
}

/// @nodoc
class _$TableLoaderStateCopyWithImpl<$Res, $Val extends TableLoaderState>
    implements $TableLoaderStateCopyWith<$Res> {
  _$TableLoaderStateCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of TableLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? tables = null,
    Object? failureOption = null,
    Object? selectedTable = freezed,
    Object? isFetching = null,
    Object? hasReachedMax = null,
    Object? page = null,
  }) {
    return _then(
      _value.copyWith(
            tables: null == tables
                ? _value.tables
                : tables // ignore: cast_nullable_to_non_nullable
                      as List<Table>,
            failureOption: null == failureOption
                ? _value.failureOption
                : failureOption // ignore: cast_nullable_to_non_nullable
                      as Option<TableFailure>,
            selectedTable: freezed == selectedTable
                ? _value.selectedTable
                : selectedTable // ignore: cast_nullable_to_non_nullable
                      as Table?,
            isFetching: null == isFetching
                ? _value.isFetching
                : isFetching // ignore: cast_nullable_to_non_nullable
                      as bool,
            hasReachedMax: null == hasReachedMax
                ? _value.hasReachedMax
                : hasReachedMax // ignore: cast_nullable_to_non_nullable
                      as bool,
            page: null == page
                ? _value.page
                : page // ignore: cast_nullable_to_non_nullable
                      as int,
          )
          as $Val,
    );
  }

  /// Create a copy of TableLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $TableCopyWith<$Res>? get selectedTable {
    if (_value.selectedTable == null) {
      return null;
    }

    return $TableCopyWith<$Res>(_value.selectedTable!, (value) {
      return _then(_value.copyWith(selectedTable: value) as $Val);
    });
  }
}

/// @nodoc
abstract class _$$TableLoaderStateImplCopyWith<$Res>
    implements $TableLoaderStateCopyWith<$Res> {
  factory _$$TableLoaderStateImplCopyWith(
    _$TableLoaderStateImpl value,
    $Res Function(_$TableLoaderStateImpl) then,
  ) = __$$TableLoaderStateImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    List<Table> tables,
    Option<TableFailure> failureOption,
    Table? selectedTable,
    bool isFetching,
    bool hasReachedMax,
    int page,
  });

  @override
  $TableCopyWith<$Res>? get selectedTable;
}

/// @nodoc
class __$$TableLoaderStateImplCopyWithImpl<$Res>
    extends _$TableLoaderStateCopyWithImpl<$Res, _$TableLoaderStateImpl>
    implements _$$TableLoaderStateImplCopyWith<$Res> {
  __$$TableLoaderStateImplCopyWithImpl(
    _$TableLoaderStateImpl _value,
    $Res Function(_$TableLoaderStateImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of TableLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? tables = null,
    Object? failureOption = null,
    Object? selectedTable = freezed,
    Object? isFetching = null,
    Object? hasReachedMax = null,
    Object? page = null,
  }) {
    return _then(
      _$TableLoaderStateImpl(
        tables: null == tables
            ? _value._tables
            : tables // ignore: cast_nullable_to_non_nullable
                  as List<Table>,
        failureOption: null == failureOption
            ? _value.failureOption
            : failureOption // ignore: cast_nullable_to_non_nullable
                  as Option<TableFailure>,
        selectedTable: freezed == selectedTable
            ? _value.selectedTable
            : selectedTable // ignore: cast_nullable_to_non_nullable
                  as Table?,
        isFetching: null == isFetching
            ? _value.isFetching
            : isFetching // ignore: cast_nullable_to_non_nullable
                  as bool,
        hasReachedMax: null == hasReachedMax
            ? _value.hasReachedMax
            : hasReachedMax // ignore: cast_nullable_to_non_nullable
                  as bool,
        page: null == page
            ? _value.page
            : page // ignore: cast_nullable_to_non_nullable
                  as int,
      ),
    );
  }
}

/// @nodoc

class _$TableLoaderStateImpl implements _TableLoaderState {
  _$TableLoaderStateImpl({
    required final List<Table> tables,
    required this.failureOption,
    this.selectedTable,
    this.isFetching = false,
    this.hasReachedMax = false,
    this.page = 1,
  }) : _tables = tables;

  final List<Table> _tables;
  @override
  List<Table> get tables {
    if (_tables is EqualUnmodifiableListView) return _tables;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_tables);
  }

  @override
  final Option<TableFailure> failureOption;
  @override
  final Table? selectedTable;
  @override
  @JsonKey()
  final bool isFetching;
  @override
  @JsonKey()
  final bool hasReachedMax;
  @override
  @JsonKey()
  final int page;

  @override
  String toString() {
    return 'TableLoaderState(tables: $tables, failureOption: $failureOption, selectedTable: $selectedTable, isFetching: $isFetching, hasReachedMax: $hasReachedMax, page: $page)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$TableLoaderStateImpl &&
            const DeepCollectionEquality().equals(other._tables, _tables) &&
            (identical(other.failureOption, failureOption) ||
                other.failureOption == failureOption) &&
            (identical(other.selectedTable, selectedTable) ||
                other.selectedTable == selectedTable) &&
            (identical(other.isFetching, isFetching) ||
                other.isFetching == isFetching) &&
            (identical(other.hasReachedMax, hasReachedMax) ||
                other.hasReachedMax == hasReachedMax) &&
            (identical(other.page, page) || other.page == page));
  }

  @override
  int get hashCode => Object.hash(
    runtimeType,
    const DeepCollectionEquality().hash(_tables),
    failureOption,
    selectedTable,
    isFetching,
    hasReachedMax,
    page,
  );

  /// Create a copy of TableLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$TableLoaderStateImplCopyWith<_$TableLoaderStateImpl> get copyWith =>
      __$$TableLoaderStateImplCopyWithImpl<_$TableLoaderStateImpl>(
        this,
        _$identity,
      );
}

abstract class _TableLoaderState implements TableLoaderState {
  factory _TableLoaderState({
    required final List<Table> tables,
    required final Option<TableFailure> failureOption,
    final Table? selectedTable,
    final bool isFetching,
    final bool hasReachedMax,
    final int page,
  }) = _$TableLoaderStateImpl;

  @override
  List<Table> get tables;
  @override
  Option<TableFailure> get failureOption;
  @override
  Table? get selectedTable;
  @override
  bool get isFetching;
  @override
  bool get hasReachedMax;
  @override
  int get page;

  /// Create a copy of TableLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @override
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$TableLoaderStateImplCopyWith<_$TableLoaderStateImpl> get copyWith =>
      throw _privateConstructorUsedError;
}
