// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// 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

part of 'doc_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 informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');

/// @nodoc
class _$DocEventTearOff {
  const _$DocEventTearOff();

  Initial initial() {
    return const Initial();
  }

  Deleted deleted() {
    return const Deleted();
  }

  Restore restore() {
    return const Restore();
  }

  RestorePage restorePage() {
    return const RestorePage();
  }

  DeletePermanently deletePermanently() {
    return const DeletePermanently();
  }
}

/// @nodoc
const $DocEvent = _$DocEventTearOff();

/// @nodoc
mixin _$DocEvent {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() deleted,
    required TResult Function() restore,
    required TResult Function() restorePage,
    required TResult Function() deletePermanently,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(Initial value) initial,
    required TResult Function(Deleted value) deleted,
    required TResult Function(Restore value) restore,
    required TResult Function(RestorePage value) restorePage,
    required TResult Function(DeletePermanently value) deletePermanently,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $DocEventCopyWith<$Res> {
  factory $DocEventCopyWith(DocEvent value, $Res Function(DocEvent) then) =
      _$DocEventCopyWithImpl<$Res>;
}

/// @nodoc
class _$DocEventCopyWithImpl<$Res> implements $DocEventCopyWith<$Res> {
  _$DocEventCopyWithImpl(this._value, this._then);

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

/// @nodoc
abstract class $InitialCopyWith<$Res> {
  factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
      _$InitialCopyWithImpl<$Res>;
}

/// @nodoc
class _$InitialCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
    implements $InitialCopyWith<$Res> {
  _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
      : super(_value, (v) => _then(v as Initial));

  @override
  Initial get _value => super._value as Initial;
}

/// @nodoc

class _$Initial implements Initial {
  const _$Initial();

  @override
  String toString() {
    return 'DocEvent.initial()';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) || (other is Initial);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() deleted,
    required TResult Function() restore,
    required TResult Function() restorePage,
    required TResult Function() deletePermanently,
  }) {
    return initial();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
  }) {
    return initial?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
    required TResult orElse(),
  }) {
    if (initial != null) {
      return initial();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(Initial value) initial,
    required TResult Function(Deleted value) deleted,
    required TResult Function(Restore value) restore,
    required TResult Function(RestorePage value) restorePage,
    required TResult Function(DeletePermanently value) deletePermanently,
  }) {
    return initial(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
  }) {
    return initial?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
    required TResult orElse(),
  }) {
    if (initial != null) {
      return initial(this);
    }
    return orElse();
  }
}

abstract class Initial implements DocEvent {
  const factory Initial() = _$Initial;
}

/// @nodoc
abstract class $DeletedCopyWith<$Res> {
  factory $DeletedCopyWith(Deleted value, $Res Function(Deleted) then) =
      _$DeletedCopyWithImpl<$Res>;
}

/// @nodoc
class _$DeletedCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
    implements $DeletedCopyWith<$Res> {
  _$DeletedCopyWithImpl(Deleted _value, $Res Function(Deleted) _then)
      : super(_value, (v) => _then(v as Deleted));

  @override
  Deleted get _value => super._value as Deleted;
}

/// @nodoc

class _$Deleted implements Deleted {
  const _$Deleted();

  @override
  String toString() {
    return 'DocEvent.deleted()';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) || (other is Deleted);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() deleted,
    required TResult Function() restore,
    required TResult Function() restorePage,
    required TResult Function() deletePermanently,
  }) {
    return deleted();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
  }) {
    return deleted?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
    required TResult orElse(),
  }) {
    if (deleted != null) {
      return deleted();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(Initial value) initial,
    required TResult Function(Deleted value) deleted,
    required TResult Function(Restore value) restore,
    required TResult Function(RestorePage value) restorePage,
    required TResult Function(DeletePermanently value) deletePermanently,
  }) {
    return deleted(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
  }) {
    return deleted?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
    required TResult orElse(),
  }) {
    if (deleted != null) {
      return deleted(this);
    }
    return orElse();
  }
}

abstract class Deleted implements DocEvent {
  const factory Deleted() = _$Deleted;
}

/// @nodoc
abstract class $RestoreCopyWith<$Res> {
  factory $RestoreCopyWith(Restore value, $Res Function(Restore) then) =
      _$RestoreCopyWithImpl<$Res>;
}

/// @nodoc
class _$RestoreCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
    implements $RestoreCopyWith<$Res> {
  _$RestoreCopyWithImpl(Restore _value, $Res Function(Restore) _then)
      : super(_value, (v) => _then(v as Restore));

  @override
  Restore get _value => super._value as Restore;
}

/// @nodoc

class _$Restore implements Restore {
  const _$Restore();

  @override
  String toString() {
    return 'DocEvent.restore()';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) || (other is Restore);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() deleted,
    required TResult Function() restore,
    required TResult Function() restorePage,
    required TResult Function() deletePermanently,
  }) {
    return restore();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
  }) {
    return restore?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
    required TResult orElse(),
  }) {
    if (restore != null) {
      return restore();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(Initial value) initial,
    required TResult Function(Deleted value) deleted,
    required TResult Function(Restore value) restore,
    required TResult Function(RestorePage value) restorePage,
    required TResult Function(DeletePermanently value) deletePermanently,
  }) {
    return restore(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
  }) {
    return restore?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
    required TResult orElse(),
  }) {
    if (restore != null) {
      return restore(this);
    }
    return orElse();
  }
}

abstract class Restore implements DocEvent {
  const factory Restore() = _$Restore;
}

/// @nodoc
abstract class $RestorePageCopyWith<$Res> {
  factory $RestorePageCopyWith(
          RestorePage value, $Res Function(RestorePage) then) =
      _$RestorePageCopyWithImpl<$Res>;
}

/// @nodoc
class _$RestorePageCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
    implements $RestorePageCopyWith<$Res> {
  _$RestorePageCopyWithImpl(
      RestorePage _value, $Res Function(RestorePage) _then)
      : super(_value, (v) => _then(v as RestorePage));

  @override
  RestorePage get _value => super._value as RestorePage;
}

/// @nodoc

class _$RestorePage implements RestorePage {
  const _$RestorePage();

  @override
  String toString() {
    return 'DocEvent.restorePage()';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) || (other is RestorePage);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() deleted,
    required TResult Function() restore,
    required TResult Function() restorePage,
    required TResult Function() deletePermanently,
  }) {
    return restorePage();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
  }) {
    return restorePage?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
    required TResult orElse(),
  }) {
    if (restorePage != null) {
      return restorePage();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(Initial value) initial,
    required TResult Function(Deleted value) deleted,
    required TResult Function(Restore value) restore,
    required TResult Function(RestorePage value) restorePage,
    required TResult Function(DeletePermanently value) deletePermanently,
  }) {
    return restorePage(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
  }) {
    return restorePage?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
    required TResult orElse(),
  }) {
    if (restorePage != null) {
      return restorePage(this);
    }
    return orElse();
  }
}

abstract class RestorePage implements DocEvent {
  const factory RestorePage() = _$RestorePage;
}

/// @nodoc
abstract class $DeletePermanentlyCopyWith<$Res> {
  factory $DeletePermanentlyCopyWith(
          DeletePermanently value, $Res Function(DeletePermanently) then) =
      _$DeletePermanentlyCopyWithImpl<$Res>;
}

/// @nodoc
class _$DeletePermanentlyCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
    implements $DeletePermanentlyCopyWith<$Res> {
  _$DeletePermanentlyCopyWithImpl(
      DeletePermanently _value, $Res Function(DeletePermanently) _then)
      : super(_value, (v) => _then(v as DeletePermanently));

  @override
  DeletePermanently get _value => super._value as DeletePermanently;
}

/// @nodoc

class _$DeletePermanently implements DeletePermanently {
  const _$DeletePermanently();

  @override
  String toString() {
    return 'DocEvent.deletePermanently()';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) || (other is DeletePermanently);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() deleted,
    required TResult Function() restore,
    required TResult Function() restorePage,
    required TResult Function() deletePermanently,
  }) {
    return deletePermanently();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
  }) {
    return deletePermanently?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? deleted,
    TResult Function()? restore,
    TResult Function()? restorePage,
    TResult Function()? deletePermanently,
    required TResult orElse(),
  }) {
    if (deletePermanently != null) {
      return deletePermanently();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(Initial value) initial,
    required TResult Function(Deleted value) deleted,
    required TResult Function(Restore value) restore,
    required TResult Function(RestorePage value) restorePage,
    required TResult Function(DeletePermanently value) deletePermanently,
  }) {
    return deletePermanently(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
  }) {
    return deletePermanently?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(Initial value)? initial,
    TResult Function(Deleted value)? deleted,
    TResult Function(Restore value)? restore,
    TResult Function(RestorePage value)? restorePage,
    TResult Function(DeletePermanently value)? deletePermanently,
    required TResult orElse(),
  }) {
    if (deletePermanently != null) {
      return deletePermanently(this);
    }
    return orElse();
  }
}

abstract class DeletePermanently implements DocEvent {
  const factory DeletePermanently() = _$DeletePermanently;
}

/// @nodoc
class _$DocStateTearOff {
  const _$DocStateTearOff();

  _DocState call(
      {required DocLoadState loadState,
      required bool isDeleted,
      required bool forceClose}) {
    return _DocState(
      loadState: loadState,
      isDeleted: isDeleted,
      forceClose: forceClose,
    );
  }
}

/// @nodoc
const $DocState = _$DocStateTearOff();

/// @nodoc
mixin _$DocState {
  DocLoadState get loadState => throw _privateConstructorUsedError;
  bool get isDeleted => throw _privateConstructorUsedError;
  bool get forceClose => throw _privateConstructorUsedError;

  @JsonKey(ignore: true)
  $DocStateCopyWith<DocState> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $DocStateCopyWith<$Res> {
  factory $DocStateCopyWith(DocState value, $Res Function(DocState) then) =
      _$DocStateCopyWithImpl<$Res>;
  $Res call({DocLoadState loadState, bool isDeleted, bool forceClose});

  $DocLoadStateCopyWith<$Res> get loadState;
}

/// @nodoc
class _$DocStateCopyWithImpl<$Res> implements $DocStateCopyWith<$Res> {
  _$DocStateCopyWithImpl(this._value, this._then);

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

  @override
  $Res call({
    Object? loadState = freezed,
    Object? isDeleted = freezed,
    Object? forceClose = freezed,
  }) {
    return _then(_value.copyWith(
      loadState: loadState == freezed
          ? _value.loadState
          : loadState // ignore: cast_nullable_to_non_nullable
              as DocLoadState,
      isDeleted: isDeleted == freezed
          ? _value.isDeleted
          : isDeleted // ignore: cast_nullable_to_non_nullable
              as bool,
      forceClose: forceClose == freezed
          ? _value.forceClose
          : forceClose // ignore: cast_nullable_to_non_nullable
              as bool,
    ));
  }

  @override
  $DocLoadStateCopyWith<$Res> get loadState {
    return $DocLoadStateCopyWith<$Res>(_value.loadState, (value) {
      return _then(_value.copyWith(loadState: value));
    });
  }
}

/// @nodoc
abstract class _$DocStateCopyWith<$Res> implements $DocStateCopyWith<$Res> {
  factory _$DocStateCopyWith(_DocState value, $Res Function(_DocState) then) =
      __$DocStateCopyWithImpl<$Res>;
  @override
  $Res call({DocLoadState loadState, bool isDeleted, bool forceClose});

  @override
  $DocLoadStateCopyWith<$Res> get loadState;
}

/// @nodoc
class __$DocStateCopyWithImpl<$Res> extends _$DocStateCopyWithImpl<$Res>
    implements _$DocStateCopyWith<$Res> {
  __$DocStateCopyWithImpl(_DocState _value, $Res Function(_DocState) _then)
      : super(_value, (v) => _then(v as _DocState));

  @override
  _DocState get _value => super._value as _DocState;

  @override
  $Res call({
    Object? loadState = freezed,
    Object? isDeleted = freezed,
    Object? forceClose = freezed,
  }) {
    return _then(_DocState(
      loadState: loadState == freezed
          ? _value.loadState
          : loadState // ignore: cast_nullable_to_non_nullable
              as DocLoadState,
      isDeleted: isDeleted == freezed
          ? _value.isDeleted
          : isDeleted // ignore: cast_nullable_to_non_nullable
              as bool,
      forceClose: forceClose == freezed
          ? _value.forceClose
          : forceClose // ignore: cast_nullable_to_non_nullable
              as bool,
    ));
  }
}

/// @nodoc

class _$_DocState implements _DocState {
  const _$_DocState(
      {required this.loadState,
      required this.isDeleted,
      required this.forceClose});

  @override
  final DocLoadState loadState;
  @override
  final bool isDeleted;
  @override
  final bool forceClose;

  @override
  String toString() {
    return 'DocState(loadState: $loadState, isDeleted: $isDeleted, forceClose: $forceClose)';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) ||
        (other is _DocState &&
            (identical(other.loadState, loadState) ||
                const DeepCollectionEquality()
                    .equals(other.loadState, loadState)) &&
            (identical(other.isDeleted, isDeleted) ||
                const DeepCollectionEquality()
                    .equals(other.isDeleted, isDeleted)) &&
            (identical(other.forceClose, forceClose) ||
                const DeepCollectionEquality()
                    .equals(other.forceClose, forceClose)));
  }

  @override
  int get hashCode =>
      runtimeType.hashCode ^
      const DeepCollectionEquality().hash(loadState) ^
      const DeepCollectionEquality().hash(isDeleted) ^
      const DeepCollectionEquality().hash(forceClose);

  @JsonKey(ignore: true)
  @override
  _$DocStateCopyWith<_DocState> get copyWith =>
      __$DocStateCopyWithImpl<_DocState>(this, _$identity);
}

abstract class _DocState implements DocState {
  const factory _DocState(
      {required DocLoadState loadState,
      required bool isDeleted,
      required bool forceClose}) = _$_DocState;

  @override
  DocLoadState get loadState => throw _privateConstructorUsedError;
  @override
  bool get isDeleted => throw _privateConstructorUsedError;
  @override
  bool get forceClose => throw _privateConstructorUsedError;
  @override
  @JsonKey(ignore: true)
  _$DocStateCopyWith<_DocState> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
class _$DocLoadStateTearOff {
  const _$DocLoadStateTearOff();

  _Loading loading() {
    return const _Loading();
  }

  _Finish finish(Either<Unit, FlowyError> successOrFail) {
    return _Finish(
      successOrFail,
    );
  }
}

/// @nodoc
const $DocLoadState = _$DocLoadStateTearOff();

/// @nodoc
mixin _$DocLoadState {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() loading,
    required TResult Function(Either<Unit, FlowyError> successOrFail)
        finish,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? loading,
    TResult Function(Either<Unit, FlowyError> successOrFail)? finish,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? loading,
    TResult Function(Either<Unit, FlowyError> successOrFail)? finish,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Loading value) loading,
    required TResult Function(_Finish value) finish,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(_Loading value)? loading,
    TResult Function(_Finish value)? finish,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Loading value)? loading,
    TResult Function(_Finish value)? finish,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $DocLoadStateCopyWith<$Res> {
  factory $DocLoadStateCopyWith(
          DocLoadState value, $Res Function(DocLoadState) then) =
      _$DocLoadStateCopyWithImpl<$Res>;
}

/// @nodoc
class _$DocLoadStateCopyWithImpl<$Res> implements $DocLoadStateCopyWith<$Res> {
  _$DocLoadStateCopyWithImpl(this._value, this._then);

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

/// @nodoc
abstract class _$LoadingCopyWith<$Res> {
  factory _$LoadingCopyWith(_Loading value, $Res Function(_Loading) then) =
      __$LoadingCopyWithImpl<$Res>;
}

/// @nodoc
class __$LoadingCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
    implements _$LoadingCopyWith<$Res> {
  __$LoadingCopyWithImpl(_Loading _value, $Res Function(_Loading) _then)
      : super(_value, (v) => _then(v as _Loading));

  @override
  _Loading get _value => super._value as _Loading;
}

/// @nodoc

class _$_Loading implements _Loading {
  const _$_Loading();

  @override
  String toString() {
    return 'DocLoadState.loading()';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) || (other is _Loading);
  }

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() loading,
    required TResult Function(Either<Unit, FlowyError> successOrFail)
        finish,
  }) {
    return loading();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? loading,
    TResult Function(Either<Unit, FlowyError> successOrFail)? finish,
  }) {
    return loading?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? loading,
    TResult Function(Either<Unit, FlowyError> successOrFail)? finish,
    required TResult orElse(),
  }) {
    if (loading != null) {
      return loading();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Loading value) loading,
    required TResult Function(_Finish value) finish,
  }) {
    return loading(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(_Loading value)? loading,
    TResult Function(_Finish value)? finish,
  }) {
    return loading?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Loading value)? loading,
    TResult Function(_Finish value)? finish,
    required TResult orElse(),
  }) {
    if (loading != null) {
      return loading(this);
    }
    return orElse();
  }
}

abstract class _Loading implements DocLoadState {
  const factory _Loading() = _$_Loading;
}

/// @nodoc
abstract class _$FinishCopyWith<$Res> {
  factory _$FinishCopyWith(_Finish value, $Res Function(_Finish) then) =
      __$FinishCopyWithImpl<$Res>;
  $Res call({Either<Unit, FlowyError> successOrFail});
}

/// @nodoc
class __$FinishCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
    implements _$FinishCopyWith<$Res> {
  __$FinishCopyWithImpl(_Finish _value, $Res Function(_Finish) _then)
      : super(_value, (v) => _then(v as _Finish));

  @override
  _Finish get _value => super._value as _Finish;

  @override
  $Res call({
    Object? successOrFail = freezed,
  }) {
    return _then(_Finish(
      successOrFail == freezed
          ? _value.successOrFail
          : successOrFail // ignore: cast_nullable_to_non_nullable
              as Either<Unit, FlowyError>,
    ));
  }
}

/// @nodoc

class _$_Finish implements _Finish {
  const _$_Finish(this.successOrFail);

  @override
  final Either<Unit, FlowyError> successOrFail;

  @override
  String toString() {
    return 'DocLoadState.finish(successOrFail: $successOrFail)';
  }

  @override
  bool operator ==(dynamic other) {
    return identical(this, other) ||
        (other is _Finish &&
            (identical(other.successOrFail, successOrFail) ||
                const DeepCollectionEquality()
                    .equals(other.successOrFail, successOrFail)));
  }

  @override
  int get hashCode =>
      runtimeType.hashCode ^ const DeepCollectionEquality().hash(successOrFail);

  @JsonKey(ignore: true)
  @override
  _$FinishCopyWith<_Finish> get copyWith =>
      __$FinishCopyWithImpl<_Finish>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() loading,
    required TResult Function(Either<Unit, FlowyError> successOrFail)
        finish,
  }) {
    return finish(successOrFail);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? loading,
    TResult Function(Either<Unit, FlowyError> successOrFail)? finish,
  }) {
    return finish?.call(successOrFail);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? loading,
    TResult Function(Either<Unit, FlowyError> successOrFail)? finish,
    required TResult orElse(),
  }) {
    if (finish != null) {
      return finish(successOrFail);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Loading value) loading,
    required TResult Function(_Finish value) finish,
  }) {
    return finish(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(_Loading value)? loading,
    TResult Function(_Finish value)? finish,
  }) {
    return finish?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Loading value)? loading,
    TResult Function(_Finish value)? finish,
    required TResult orElse(),
  }) {
    if (finish != null) {
      return finish(this);
    }
    return orElse();
  }
}

abstract class _Finish implements DocLoadState {
  const factory _Finish(Either<Unit, FlowyError> successOrFail) = _$_Finish;

  Either<Unit, FlowyError> get successOrFail =>
      throw _privateConstructorUsedError;
  @JsonKey(ignore: true)
  _$FinishCopyWith<_Finish> get copyWith => throw _privateConstructorUsedError;
}
