
import LabReportActionTypes from './lab-report.action.types'


export const clearLabReportListErrorState = (data=null) => ({
    type: LabReportActionTypes.FETCH_LAB_REPORT_LIST_CLEAR_ERROR_STATE,
    payload: data
})

export const clearLabReportState = () => ({
    type: LabReportActionTypes.RESET_STATE,
    
})

//all operation starters
export const fetchLabReportListStart = (data) => ({
    type: LabReportActionTypes.FETCH_LAB_REPORT_START,
    payload: data
})


export const createLabReportStart = (data) => ({
    type: LabReportActionTypes.CREATE_LAB_REPORT_START,
    payload: data
})

// all operations callbacks
export const createLabReportSuccess = (data) => ({
    type: LabReportActionTypes.CREATE_LAB_REPORT_SUCCESS,
    payload: data
})

export const fetchLabReportListSuccess = (data) => ({
    type: LabReportActionTypes.FETCH_LAB_REPORT_SUCCESS,
    payload: data
})

export const labReportListFailure = (errMsg) => ({
    type: LabReportActionTypes.FETCH_LAB_REPORT_FAILURE,
    payload: errMsg
})
// all report download callbacks
export const downloadLabReportStart = (data) => ({
    type: LabReportActionTypes.DOWNLOAD_LAB_REPORT_START,    
    payload: data

})

export const downloadLabReportSuccess = (data) => ({
    type: LabReportActionTypes.DOWNLOAD_LAB_REPORT_SUCCESS,
    payload: data
})

export const downloadLabReportFailure = (errMsg) => ({
    type: LabReportActionTypes.DOWNLOAD_LAB_REPORT_FAILURE,
    payload: errMsg
})
// all operations callbacks end
