import {
	WeaTools
} from 'ecCom';

export const getFormInfo = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetFlowForm`, 'POST', params)

export const getFormInfoByWorkflow = (params = {}) => WeaTools.callApi('/api/hrm/stateset/getFormInfo', 'POST', params)

export const getCondition = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetListSearchCondition`, 'GET', params)

export const multiRemove = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/statechange/getPermissionToAdjustList`, 'POST', params)

export const getWorkflowList = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetListSearchList`, 'POST', params)

export const saveWf = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/saveStateProcSetFlow`, 'POST', params)

export const getTab = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetTabInfo`, 'POST', params)

export const createForm = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/saveStateProcSetCreateForm`, 'POST', params)

export const getField = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetFlowWfFields`, 'POST', params)

export const saveField = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/saveStateProcSetFlowWfFields`, 'POST', params)

export const getActionSetting = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/getStateProcSetFlowWfSet`, 'POST', params)

export const saveActionSetting = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/saveStateProcSetFlowWfSet`, 'POST', params)

export const changeStatus = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/changeStateProcSetStatus`, 'POST', params)

export const removeWf = (urlParams, params = {}) => WeaTools.callApi(`/api/hrm/stateset/${urlParams}/delStateProcSet`, 'POST', params)

export const getHrmFieldTabs = (params = {}) => WeaTools.callApi(`/api/hrm/stateset/getHrmFieldTabs`, 'GET', params)

export const getHrmFieldByScope = (params = {}) => WeaTools.callApi(`/api/hrm/stateset/getHrmFieldByScope`, 'GET', params)

export const saveEntryField = (params = {}) => WeaTools.callApi(`/api/hrm/stateset/saveEntryField`, 'POST', params)

export const delEntryField = (params = {}) => WeaTools.callApi(`/api/hrm/stateset/delEntryField`, 'POST', params)

export const initModuleData = (urlParams, params) => Promise.all([getFormInfo(urlParams), getCondition(urlParams)])