package it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.rest.UltimiArriviFornitoreRESTConsumer;

@Module(subcomponents = UltimiArriviFornitoreComponent.class)
public class UltimiArriviFornitoreModule {

    @Singleton
    @Provides
    UltimiArriviFornitoreRESTConsumer providesUltimiArriviFornitoreRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
        return new UltimiArriviFornitoreRESTConsumer(systemRESTConsumer);
    }

    @Provides
    UltimiArriviFornitoreViewModel providesUltimiArriviFornitoreViewModel(
            UltimiArriviFornitoreRESTConsumer ultimiArriviFornitoreRESTConsumer,
            BarcodeRESTConsumer barcodeRESTConsumer,
            ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
        return new UltimiArriviFornitoreViewModel(ultimiArriviFornitoreRESTConsumer, barcodeRESTConsumer, colliMagazzinoRESTConsumer);
    }

}
