package com.example.quiz.viewModel;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;

import com.example.quiz.data.model.MiseInitiale;
import com.example.quiz.data.model.PariMise;
import com.example.quiz.data.repository.PariMiseRepository;
import com.example.quiz.utils.Result;

import java.util.List;

import javax.inject.Inject;

import dagger.hilt.android.lifecycle.HiltViewModel;

@HiltViewModel
public class PariMiseViewModel extends ViewModel {

    private final PariMiseRepository pariMiseRepository;

    private LiveData<Result<List<MiseInitiale>>> pariMise;

    @Inject
    public PariMiseViewModel(PariMiseRepository pariMiseRepository) {
        this.pariMiseRepository = pariMiseRepository;
    }

    public LiveData<Result<List<MiseInitiale>>> getBetInitMise() {
        this.pariMise = pariMiseRepository.getBetInitMise();
        return this.pariMise;
    }
}
