package com.sample.sample.viewmodel.factory;


import android.arch.lifecycle.ViewModelProvider;

import com.sample.sample.repository.SampleAppRepository;
import com.sample.sample.viewmodel.ViewModel;

import javax.inject.Inject;

public class ViewModelFactory implements ViewModelProvider.Factory
{
	private SampleAppRepository sampleAppRepository;

	@Inject
	public ViewModelFactory(SampleAppRepository sampleAppRepository)
	{
		this.sampleAppRepository = sampleAppRepository;
	}

	@Override
	public ViewModel create(Class modelClass)
	{
		return new ViewModel(sampleAppRepository);
	}
}
