package com.placeholder.sherpai2.di

import android.content.Context
import com.placeholder.sherpai2.ml.FaceNetModel
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

/**
 * MLModule - Provides ML-related dependencies
 *
 * This module provides FaceNetModel for dependency injection
 */
@Module
@InstallIn(SingletonComponent::class)
object MLModule {

    /**
     * Provide FaceNetModel singleton
     *
     * FaceNetModel loads the MobileFaceNet TFLite model and manages
     * face embedding generation for recognition.
     */
    @Provides
    @Singleton
    fun provideFaceNetModel(
        @ApplicationContext context: Context
    ): FaceNetModel {
        return FaceNetModel(context)
    }
}