import request from "../../common/request"
import { FLOW_PATH as prefix } from "../AppPath";

export default {
	submitStartFormData: function (inputForm) {
		return request({
			url: prefix + "/flowable/form/submitStartFormData",
			method: "post",
			header: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' },
			data: inputForm,
		});
	},

	submitTaskFormData: function (inputForm) {
		return request({
			url: prefix + "/flowable/form/submitTaskFormData",
			method: "post",
			header: { 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' },
			data: inputForm,
		});
	},

	getStartFormData: function (params) {
		return request({
			url: prefix + "/flowable/form/getStartFormData",
			method: "get",
			params: params,
		});
	},
	getHistoryTaskFormData: function (params) {
		return request({
			url: prefix + "/flowable/form/getHistoryTaskFormData",
			method: "get",
			params: params,
		});
	},

	getTaskFormData: function (params) {
		return request({
			url: prefix + "/flowable/form/getTaskFormData",
			method: "get",
			params: params,
		});
	},
  
  getMobileForm: function (formDefinitionJsonId) {
    return request({
      url: prefix + '/flowable/form/getMobileForm',
      method: 'get',
      params: {formDefinitionJsonId: formDefinitionJsonId}
    })
  }
}
