// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'general_settings.dart';

// **************************************************************************
// CopyWithGenerator
// **************************************************************************

abstract class _$GeneralSettingsCWProxy {
  GeneralSettings themeMode(ThemeMode themeMode);

  GeneralSettings enableReadability(bool enableReadability);

  GeneralSettings enforceReadability(bool enforceReadability);

  GeneralSettings deleteBrowsingDataOnQuit(
    Set<DeleteBrowsingDataType>? deleteBrowsingDataOnQuit,
  );

  GeneralSettings defaultSearchProvider(BangKey? defaultSearchProvider);

  GeneralSettings defaultSearchSuggestionsProvider(
    SearchSuggestionProviders defaultSearchSuggestionsProvider,
  );

  GeneralSettings createChildTabsOption(bool createChildTabsOption);

  GeneralSettings showExtensionShortcut(bool showExtensionShortcut);

  GeneralSettings enableLocalAiFeatures(bool enableLocalAiFeatures);

  GeneralSettings defaultCreateTabType(TabType defaultCreateTabType);

  GeneralSettings tabIntentOpenSetting(
    TabIntentOpenSetting tabIntentOpenSetting,
  );

  GeneralSettings autoHideTabBar(bool autoHideTabBar);

  GeneralSettings tabBarSwipeAction(TabBarSwipeAction tabBarSwipeAction);

  GeneralSettings historyAutoCleanInterval(Duration historyAutoCleanInterval);

  GeneralSettings tabViewBottomSheet(bool tabViewBottomSheet);

  GeneralSettings tabBarReaderView(bool tabBarReaderView);

  /// Creates a new instance with the provided field values.
  /// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `GeneralSettings(...).copyWith.fieldName(value)`.
  ///
  /// Example:
  /// ```dart
  /// GeneralSettings(...).copyWith(id: 12, name: "My name")
  /// ```
  GeneralSettings call({
    ThemeMode themeMode,
    bool enableReadability,
    bool enforceReadability,
    Set<DeleteBrowsingDataType>? deleteBrowsingDataOnQuit,
    BangKey? defaultSearchProvider,
    SearchSuggestionProviders defaultSearchSuggestionsProvider,
    bool createChildTabsOption,
    bool showExtensionShortcut,
    bool enableLocalAiFeatures,
    TabType defaultCreateTabType,
    TabIntentOpenSetting tabIntentOpenSetting,
    bool autoHideTabBar,
    TabBarSwipeAction tabBarSwipeAction,
    Duration historyAutoCleanInterval,
    bool tabViewBottomSheet,
    bool tabBarReaderView,
  });
}

/// Callable proxy for `copyWith` functionality.
/// Use as `instanceOfGeneralSettings.copyWith(...)` or call `instanceOfGeneralSettings.copyWith.fieldName(value)` for a single field.
class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
  const _$GeneralSettingsCWProxyImpl(this._value);

  final GeneralSettings _value;

  @override
  GeneralSettings themeMode(ThemeMode themeMode) => call(themeMode: themeMode);

  @override
  GeneralSettings enableReadability(bool enableReadability) =>
      call(enableReadability: enableReadability);

  @override
  GeneralSettings enforceReadability(bool enforceReadability) =>
      call(enforceReadability: enforceReadability);

  @override
  GeneralSettings deleteBrowsingDataOnQuit(
    Set<DeleteBrowsingDataType>? deleteBrowsingDataOnQuit,
  ) => call(deleteBrowsingDataOnQuit: deleteBrowsingDataOnQuit);

  @override
  GeneralSettings defaultSearchProvider(BangKey? defaultSearchProvider) =>
      call(defaultSearchProvider: defaultSearchProvider);

  @override
  GeneralSettings defaultSearchSuggestionsProvider(
    SearchSuggestionProviders defaultSearchSuggestionsProvider,
  ) => call(defaultSearchSuggestionsProvider: defaultSearchSuggestionsProvider);

  @override
  GeneralSettings createChildTabsOption(bool createChildTabsOption) =>
      call(createChildTabsOption: createChildTabsOption);

  @override
  GeneralSettings showExtensionShortcut(bool showExtensionShortcut) =>
      call(showExtensionShortcut: showExtensionShortcut);

  @override
  GeneralSettings enableLocalAiFeatures(bool enableLocalAiFeatures) =>
      call(enableLocalAiFeatures: enableLocalAiFeatures);

  @override
  GeneralSettings defaultCreateTabType(TabType defaultCreateTabType) =>
      call(defaultCreateTabType: defaultCreateTabType);

  @override
  GeneralSettings tabIntentOpenSetting(
    TabIntentOpenSetting tabIntentOpenSetting,
  ) => call(tabIntentOpenSetting: tabIntentOpenSetting);

  @override
  GeneralSettings autoHideTabBar(bool autoHideTabBar) =>
      call(autoHideTabBar: autoHideTabBar);

  @override
  GeneralSettings tabBarSwipeAction(TabBarSwipeAction tabBarSwipeAction) =>
      call(tabBarSwipeAction: tabBarSwipeAction);

  @override
  GeneralSettings historyAutoCleanInterval(Duration historyAutoCleanInterval) =>
      call(historyAutoCleanInterval: historyAutoCleanInterval);

  @override
  GeneralSettings tabViewBottomSheet(bool tabViewBottomSheet) =>
      call(tabViewBottomSheet: tabViewBottomSheet);

  @override
  GeneralSettings tabBarReaderView(bool tabBarReaderView) =>
      call(tabBarReaderView: tabBarReaderView);

  @override
  /// Creates a new instance with the provided field values.
  /// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `GeneralSettings(...).copyWith.fieldName(value)`.
  ///
  /// Example:
  /// ```dart
  /// GeneralSettings(...).copyWith(id: 12, name: "My name")
  /// ```
  GeneralSettings call({
    Object? themeMode = const $CopyWithPlaceholder(),
    Object? enableReadability = const $CopyWithPlaceholder(),
    Object? enforceReadability = const $CopyWithPlaceholder(),
    Object? deleteBrowsingDataOnQuit = const $CopyWithPlaceholder(),
    Object? defaultSearchProvider = const $CopyWithPlaceholder(),
    Object? defaultSearchSuggestionsProvider = const $CopyWithPlaceholder(),
    Object? createChildTabsOption = const $CopyWithPlaceholder(),
    Object? showExtensionShortcut = const $CopyWithPlaceholder(),
    Object? enableLocalAiFeatures = const $CopyWithPlaceholder(),
    Object? defaultCreateTabType = const $CopyWithPlaceholder(),
    Object? tabIntentOpenSetting = const $CopyWithPlaceholder(),
    Object? autoHideTabBar = const $CopyWithPlaceholder(),
    Object? tabBarSwipeAction = const $CopyWithPlaceholder(),
    Object? historyAutoCleanInterval = const $CopyWithPlaceholder(),
    Object? tabViewBottomSheet = const $CopyWithPlaceholder(),
    Object? tabBarReaderView = const $CopyWithPlaceholder(),
  }) {
    return GeneralSettings(
      themeMode: themeMode == const $CopyWithPlaceholder() || themeMode == null
          ? _value.themeMode
          // ignore: cast_nullable_to_non_nullable
          : themeMode as ThemeMode,
      enableReadability:
          enableReadability == const $CopyWithPlaceholder() ||
              enableReadability == null
          ? _value.enableReadability
          // ignore: cast_nullable_to_non_nullable
          : enableReadability as bool,
      enforceReadability:
          enforceReadability == const $CopyWithPlaceholder() ||
              enforceReadability == null
          ? _value.enforceReadability
          // ignore: cast_nullable_to_non_nullable
          : enforceReadability as bool,
      deleteBrowsingDataOnQuit:
          deleteBrowsingDataOnQuit == const $CopyWithPlaceholder()
          ? _value.deleteBrowsingDataOnQuit
          // ignore: cast_nullable_to_non_nullable
          : deleteBrowsingDataOnQuit as Set<DeleteBrowsingDataType>?,
      defaultSearchProvider:
          defaultSearchProvider == const $CopyWithPlaceholder()
          ? _value.defaultSearchProvider
          // ignore: cast_nullable_to_non_nullable
          : defaultSearchProvider as BangKey?,
      defaultSearchSuggestionsProvider:
          defaultSearchSuggestionsProvider == const $CopyWithPlaceholder() ||
              defaultSearchSuggestionsProvider == null
          ? _value.defaultSearchSuggestionsProvider
          // ignore: cast_nullable_to_non_nullable
          : defaultSearchSuggestionsProvider as SearchSuggestionProviders,
      createChildTabsOption:
          createChildTabsOption == const $CopyWithPlaceholder() ||
              createChildTabsOption == null
          ? _value.createChildTabsOption
          // ignore: cast_nullable_to_non_nullable
          : createChildTabsOption as bool,
      showExtensionShortcut:
          showExtensionShortcut == const $CopyWithPlaceholder() ||
              showExtensionShortcut == null
          ? _value.showExtensionShortcut
          // ignore: cast_nullable_to_non_nullable
          : showExtensionShortcut as bool,
      enableLocalAiFeatures:
          enableLocalAiFeatures == const $CopyWithPlaceholder() ||
              enableLocalAiFeatures == null
          ? _value.enableLocalAiFeatures
          // ignore: cast_nullable_to_non_nullable
          : enableLocalAiFeatures as bool,
      defaultCreateTabType:
          defaultCreateTabType == const $CopyWithPlaceholder() ||
              defaultCreateTabType == null
          ? _value.defaultCreateTabType
          // ignore: cast_nullable_to_non_nullable
          : defaultCreateTabType as TabType,
      tabIntentOpenSetting:
          tabIntentOpenSetting == const $CopyWithPlaceholder() ||
              tabIntentOpenSetting == null
          ? _value.tabIntentOpenSetting
          // ignore: cast_nullable_to_non_nullable
          : tabIntentOpenSetting as TabIntentOpenSetting,
      autoHideTabBar:
          autoHideTabBar == const $CopyWithPlaceholder() ||
              autoHideTabBar == null
          ? _value.autoHideTabBar
          // ignore: cast_nullable_to_non_nullable
          : autoHideTabBar as bool,
      tabBarSwipeAction:
          tabBarSwipeAction == const $CopyWithPlaceholder() ||
              tabBarSwipeAction == null
          ? _value.tabBarSwipeAction
          // ignore: cast_nullable_to_non_nullable
          : tabBarSwipeAction as TabBarSwipeAction,
      historyAutoCleanInterval:
          historyAutoCleanInterval == const $CopyWithPlaceholder() ||
              historyAutoCleanInterval == null
          ? _value.historyAutoCleanInterval
          // ignore: cast_nullable_to_non_nullable
          : historyAutoCleanInterval as Duration,
      tabViewBottomSheet:
          tabViewBottomSheet == const $CopyWithPlaceholder() ||
              tabViewBottomSheet == null
          ? _value.tabViewBottomSheet
          // ignore: cast_nullable_to_non_nullable
          : tabViewBottomSheet as bool,
      tabBarReaderView:
          tabBarReaderView == const $CopyWithPlaceholder() ||
              tabBarReaderView == null
          ? _value.tabBarReaderView
          // ignore: cast_nullable_to_non_nullable
          : tabBarReaderView as bool,
    );
  }
}

extension $GeneralSettingsCopyWith on GeneralSettings {
  /// Returns a callable class used to build a new instance with modified fields.
  /// Example: `instanceOfGeneralSettings.copyWith(...)` or `instanceOfGeneralSettings.copyWith.fieldName(...)`.
  // ignore: library_private_types_in_public_api
  _$GeneralSettingsCWProxy get copyWith => _$GeneralSettingsCWProxyImpl(this);
}

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

GeneralSettings _$GeneralSettingsFromJson(Map<String, dynamic> json) =>
    GeneralSettings.withDefaults(
      themeMode: $enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']),
      enableReadability: json['enableReadability'] as bool?,
      enforceReadability: json['enforceReadability'] as bool?,
      deleteBrowsingDataOnQuit:
          (json['deleteBrowsingDataOnQuit'] as List<dynamic>?)
              ?.map((e) => $enumDecode(_$DeleteBrowsingDataTypeEnumMap, e))
              .toSet(),
      defaultSearchProvider: const BangKeyConverter().fromJson(
        json['defaultSearchProvider'] as String?,
      ),
      defaultSearchSuggestionsProvider: $enumDecodeNullable(
        _$SearchSuggestionProvidersEnumMap,
        json['defaultSearchSuggestionsProvider'],
      ),
      createChildTabsOption: json['createChildTabsOption'] as bool?,
      showExtensionShortcut: json['showExtensionShortcut'] as bool?,
      enableLocalAiFeatures: json['enableLocalAiFeatures'] as bool?,
      defaultCreateTabType: $enumDecodeNullable(
        _$TabTypeEnumMap,
        json['defaultCreateTabType'],
      ),
      tabIntentOpenSetting: $enumDecodeNullable(
        _$TabIntentOpenSettingEnumMap,
        json['tabIntentOpenSetting'],
      ),
      autoHideTabBar: json['autoHideTabBar'] as bool?,
      tabBarSwipeAction: $enumDecodeNullable(
        _$TabBarSwipeActionEnumMap,
        json['tabBarSwipeAction'],
      ),
      historyAutoCleanInterval: json['historyAutoCleanInterval'] == null
          ? null
          : Duration(
              microseconds: (json['historyAutoCleanInterval'] as num).toInt(),
            ),
      tabViewBottomSheet: json['tabViewBottomSheet'] as bool?,
      tabBarReaderView: json['tabBarReaderView'] as bool?,
    );

Map<String, dynamic> _$GeneralSettingsToJson(
  GeneralSettings instance,
) => <String, dynamic>{
  'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
  'enableReadability': instance.enableReadability,
  'enforceReadability': instance.enforceReadability,
  'deleteBrowsingDataOnQuit': instance.deleteBrowsingDataOnQuit
      ?.map((e) => _$DeleteBrowsingDataTypeEnumMap[e]!)
      .toList(),
  'defaultSearchProvider': const BangKeyConverter().toJson(
    instance.defaultSearchProvider,
  ),
  'defaultSearchSuggestionsProvider':
      _$SearchSuggestionProvidersEnumMap[instance
          .defaultSearchSuggestionsProvider]!,
  'createChildTabsOption': instance.createChildTabsOption,
  'showExtensionShortcut': instance.showExtensionShortcut,
  'enableLocalAiFeatures': instance.enableLocalAiFeatures,
  'defaultCreateTabType': _$TabTypeEnumMap[instance.defaultCreateTabType]!,
  'tabIntentOpenSetting':
      _$TabIntentOpenSettingEnumMap[instance.tabIntentOpenSetting]!,
  'autoHideTabBar': instance.autoHideTabBar,
  'tabBarSwipeAction': _$TabBarSwipeActionEnumMap[instance.tabBarSwipeAction]!,
  'historyAutoCleanInterval': instance.historyAutoCleanInterval.inMicroseconds,
  'tabViewBottomSheet': instance.tabViewBottomSheet,
  'tabBarReaderView': instance.tabBarReaderView,
};

const _$ThemeModeEnumMap = {
  ThemeMode.system: 'system',
  ThemeMode.light: 'light',
  ThemeMode.dark: 'dark',
};

const _$DeleteBrowsingDataTypeEnumMap = {
  DeleteBrowsingDataType.tabs: 'tabs',
  DeleteBrowsingDataType.history: 'history',
  DeleteBrowsingDataType.cookies: 'cookies',
  DeleteBrowsingDataType.cache: 'cache',
  DeleteBrowsingDataType.permissions: 'permissions',
  DeleteBrowsingDataType.downloads: 'downloads',
};

const _$SearchSuggestionProvidersEnumMap = {
  SearchSuggestionProviders.none: 'none',
  SearchSuggestionProviders.brave: 'brave',
  SearchSuggestionProviders.ddg: 'ddg',
  SearchSuggestionProviders.kagi: 'kagi',
  SearchSuggestionProviders.qwant: 'qwant',
};

const _$TabTypeEnumMap = {
  TabType.regular: 'regular',
  TabType.private: 'private',
  TabType.child: 'child',
};

const _$TabIntentOpenSettingEnumMap = {
  TabIntentOpenSetting.regular: 'regular',
  TabIntentOpenSetting.private: 'private',
  TabIntentOpenSetting.ask: 'ask',
};

const _$TabBarSwipeActionEnumMap = {
  TabBarSwipeAction.switchLastOpened: 'switchLastOpened',
  TabBarSwipeAction.navigateOrderedTabs: 'navigateOrderedTabs',
};
