// 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 'share_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 _$DocShareEventTearOff {
  const _$DocShareEventTearOff();

  ShareMarkdown shareMarkdown() {
    return const ShareMarkdown();
  }

  ShareText shareText() {
    return const ShareText();
  }

  ShareLink shareLink() {
    return const ShareLink();
  }
}

/// @nodoc
const $DocShareEvent = _$DocShareEventTearOff();

/// @nodoc
mixin _$DocShareEvent {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() shareMarkdown,
    required TResult Function() shareText,
    required TResult Function() shareLink,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? shareMarkdown,
    TResult Function()? shareText,
    TResult Function()? shareLink,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? shareMarkdown,
    TResult Function()? shareText,
    TResult Function()? shareLink,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(ShareMarkdown value) shareMarkdown,
    required TResult Function(ShareText value) shareText,
    required TResult Function(ShareLink value) shareLink,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(ShareMarkdown value)? shareMarkdown,
    TResult Function(ShareText value)? shareText,
    TResult Function(ShareLink value)? shareLink,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(ShareMarkdown value)? shareMarkdown,
    TResult Function(ShareText value)? shareText,
    TResult Function(ShareLink value)? shareLink,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $DocShareEventCopyWith<$Res> {
  factory $DocShareEventCopyWith(
          DocShareEvent value, $Res Function(DocShareEvent) then) =
      _$DocShareEventCopyWithImpl<$Res>;
}

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

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

/// @nodoc
abstract class $ShareMarkdownCopyWith<$Res> {
  factory $ShareMarkdownCopyWith(
          ShareMarkdown value, $Res Function(ShareMarkdown) then) =
      _$ShareMarkdownCopyWithImpl<$Res>;
}

/// @nodoc
class _$ShareMarkdownCopyWithImpl<$Res>
    extends _$DocShareEventCopyWithImpl<$Res>
    implements $ShareMarkdownCopyWith<$Res> {
  _$ShareMarkdownCopyWithImpl(
      ShareMarkdown _value, $Res Function(ShareMarkdown) _then)
      : super(_value, (v) => _then(v as ShareMarkdown));

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

/// @nodoc

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

  @override
  String toString() {
    return 'DocShareEvent.shareMarkdown()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() shareMarkdown,
    required TResult Function() shareText,
    required TResult Function() shareLink,
  }) {
    return shareMarkdown();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? shareMarkdown,
    TResult Function()? shareText,
    TResult Function()? shareLink,
  }) {
    return shareMarkdown?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? shareMarkdown,
    TResult Function()? shareText,
    TResult Function()? shareLink,
    required TResult orElse(),
  }) {
    if (shareMarkdown != null) {
      return shareMarkdown();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(ShareMarkdown value) shareMarkdown,
    required TResult Function(ShareText value) shareText,
    required TResult Function(ShareLink value) shareLink,
  }) {
    return shareMarkdown(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(ShareMarkdown value)? shareMarkdown,
    TResult Function(ShareText value)? shareText,
    TResult Function(ShareLink value)? shareLink,
  }) {
    return shareMarkdown?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(ShareMarkdown value)? shareMarkdown,
    TResult Function(ShareText value)? shareText,
    TResult Function(ShareLink value)? shareLink,
    required TResult orElse(),
  }) {
    if (shareMarkdown != null) {
      return shareMarkdown(this);
    }
    return orElse();
  }
}

abstract class ShareMarkdown implements DocShareEvent {
  const factory ShareMarkdown() = _$ShareMarkdown;
}

/// @nodoc
abstract class $ShareTextCopyWith<$Res> {
  factory $ShareTextCopyWith(ShareText value, $Res Function(ShareText) then) =
      _$ShareTextCopyWithImpl<$Res>;
}

/// @nodoc
class _$ShareTextCopyWithImpl<$Res> extends _$DocShareEventCopyWithImpl<$Res>
    implements $ShareTextCopyWith<$Res> {
  _$ShareTextCopyWithImpl(ShareText _value, $Res Function(ShareText) _then)
      : super(_value, (v) => _then(v as ShareText));

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

/// @nodoc

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

  @override
  String toString() {
    return 'DocShareEvent.shareText()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() shareMarkdown,
    required TResult Function() shareText,
    required TResult Function() shareLink,
  }) {
    return shareText();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? shareMarkdown,
    TResult Function()? shareText,
    TResult Function()? shareLink,
  }) {
    return shareText?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? shareMarkdown,
    TResult Function()? shareText,
    TResult Function()? shareLink,
    required TResult orElse(),
  }) {
    if (shareText != null) {
      return shareText();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(ShareMarkdown value) shareMarkdown,
    required TResult Function(ShareText value) shareText,
    required TResult Function(ShareLink value) shareLink,
  }) {
    return shareText(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(ShareMarkdown value)? shareMarkdown,
    TResult Function(ShareText value)? shareText,
    TResult Function(ShareLink value)? shareLink,
  }) {
    return shareText?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(ShareMarkdown value)? shareMarkdown,
    TResult Function(ShareText value)? shareText,
    TResult Function(ShareLink value)? shareLink,
    required TResult orElse(),
  }) {
    if (shareText != null) {
      return shareText(this);
    }
    return orElse();
  }
}

abstract class ShareText implements DocShareEvent {
  const factory ShareText() = _$ShareText;
}

/// @nodoc
abstract class $ShareLinkCopyWith<$Res> {
  factory $ShareLinkCopyWith(ShareLink value, $Res Function(ShareLink) then) =
      _$ShareLinkCopyWithImpl<$Res>;
}

/// @nodoc
class _$ShareLinkCopyWithImpl<$Res> extends _$DocShareEventCopyWithImpl<$Res>
    implements $ShareLinkCopyWith<$Res> {
  _$ShareLinkCopyWithImpl(ShareLink _value, $Res Function(ShareLink) _then)
      : super(_value, (v) => _then(v as ShareLink));

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

/// @nodoc

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

  @override
  String toString() {
    return 'DocShareEvent.shareLink()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() shareMarkdown,
    required TResult Function() shareText,
    required TResult Function() shareLink,
  }) {
    return shareLink();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult Function()? shareMarkdown,
    TResult Function()? shareText,
    TResult Function()? shareLink,
  }) {
    return shareLink?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? shareMarkdown,
    TResult Function()? shareText,
    TResult Function()? shareLink,
    required TResult orElse(),
  }) {
    if (shareLink != null) {
      return shareLink();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(ShareMarkdown value) shareMarkdown,
    required TResult Function(ShareText value) shareText,
    required TResult Function(ShareLink value) shareLink,
  }) {
    return shareLink(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult Function(ShareMarkdown value)? shareMarkdown,
    TResult Function(ShareText value)? shareText,
    TResult Function(ShareLink value)? shareLink,
  }) {
    return shareLink?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(ShareMarkdown value)? shareMarkdown,
    TResult Function(ShareText value)? shareText,
    TResult Function(ShareLink value)? shareLink,
    required TResult orElse(),
  }) {
    if (shareLink != null) {
      return shareLink(this);
    }
    return orElse();
  }
}

abstract class ShareLink implements DocShareEvent {
  const factory ShareLink() = _$ShareLink;
}

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

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

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

  _Finish finish(Either<ExportData, WorkspaceError> successOrFail) {
    return _Finish(
      successOrFail,
    );
  }
}

/// @nodoc
const $DocShareState = _$DocShareStateTearOff();

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

/// @nodoc
abstract class $DocShareStateCopyWith<$Res> {
  factory $DocShareStateCopyWith(
          DocShareState value, $Res Function(DocShareState) then) =
      _$DocShareStateCopyWithImpl<$Res>;
}

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

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

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

/// @nodoc
class __$InitialCopyWithImpl<$Res> extends _$DocShareStateCopyWithImpl<$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 'DocShareState.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() loading,
    required TResult Function(Either<ExportData, WorkspaceError> successOrFail)
        finish,
  }) {
    return initial();
  }

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

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(Either<ExportData, WorkspaceError> successOrFail)? finish,
    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(_Loading value) loading,
    required TResult Function(_Finish value) finish,
  }) {
    return initial(this);
  }

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

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

abstract class _Initial implements DocShareState {
  const factory _Initial() = _$_Initial;
}

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

/// @nodoc
class __$LoadingCopyWithImpl<$Res> extends _$DocShareStateCopyWithImpl<$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 'DocShareState.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() initial,
    required TResult Function() loading,
    required TResult Function(Either<ExportData, WorkspaceError> successOrFail)
        finish,
  }) {
    return loading();
  }

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

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

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

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

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    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 DocShareState {
  const factory _Loading() = _$_Loading;
}

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

/// @nodoc
class __$FinishCopyWithImpl<$Res> extends _$DocShareStateCopyWithImpl<$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<ExportData, WorkspaceError>,
    ));
  }
}

/// @nodoc

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

  @override
  final Either<ExportData, WorkspaceError> successOrFail;

  @override
  String toString() {
    return 'DocShareState.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() initial,
    required TResult Function() loading,
    required TResult Function(Either<ExportData, WorkspaceError> successOrFail)
        finish,
  }) {
    return finish(successOrFail);
  }

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

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

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

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

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    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 DocShareState {
  const factory _Finish(Either<ExportData, WorkspaceError> successOrFail) =
      _$_Finish;

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