/*
 * Book's Story — free and open-source Material You eBook reader.
 * Copyright (C) 2024-2026 Acclorite
 * SPDX-License-Identifier: GPL-3.0-only
 */

package org.dueattendant149.bookshelf.data.di

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.dueattendant149.bookshelf.data.service.CoverImageHandlerImpl
import org.dueattendant149.bookshelf.data.service.FileProviderImpl
import org.dueattendant149.bookshelf.domain.service.CoverImageHandler
import org.dueattendant149.bookshelf.domain.service.FileProvider
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class ServiceModule {

    @Binds
    @Singleton
    abstract fun bindFileProvider(
        fileProviderImpl: FileProviderImpl
    ): FileProvider

    @Binds
    @Singleton
    abstract fun bindCoverImageHandler(
        coverImageHandlerImpl: CoverImageHandlerImpl
    ): CoverImageHandler
}