package it.integry.integrywmsnative.gest.ultime_consegne_cliente;

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.ultime_consegne_cliente.rest.UltimeConsegneClienteRESTConsumer;

@Module(subcomponents = UltimeConsegneClienteComponent.class)
public class UltimeConsegneClienteModule {

    @Singleton
    @Provides
    UltimeConsegneClienteRESTConsumer providesUltimeConsegneClienteRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
        return new UltimeConsegneClienteRESTConsumer(systemRESTConsumer);
    }

    @Provides
    UltimeConsegneClienteViewModel providesUltimeConsegneClienteViewModel(
            UltimeConsegneClienteRESTConsumer ultimeConsegneClienteRESTConsumer,
            BarcodeRESTConsumer barcodeRESTConsumer,
            ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
        return new UltimeConsegneClienteViewModel(ultimeConsegneClienteRESTConsumer, barcodeRESTConsumer, colliMagazzinoRESTConsumer);
    }

}
