import {
	WeaTools
} from 'ecCom';

export const getGlobalSettingForm = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachSetForm', 'GET', params)
export const saveGlobalSetting = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/saveAppDetachSet', 'POST', params)
export const getAppDetachForm = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachForm?is_multilang_set=true', 'GET', params)
export const saveAppDetach = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/saveAppDetach', 'POST', params)
export const removeAppDetach = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/delAppDetach', 'POST', params)
export const getAppDetachCondition = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachCondition', 'GET', params)
export const getAppDetachList = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachList', 'POST', params)
export const getDetachDetailCondition = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachDetialCondition', 'GET', params)
export const getDetachDetail = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachDetialList', 'POST', params)
export const getAppDetachDetialForm = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/getAppDetachDetialForm', 'GET', params)
export const saveAppDetachDetial = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/saveAppDetachDetial', 'POST', params)
export const delAppDetachDetial = (params = {}) => WeaTools.callApi('/api/hrm/appdetach/delAppDetachDetial', 'POST', params)

export const initAppDetachListData = () => Promise.all([getAppDetachCondition(), getAppDetachList()])
export const initTargetListData = (params = {}) => Promise.all([getDetachDetailCondition(), getDetachDetail(params)])
export const initRangeListData = (params = {}) => Promise.all([getDetachDetailCondition(), getDetachDetail(params)])