package com.github.nullptroma.wallenc.app.di.modules.data

import com.github.nullptroma.wallenc.app.di.modules.app.IoDispatcher
import com.github.nullptroma.wallenc.domain.tasks.ITaskOrchestrator
import com.github.nullptroma.wallenc.task.runtime.TaskOrchestrator
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kotlinx.coroutines.CoroutineDispatcher
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object TaskModule {

    @Provides
    @Singleton
    fun provideTaskOrchestrator(
        @IoDispatcher ioDispatcher: CoroutineDispatcher,
    ): ITaskOrchestrator = TaskOrchestrator(ioDispatcher)
}
