package com.optix.android;

import android.app.Activity;
import android.app.Service;
import android.view.View;
import androidx.datastore.core.DataStore;
import androidx.datastore.preferences.core.Preferences;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.SavedStateHandle;
import androidx.lifecycle.ViewModel;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.gson.Gson;
import com.optix.android.ai.AiBridge;
import com.optix.android.ai.ChainParser;
import com.optix.android.ai.MockBrain;
import com.optix.android.ai.providers.AiProviderFactory;
import com.optix.android.data.local.AppDatabase;
import com.optix.android.data.local.AuditLogDao;
import com.optix.android.data.local.NodeDao;
import com.optix.android.data.local.SessionDao;
import com.optix.android.data.local.WorkflowDao;
import com.optix.android.data.repository.AuditLogRepositoryImpl;
import com.optix.android.data.repository.NodeRepositoryImpl;
import com.optix.android.data.repository.SessionRepositoryImpl;
import com.optix.android.data.repository.SettingsRepositoryImpl;
import com.optix.android.data.repository.ToolRepositoryImpl;
import com.optix.android.data.repository.WorkflowRepositoryImpl;
import com.optix.android.di.DataStoreModule_ProvideDataStoreFactory;
import com.optix.android.di.DatabaseModule_ProvideAuditLogDaoFactory;
import com.optix.android.di.DatabaseModule_ProvideDatabaseFactory;
import com.optix.android.di.DatabaseModule_ProvideNodeDaoFactory;
import com.optix.android.di.DatabaseModule_ProvideSessionDaoFactory;
import com.optix.android.di.DatabaseModule_ProvideWorkflowDaoFactory;
import com.optix.android.di.NetworkModule_ProvideGsonFactory;
import com.optix.android.di.NetworkModule_ProvideOkHttpClientFactory;
import com.optix.android.di.ToolModule_ProvideToolRegistryFactory;
import com.optix.android.domain.repository.ChainRepository;
import com.optix.android.domain.usecase.AiBridgeUseCase;
import com.optix.android.domain.usecase.BootstrapCapabilities;
import com.optix.android.domain.usecase.RunToolUseCase;
import com.optix.android.domain.usecase.SessionExporter;
import com.optix.android.domain.usecase.SessionUseCase;
import com.optix.android.tools.engine.EnvironmentManager;
import com.optix.android.tools.engine.ShellExecutor;
import com.optix.android.tools.engine.ToolExecutionEngine;
import com.optix.android.tools.registry.ToolRegistry;
import com.optix.android.ui.screens.ai.AiViewModel;
import com.optix.android.ui.screens.ai.AiViewModel_HiltModules;
import com.optix.android.ui.screens.lanmap.LanMapViewModel;
import com.optix.android.ui.screens.lanmap.LanMapViewModel_HiltModules;
import com.optix.android.ui.screens.settings.SettingsViewModel;
import com.optix.android.ui.screens.settings.SettingsViewModel_HiltModules;
import com.optix.android.util.NetworkUtils;
import dagger.hilt.android.ActivityRetainedLifecycle;
import dagger.hilt.android.ViewModelLifecycle;
import dagger.hilt.android.internal.builders.ActivityComponentBuilder;
import dagger.hilt.android.internal.builders.ActivityRetainedComponentBuilder;
import dagger.hilt.android.internal.builders.FragmentComponentBuilder;
import dagger.hilt.android.internal.builders.ServiceComponentBuilder;
import dagger.hilt.android.internal.builders.ViewComponentBuilder;
import dagger.hilt.android.internal.builders.ViewModelComponentBuilder;
import dagger.hilt.android.internal.builders.ViewWithFragmentComponentBuilder;
import dagger.hilt.android.internal.lifecycle.DefaultViewModelFactories;
import dagger.hilt.android.internal.lifecycle.DefaultViewModelFactories_InternalFactoryFactory_Factory;
import dagger.hilt.android.internal.managers.ActivityRetainedComponentManager_LifecycleModule_ProvideActivityRetainedLifecycleFactory;
import dagger.hilt.android.internal.managers.SavedStateHandleHolder;
import dagger.hilt.android.internal.modules.ApplicationContextModule;
import dagger.hilt.android.internal.modules.ApplicationContextModule_ProvideContextFactory;
import dagger.internal.DaggerGenerated;
import dagger.internal.DelegateFactory;
import dagger.internal.DoubleCheck;
import dagger.internal.IdentifierNameString;
import dagger.internal.KeepFieldType;
import dagger.internal.LazyClassKeyMap;
import dagger.internal.MapBuilder;
import dagger.internal.Preconditions;
import dagger.internal.Provider;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import javax.annotation.processing.Generated;
import okhttp3.OkHttpClient;

@DaggerGenerated
@Generated(
    value = "dagger.internal.codegen.ComponentProcessor",
    comments = "https://dagger.dev"
)
@SuppressWarnings({
    "unchecked",
    "rawtypes",
    "KotlinInternal",
    "KotlinInternalInJava",
    "cast",
    "deprecation"
})
public final class DaggerOptixApplication_HiltComponents_SingletonC {
  private DaggerOptixApplication_HiltComponents_SingletonC() {
  }

  public static Builder builder() {
    return new Builder();
  }

  public static final class Builder {
    private ApplicationContextModule applicationContextModule;

    private Builder() {
    }

    public Builder applicationContextModule(ApplicationContextModule applicationContextModule) {
      this.applicationContextModule = Preconditions.checkNotNull(applicationContextModule);
      return this;
    }

    public OptixApplication_HiltComponents.SingletonC build() {
      Preconditions.checkBuilderRequirement(applicationContextModule, ApplicationContextModule.class);
      return new SingletonCImpl(applicationContextModule);
    }
  }

  private static final class ActivityRetainedCBuilder implements OptixApplication_HiltComponents.ActivityRetainedC.Builder {
    private final SingletonCImpl singletonCImpl;

    private SavedStateHandleHolder savedStateHandleHolder;

    private ActivityRetainedCBuilder(SingletonCImpl singletonCImpl) {
      this.singletonCImpl = singletonCImpl;
    }

    @Override
    public ActivityRetainedCBuilder savedStateHandleHolder(
        SavedStateHandleHolder savedStateHandleHolder) {
      this.savedStateHandleHolder = Preconditions.checkNotNull(savedStateHandleHolder);
      return this;
    }

    @Override
    public OptixApplication_HiltComponents.ActivityRetainedC build() {
      Preconditions.checkBuilderRequirement(savedStateHandleHolder, SavedStateHandleHolder.class);
      return new ActivityRetainedCImpl(singletonCImpl, savedStateHandleHolder);
    }
  }

  private static final class ActivityCBuilder implements OptixApplication_HiltComponents.ActivityC.Builder {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private Activity activity;

    private ActivityCBuilder(SingletonCImpl singletonCImpl,
        ActivityRetainedCImpl activityRetainedCImpl) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;
    }

    @Override
    public ActivityCBuilder activity(Activity activity) {
      this.activity = Preconditions.checkNotNull(activity);
      return this;
    }

    @Override
    public OptixApplication_HiltComponents.ActivityC build() {
      Preconditions.checkBuilderRequirement(activity, Activity.class);
      return new ActivityCImpl(singletonCImpl, activityRetainedCImpl, activity);
    }
  }

  private static final class FragmentCBuilder implements OptixApplication_HiltComponents.FragmentC.Builder {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private final ActivityCImpl activityCImpl;

    private Fragment fragment;

    private FragmentCBuilder(SingletonCImpl singletonCImpl,
        ActivityRetainedCImpl activityRetainedCImpl, ActivityCImpl activityCImpl) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;
      this.activityCImpl = activityCImpl;
    }

    @Override
    public FragmentCBuilder fragment(Fragment fragment) {
      this.fragment = Preconditions.checkNotNull(fragment);
      return this;
    }

    @Override
    public OptixApplication_HiltComponents.FragmentC build() {
      Preconditions.checkBuilderRequirement(fragment, Fragment.class);
      return new FragmentCImpl(singletonCImpl, activityRetainedCImpl, activityCImpl, fragment);
    }
  }

  private static final class ViewWithFragmentCBuilder implements OptixApplication_HiltComponents.ViewWithFragmentC.Builder {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private final ActivityCImpl activityCImpl;

    private final FragmentCImpl fragmentCImpl;

    private View view;

    private ViewWithFragmentCBuilder(SingletonCImpl singletonCImpl,
        ActivityRetainedCImpl activityRetainedCImpl, ActivityCImpl activityCImpl,
        FragmentCImpl fragmentCImpl) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;
      this.activityCImpl = activityCImpl;
      this.fragmentCImpl = fragmentCImpl;
    }

    @Override
    public ViewWithFragmentCBuilder view(View view) {
      this.view = Preconditions.checkNotNull(view);
      return this;
    }

    @Override
    public OptixApplication_HiltComponents.ViewWithFragmentC build() {
      Preconditions.checkBuilderRequirement(view, View.class);
      return new ViewWithFragmentCImpl(singletonCImpl, activityRetainedCImpl, activityCImpl, fragmentCImpl, view);
    }
  }

  private static final class ViewCBuilder implements OptixApplication_HiltComponents.ViewC.Builder {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private final ActivityCImpl activityCImpl;

    private View view;

    private ViewCBuilder(SingletonCImpl singletonCImpl, ActivityRetainedCImpl activityRetainedCImpl,
        ActivityCImpl activityCImpl) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;
      this.activityCImpl = activityCImpl;
    }

    @Override
    public ViewCBuilder view(View view) {
      this.view = Preconditions.checkNotNull(view);
      return this;
    }

    @Override
    public OptixApplication_HiltComponents.ViewC build() {
      Preconditions.checkBuilderRequirement(view, View.class);
      return new ViewCImpl(singletonCImpl, activityRetainedCImpl, activityCImpl, view);
    }
  }

  private static final class ViewModelCBuilder implements OptixApplication_HiltComponents.ViewModelC.Builder {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private SavedStateHandle savedStateHandle;

    private ViewModelLifecycle viewModelLifecycle;

    private ViewModelCBuilder(SingletonCImpl singletonCImpl,
        ActivityRetainedCImpl activityRetainedCImpl) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;
    }

    @Override
    public ViewModelCBuilder savedStateHandle(SavedStateHandle handle) {
      this.savedStateHandle = Preconditions.checkNotNull(handle);
      return this;
    }

    @Override
    public ViewModelCBuilder viewModelLifecycle(ViewModelLifecycle viewModelLifecycle) {
      this.viewModelLifecycle = Preconditions.checkNotNull(viewModelLifecycle);
      return this;
    }

    @Override
    public OptixApplication_HiltComponents.ViewModelC build() {
      Preconditions.checkBuilderRequirement(savedStateHandle, SavedStateHandle.class);
      Preconditions.checkBuilderRequirement(viewModelLifecycle, ViewModelLifecycle.class);
      return new ViewModelCImpl(singletonCImpl, activityRetainedCImpl, savedStateHandle, viewModelLifecycle);
    }
  }

  private static final class ServiceCBuilder implements OptixApplication_HiltComponents.ServiceC.Builder {
    private final SingletonCImpl singletonCImpl;

    private Service service;

    private ServiceCBuilder(SingletonCImpl singletonCImpl) {
      this.singletonCImpl = singletonCImpl;
    }

    @Override
    public ServiceCBuilder service(Service service) {
      this.service = Preconditions.checkNotNull(service);
      return this;
    }

    @Override
    public OptixApplication_HiltComponents.ServiceC build() {
      Preconditions.checkBuilderRequirement(service, Service.class);
      return new ServiceCImpl(singletonCImpl, service);
    }
  }

  private static final class ViewWithFragmentCImpl extends OptixApplication_HiltComponents.ViewWithFragmentC {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private final ActivityCImpl activityCImpl;

    private final FragmentCImpl fragmentCImpl;

    private final ViewWithFragmentCImpl viewWithFragmentCImpl = this;

    private ViewWithFragmentCImpl(SingletonCImpl singletonCImpl,
        ActivityRetainedCImpl activityRetainedCImpl, ActivityCImpl activityCImpl,
        FragmentCImpl fragmentCImpl, View viewParam) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;
      this.activityCImpl = activityCImpl;
      this.fragmentCImpl = fragmentCImpl;


    }
  }

  private static final class FragmentCImpl extends OptixApplication_HiltComponents.FragmentC {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private final ActivityCImpl activityCImpl;

    private final FragmentCImpl fragmentCImpl = this;

    private FragmentCImpl(SingletonCImpl singletonCImpl,
        ActivityRetainedCImpl activityRetainedCImpl, ActivityCImpl activityCImpl,
        Fragment fragmentParam) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;
      this.activityCImpl = activityCImpl;


    }

    @Override
    public DefaultViewModelFactories.InternalFactoryFactory getHiltInternalFactoryFactory() {
      return activityCImpl.getHiltInternalFactoryFactory();
    }

    @Override
    public ViewWithFragmentComponentBuilder viewWithFragmentComponentBuilder() {
      return new ViewWithFragmentCBuilder(singletonCImpl, activityRetainedCImpl, activityCImpl, fragmentCImpl);
    }
  }

  private static final class ViewCImpl extends OptixApplication_HiltComponents.ViewC {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private final ActivityCImpl activityCImpl;

    private final ViewCImpl viewCImpl = this;

    private ViewCImpl(SingletonCImpl singletonCImpl, ActivityRetainedCImpl activityRetainedCImpl,
        ActivityCImpl activityCImpl, View viewParam) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;
      this.activityCImpl = activityCImpl;


    }
  }

  private static final class ActivityCImpl extends OptixApplication_HiltComponents.ActivityC {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private final ActivityCImpl activityCImpl = this;

    private ActivityCImpl(SingletonCImpl singletonCImpl,
        ActivityRetainedCImpl activityRetainedCImpl, Activity activityParam) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;


    }

    @Override
    public void injectMainActivity(MainActivity mainActivity) {
      injectMainActivity2(mainActivity);
    }

    @Override
    public DefaultViewModelFactories.InternalFactoryFactory getHiltInternalFactoryFactory() {
      return DefaultViewModelFactories_InternalFactoryFactory_Factory.newInstance(getViewModelKeys(), new ViewModelCBuilder(singletonCImpl, activityRetainedCImpl));
    }

    @Override
    public Map<Class<?>, Boolean> getViewModelKeys() {
      return LazyClassKeyMap.<Boolean>of(MapBuilder.<String, Boolean>newMapBuilder(3).put(LazyClassKeyProvider.com_optix_android_ui_screens_ai_AiViewModel, AiViewModel_HiltModules.KeyModule.provide()).put(LazyClassKeyProvider.com_optix_android_ui_screens_lanmap_LanMapViewModel, LanMapViewModel_HiltModules.KeyModule.provide()).put(LazyClassKeyProvider.com_optix_android_ui_screens_settings_SettingsViewModel, SettingsViewModel_HiltModules.KeyModule.provide()).build());
    }

    @Override
    public ViewModelComponentBuilder getViewModelComponentBuilder() {
      return new ViewModelCBuilder(singletonCImpl, activityRetainedCImpl);
    }

    @Override
    public FragmentComponentBuilder fragmentComponentBuilder() {
      return new FragmentCBuilder(singletonCImpl, activityRetainedCImpl, activityCImpl);
    }

    @Override
    public ViewComponentBuilder viewComponentBuilder() {
      return new ViewCBuilder(singletonCImpl, activityRetainedCImpl, activityCImpl);
    }

    @CanIgnoreReturnValue
    private MainActivity injectMainActivity2(MainActivity instance) {
      MainActivity_MembersInjector.injectSettingsRepository(instance, singletonCImpl.settingsRepositoryImplProvider.get());
      return instance;
    }

    @IdentifierNameString
    private static final class LazyClassKeyProvider {
      static String com_optix_android_ui_screens_settings_SettingsViewModel = "com.optix.android.ui.screens.settings.SettingsViewModel";

      static String com_optix_android_ui_screens_ai_AiViewModel = "com.optix.android.ui.screens.ai.AiViewModel";

      static String com_optix_android_ui_screens_lanmap_LanMapViewModel = "com.optix.android.ui.screens.lanmap.LanMapViewModel";

      @KeepFieldType
      SettingsViewModel com_optix_android_ui_screens_settings_SettingsViewModel2;

      @KeepFieldType
      AiViewModel com_optix_android_ui_screens_ai_AiViewModel2;

      @KeepFieldType
      LanMapViewModel com_optix_android_ui_screens_lanmap_LanMapViewModel2;
    }
  }

  private static final class ViewModelCImpl extends OptixApplication_HiltComponents.ViewModelC {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl;

    private final ViewModelCImpl viewModelCImpl = this;

    private Provider<AiViewModel> aiViewModelProvider;

    private Provider<LanMapViewModel> lanMapViewModelProvider;

    private Provider<SettingsViewModel> settingsViewModelProvider;

    private ViewModelCImpl(SingletonCImpl singletonCImpl,
        ActivityRetainedCImpl activityRetainedCImpl, SavedStateHandle savedStateHandleParam,
        ViewModelLifecycle viewModelLifecycleParam) {
      this.singletonCImpl = singletonCImpl;
      this.activityRetainedCImpl = activityRetainedCImpl;

      initialize(savedStateHandleParam, viewModelLifecycleParam);

    }

    private AiBridgeUseCase aiBridgeUseCase() {
      return new AiBridgeUseCase(singletonCImpl.aiBridgeProvider.get());
    }

    private RunToolUseCase runToolUseCase() {
      return new RunToolUseCase(singletonCImpl.toolRepositoryImplProvider.get(), singletonCImpl.auditLogRepositoryImplProvider.get(), singletonCImpl.provideToolRegistryProvider.get());
    }

    private SessionUseCase sessionUseCase() {
      return new SessionUseCase(singletonCImpl.sessionRepositoryImplProvider.get());
    }

    private SessionExporter sessionExporter() {
      return new SessionExporter(singletonCImpl.provideGsonProvider.get());
    }

    private BootstrapCapabilities bootstrapCapabilities() {
      return new BootstrapCapabilities(singletonCImpl.toolRepositoryImplProvider.get(), singletonCImpl.environmentManagerProvider.get());
    }

    @SuppressWarnings("unchecked")
    private void initialize(final SavedStateHandle savedStateHandleParam,
        final ViewModelLifecycle viewModelLifecycleParam) {
      this.aiViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 0);
      this.lanMapViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 1);
      this.settingsViewModelProvider = new SwitchingProvider<>(singletonCImpl, activityRetainedCImpl, viewModelCImpl, 2);
    }

    @Override
    public Map<Class<?>, javax.inject.Provider<ViewModel>> getHiltViewModelMap() {
      return LazyClassKeyMap.<javax.inject.Provider<ViewModel>>of(MapBuilder.<String, javax.inject.Provider<ViewModel>>newMapBuilder(3).put(LazyClassKeyProvider.com_optix_android_ui_screens_ai_AiViewModel, ((Provider) aiViewModelProvider)).put(LazyClassKeyProvider.com_optix_android_ui_screens_lanmap_LanMapViewModel, ((Provider) lanMapViewModelProvider)).put(LazyClassKeyProvider.com_optix_android_ui_screens_settings_SettingsViewModel, ((Provider) settingsViewModelProvider)).build());
    }

    @Override
    public Map<Class<?>, Object> getHiltViewModelAssistedMap() {
      return Collections.<Class<?>, Object>emptyMap();
    }

    @IdentifierNameString
    private static final class LazyClassKeyProvider {
      static String com_optix_android_ui_screens_lanmap_LanMapViewModel = "com.optix.android.ui.screens.lanmap.LanMapViewModel";

      static String com_optix_android_ui_screens_ai_AiViewModel = "com.optix.android.ui.screens.ai.AiViewModel";

      static String com_optix_android_ui_screens_settings_SettingsViewModel = "com.optix.android.ui.screens.settings.SettingsViewModel";

      @KeepFieldType
      LanMapViewModel com_optix_android_ui_screens_lanmap_LanMapViewModel2;

      @KeepFieldType
      AiViewModel com_optix_android_ui_screens_ai_AiViewModel2;

      @KeepFieldType
      SettingsViewModel com_optix_android_ui_screens_settings_SettingsViewModel2;
    }

    private static final class SwitchingProvider<T> implements Provider<T> {
      private final SingletonCImpl singletonCImpl;

      private final ActivityRetainedCImpl activityRetainedCImpl;

      private final ViewModelCImpl viewModelCImpl;

      private final int id;

      SwitchingProvider(SingletonCImpl singletonCImpl, ActivityRetainedCImpl activityRetainedCImpl,
          ViewModelCImpl viewModelCImpl, int id) {
        this.singletonCImpl = singletonCImpl;
        this.activityRetainedCImpl = activityRetainedCImpl;
        this.viewModelCImpl = viewModelCImpl;
        this.id = id;
      }

      @SuppressWarnings("unchecked")
      @Override
      public T get() {
        switch (id) {
          case 0: // com.optix.android.ui.screens.ai.AiViewModel 
          return (T) new AiViewModel(viewModelCImpl.aiBridgeUseCase(), singletonCImpl.nodeRepositoryImplProvider.get(), singletonCImpl.settingsRepositoryImplProvider.get(), singletonCImpl.chainRepositoryProvider.get());

          case 1: // com.optix.android.ui.screens.lanmap.LanMapViewModel 
          return (T) new LanMapViewModel(viewModelCImpl.runToolUseCase(), viewModelCImpl.sessionUseCase(), singletonCImpl.nodeRepositoryImplProvider.get(), singletonCImpl.toolRepositoryImplProvider.get(), singletonCImpl.settingsRepositoryImplProvider.get(), singletonCImpl.environmentManagerProvider.get(), singletonCImpl.networkUtilsProvider.get(), singletonCImpl.provideGsonProvider.get(), viewModelCImpl.sessionExporter(), singletonCImpl.workflowRepositoryImplProvider.get(), singletonCImpl.chainRepositoryProvider.get(), viewModelCImpl.bootstrapCapabilities());

          case 2: // com.optix.android.ui.screens.settings.SettingsViewModel 
          return (T) new SettingsViewModel(singletonCImpl.settingsRepositoryImplProvider.get());

          default: throw new AssertionError(id);
        }
      }
    }
  }

  private static final class ActivityRetainedCImpl extends OptixApplication_HiltComponents.ActivityRetainedC {
    private final SingletonCImpl singletonCImpl;

    private final ActivityRetainedCImpl activityRetainedCImpl = this;

    private Provider<ActivityRetainedLifecycle> provideActivityRetainedLifecycleProvider;

    private ActivityRetainedCImpl(SingletonCImpl singletonCImpl,
        SavedStateHandleHolder savedStateHandleHolderParam) {
      this.singletonCImpl = singletonCImpl;

      initialize(savedStateHandleHolderParam);

    }

    @SuppressWarnings("unchecked")
    private void initialize(final SavedStateHandleHolder savedStateHandleHolderParam) {
      this.provideActivityRetainedLifecycleProvider = DoubleCheck.provider(new SwitchingProvider<ActivityRetainedLifecycle>(singletonCImpl, activityRetainedCImpl, 0));
    }

    @Override
    public ActivityComponentBuilder activityComponentBuilder() {
      return new ActivityCBuilder(singletonCImpl, activityRetainedCImpl);
    }

    @Override
    public ActivityRetainedLifecycle getActivityRetainedLifecycle() {
      return provideActivityRetainedLifecycleProvider.get();
    }

    private static final class SwitchingProvider<T> implements Provider<T> {
      private final SingletonCImpl singletonCImpl;

      private final ActivityRetainedCImpl activityRetainedCImpl;

      private final int id;

      SwitchingProvider(SingletonCImpl singletonCImpl, ActivityRetainedCImpl activityRetainedCImpl,
          int id) {
        this.singletonCImpl = singletonCImpl;
        this.activityRetainedCImpl = activityRetainedCImpl;
        this.id = id;
      }

      @SuppressWarnings("unchecked")
      @Override
      public T get() {
        switch (id) {
          case 0: // dagger.hilt.android.ActivityRetainedLifecycle 
          return (T) ActivityRetainedComponentManager_LifecycleModule_ProvideActivityRetainedLifecycleFactory.provideActivityRetainedLifecycle();

          default: throw new AssertionError(id);
        }
      }
    }
  }

  private static final class ServiceCImpl extends OptixApplication_HiltComponents.ServiceC {
    private final SingletonCImpl singletonCImpl;

    private final ServiceCImpl serviceCImpl = this;

    private ServiceCImpl(SingletonCImpl singletonCImpl, Service serviceParam) {
      this.singletonCImpl = singletonCImpl;


    }
  }

  private static final class SingletonCImpl extends OptixApplication_HiltComponents.SingletonC {
    private final ApplicationContextModule applicationContextModule;

    private final SingletonCImpl singletonCImpl = this;

    private Provider<NetworkUtils> networkUtilsProvider;

    private Provider<OkHttpClient> provideOkHttpClientProvider;

    private Provider<MockBrain> mockBrainProvider;

    private Provider<AiProviderFactory> aiProviderFactoryProvider;

    private Provider<EnvironmentManager> environmentManagerProvider;

    private Provider<ShellExecutor> shellExecutorProvider;

    private Provider<ToolRegistry> provideToolRegistryProvider;

    private Provider<DataStore<Preferences>> provideDataStoreProvider;

    private Provider<SettingsRepositoryImpl> settingsRepositoryImplProvider;

    private Provider<ToolExecutionEngine> toolExecutionEngineProvider;

    private Provider<Gson> provideGsonProvider;

    private Provider<ChainParser> chainParserProvider;

    private Provider<AiBridge> aiBridgeProvider;

    private Provider<AppDatabase> provideDatabaseProvider;

    private Provider<NodeRepositoryImpl> nodeRepositoryImplProvider;

    private Provider<ChainRepository> chainRepositoryProvider;

    private Provider<ToolRepositoryImpl> toolRepositoryImplProvider;

    private Provider<AuditLogRepositoryImpl> auditLogRepositoryImplProvider;

    private Provider<SessionRepositoryImpl> sessionRepositoryImplProvider;

    private Provider<WorkflowRepositoryImpl> workflowRepositoryImplProvider;

    private SingletonCImpl(ApplicationContextModule applicationContextModuleParam) {
      this.applicationContextModule = applicationContextModuleParam;
      initialize(applicationContextModuleParam);

    }

    private NodeDao nodeDao() {
      return DatabaseModule_ProvideNodeDaoFactory.provideNodeDao(provideDatabaseProvider.get());
    }

    private AuditLogDao auditLogDao() {
      return DatabaseModule_ProvideAuditLogDaoFactory.provideAuditLogDao(provideDatabaseProvider.get());
    }

    private SessionDao sessionDao() {
      return DatabaseModule_ProvideSessionDaoFactory.provideSessionDao(provideDatabaseProvider.get());
    }

    private WorkflowDao workflowDao() {
      return DatabaseModule_ProvideWorkflowDaoFactory.provideWorkflowDao(provideDatabaseProvider.get());
    }

    @SuppressWarnings("unchecked")
    private void initialize(final ApplicationContextModule applicationContextModuleParam) {
      this.networkUtilsProvider = DoubleCheck.provider(new SwitchingProvider<NetworkUtils>(singletonCImpl, 1));
      this.provideOkHttpClientProvider = DoubleCheck.provider(new SwitchingProvider<OkHttpClient>(singletonCImpl, 3));
      this.mockBrainProvider = new DelegateFactory<>();
      this.aiProviderFactoryProvider = DoubleCheck.provider(new SwitchingProvider<AiProviderFactory>(singletonCImpl, 4));
      this.environmentManagerProvider = DoubleCheck.provider(new SwitchingProvider<EnvironmentManager>(singletonCImpl, 6));
      this.shellExecutorProvider = DoubleCheck.provider(new SwitchingProvider<ShellExecutor>(singletonCImpl, 5));
      this.provideToolRegistryProvider = DoubleCheck.provider(new SwitchingProvider<ToolRegistry>(singletonCImpl, 2));
      DelegateFactory.setDelegate(mockBrainProvider, DoubleCheck.provider(new SwitchingProvider<MockBrain>(singletonCImpl, 0)));
      this.provideDataStoreProvider = DoubleCheck.provider(new SwitchingProvider<DataStore<Preferences>>(singletonCImpl, 8));
      this.settingsRepositoryImplProvider = DoubleCheck.provider(new SwitchingProvider<SettingsRepositoryImpl>(singletonCImpl, 7));
      this.toolExecutionEngineProvider = DoubleCheck.provider(new SwitchingProvider<ToolExecutionEngine>(singletonCImpl, 10));
      this.provideGsonProvider = DoubleCheck.provider(new SwitchingProvider<Gson>(singletonCImpl, 12));
      this.chainParserProvider = DoubleCheck.provider(new SwitchingProvider<ChainParser>(singletonCImpl, 11));
      this.aiBridgeProvider = DoubleCheck.provider(new SwitchingProvider<AiBridge>(singletonCImpl, 9));
      this.provideDatabaseProvider = DoubleCheck.provider(new SwitchingProvider<AppDatabase>(singletonCImpl, 14));
      this.nodeRepositoryImplProvider = DoubleCheck.provider(new SwitchingProvider<NodeRepositoryImpl>(singletonCImpl, 13));
      this.chainRepositoryProvider = DoubleCheck.provider(new SwitchingProvider<ChainRepository>(singletonCImpl, 15));
      this.toolRepositoryImplProvider = DoubleCheck.provider(new SwitchingProvider<ToolRepositoryImpl>(singletonCImpl, 16));
      this.auditLogRepositoryImplProvider = DoubleCheck.provider(new SwitchingProvider<AuditLogRepositoryImpl>(singletonCImpl, 17));
      this.sessionRepositoryImplProvider = DoubleCheck.provider(new SwitchingProvider<SessionRepositoryImpl>(singletonCImpl, 18));
      this.workflowRepositoryImplProvider = DoubleCheck.provider(new SwitchingProvider<WorkflowRepositoryImpl>(singletonCImpl, 19));
    }

    @Override
    public void injectOptixApplication(OptixApplication optixApplication) {
      injectOptixApplication2(optixApplication);
    }

    @Override
    public Set<Boolean> getDisableFragmentGetContextFix() {
      return Collections.<Boolean>emptySet();
    }

    @Override
    public ActivityRetainedComponentBuilder retainedComponentBuilder() {
      return new ActivityRetainedCBuilder(singletonCImpl);
    }

    @Override
    public ServiceComponentBuilder serviceComponentBuilder() {
      return new ServiceCBuilder(singletonCImpl);
    }

    @CanIgnoreReturnValue
    private OptixApplication injectOptixApplication2(OptixApplication instance) {
      OptixApplication_MembersInjector.injectMockBrain(instance, mockBrainProvider.get());
      return instance;
    }

    private static final class SwitchingProvider<T> implements Provider<T> {
      private final SingletonCImpl singletonCImpl;

      private final int id;

      SwitchingProvider(SingletonCImpl singletonCImpl, int id) {
        this.singletonCImpl = singletonCImpl;
        this.id = id;
      }

      @SuppressWarnings("unchecked")
      @Override
      public T get() {
        switch (id) {
          case 0: // com.optix.android.ai.MockBrain 
          return (T) new MockBrain(singletonCImpl.networkUtilsProvider.get(), DoubleCheck.lazy(singletonCImpl.provideToolRegistryProvider));

          case 1: // com.optix.android.util.NetworkUtils 
          return (T) new NetworkUtils(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));

          case 2: // com.optix.android.tools.registry.ToolRegistry 
          return (T) ToolModule_ProvideToolRegistryFactory.provideToolRegistry(singletonCImpl.provideOkHttpClientProvider.get(), ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule), singletonCImpl.aiProviderFactoryProvider.get(), singletonCImpl.shellExecutorProvider.get());

          case 3: // okhttp3.OkHttpClient 
          return (T) NetworkModule_ProvideOkHttpClientFactory.provideOkHttpClient();

          case 4: // com.optix.android.ai.providers.AiProviderFactory 
          return (T) new AiProviderFactory(singletonCImpl.mockBrainProvider.get());

          case 5: // com.optix.android.tools.engine.ShellExecutor 
          return (T) new ShellExecutor(singletonCImpl.environmentManagerProvider.get());

          case 6: // com.optix.android.tools.engine.EnvironmentManager 
          return (T) new EnvironmentManager();

          case 7: // com.optix.android.data.repository.SettingsRepositoryImpl 
          return (T) new SettingsRepositoryImpl(singletonCImpl.provideDataStoreProvider.get());

          case 8: // androidx.datastore.core.DataStore<androidx.datastore.preferences.core.Preferences> 
          return (T) DataStoreModule_ProvideDataStoreFactory.provideDataStore(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));

          case 9: // com.optix.android.ai.AiBridge 
          return (T) new AiBridge(singletonCImpl.provideToolRegistryProvider.get(), singletonCImpl.toolExecutionEngineProvider.get(), singletonCImpl.aiProviderFactoryProvider.get(), singletonCImpl.chainParserProvider.get());

          case 10: // com.optix.android.tools.engine.ToolExecutionEngine 
          return (T) new ToolExecutionEngine(singletonCImpl.settingsRepositoryImplProvider.get(), singletonCImpl.shellExecutorProvider.get(), singletonCImpl.environmentManagerProvider.get());

          case 11: // com.optix.android.ai.ChainParser 
          return (T) new ChainParser(singletonCImpl.provideToolRegistryProvider.get(), singletonCImpl.provideGsonProvider.get());

          case 12: // com.google.gson.Gson 
          return (T) NetworkModule_ProvideGsonFactory.provideGson();

          case 13: // com.optix.android.data.repository.NodeRepositoryImpl 
          return (T) new NodeRepositoryImpl(singletonCImpl.nodeDao(), singletonCImpl.provideGsonProvider.get());

          case 14: // com.optix.android.data.local.AppDatabase 
          return (T) DatabaseModule_ProvideDatabaseFactory.provideDatabase(ApplicationContextModule_ProvideContextFactory.provideContext(singletonCImpl.applicationContextModule));

          case 15: // com.optix.android.domain.repository.ChainRepository 
          return (T) new ChainRepository();

          case 16: // com.optix.android.data.repository.ToolRepositoryImpl 
          return (T) new ToolRepositoryImpl(singletonCImpl.provideToolRegistryProvider.get(), singletonCImpl.toolExecutionEngineProvider.get());

          case 17: // com.optix.android.data.repository.AuditLogRepositoryImpl 
          return (T) new AuditLogRepositoryImpl(singletonCImpl.auditLogDao(), singletonCImpl.provideGsonProvider.get());

          case 18: // com.optix.android.data.repository.SessionRepositoryImpl 
          return (T) new SessionRepositoryImpl(singletonCImpl.sessionDao(), singletonCImpl.provideGsonProvider.get());

          case 19: // com.optix.android.data.repository.WorkflowRepositoryImpl 
          return (T) new WorkflowRepositoryImpl(singletonCImpl.workflowDao(), singletonCImpl.provideGsonProvider.get());

          default: throw new AssertionError(id);
        }
      }
    }
  }
}
