package com.example.petstoremobile.repositories;

import androidx.lifecycle.LiveData;

import com.example.petstoremobile.api.ActivityLogApi;
import com.example.petstoremobile.dtos.ActivityLogDTO;
import com.example.petstoremobile.utils.Resource;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
public class ActivityLogRepository extends BaseRepository {
    private final ActivityLogApi activityLogApi;

    @Inject
    public ActivityLogRepository(ActivityLogApi activityLogApi) {
        super("ActivityLogRepository");
        this.activityLogApi = activityLogApi;
    }

    public LiveData<Resource<List<ActivityLogDTO>>> getActivityLogs(int limit, Long storeId, String role, String search, String startDate, String endDate) {
        return executeCall(activityLogApi.getActivityLogs(limit, storeId, role, search, startDate, endDate));
    }
}
