// Copyright (C) 2026 Jason M. Schwefel. All Rights Reserved.
package com.coldboreballisticsllc.scopedope.di

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import com.coldboreballisticsllc.scopedope.data.ammo.AmmoRepositoryImpl
import com.coldboreballisticsllc.scopedope.data.crash.CrashReportingController
import com.coldboreballisticsllc.scopedope.data.crash.SentryCrashReporter
import com.coldboreballisticsllc.scopedope.data.printer.niimbot.NiimbotPrinterRouter
import com.coldboreballisticsllc.scopedope.data.sensor.SensorRouter
import com.coldboreballisticsllc.scopedope.domain.printer.PrinterSource
import com.coldboreballisticsllc.scopedope.domain.repository.AmmoRepository
import com.coldboreballisticsllc.scopedope.domain.sensor.WeatherSensorSource
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class RepositoryModule {
    @Binds @Singleton
    abstract fun bindAmmoRepository(impl: AmmoRepositoryImpl): AmmoRepository

    @Binds @Singleton
    abstract fun bindPrinterSource(impl: NiimbotPrinterRouter): PrinterSource

    @Binds @Singleton
    abstract fun bindWeatherSensorSource(impl: SensorRouter): WeatherSensorSource

    @Binds @Singleton
    abstract fun bindCrashReportingController(impl: SentryCrashReporter): CrashReportingController
}
