import {
	WeaTools
} from 'ecCom'

export const getRight = (params) => {
	return WeaTools.callApi('/api/hrm/trainresource/getHasRight', 'GET', params);
}

export const getTableInfo = (params) => {
	return WeaTools.callApi('/api/hrm/trainresource/getSearchList', 'GET', params);
}

export const getButtonsMenu = (params) => {
	return WeaTools.callApi('/api/hrm/trainresource/getRightMenu', 'GET', params);
}

export const getSearchCondition = (params) => {
	return WeaTools.callApi('/api/hrm/trainresource/getSearchCondition', 'GET', params);
}

export const getEditorForm = (params) => {
	return WeaTools.callApi('/api/hrm/trainresource/getTrainResourceForm?is_multilang_set=true', 'GET', params);
}

export const add = (params) => {
	return WeaTools.callApi('/api/hrm/trainresource/add', 'POST', params);
}

export const edit = (params) => {
	return WeaTools.callApi('/api/hrm/trainresource/edit', 'POST', params);
}

export const deleteTableRows = (params) => {
	return WeaTools.callApi('/api/hrm/trainresource/delete', 'POST', params);
}