/**
 * 工作台表单接口
 */
import { request } from '../../utils/request'
import type { FormData } from '../../types/workbench'

/**
 * 提交表单数据
 */
export const submitForm = (formData: FormData): Promise<boolean> => {
    return request<boolean>({
        url: '/api/workbench/form/submit',
        method: 'POST',
        data: formData as any as UTSJSONObject
    })
}

/**
 * 获取表单详情
 */
export const getFormDetail = (id: number): Promise<FormData> => {
    return request<FormData>({
        url: `/api/workbench/form/${id}`,
        method: 'GET'
    })
}

