import createAxios from '@/utils/request'

/**
 * 查询app个人中心信息详情
 * @param id
 */
export const queryAppInfo = (type: string) => {
    let form = new FormData()
    form.append('type', type)
    return createAxios({
        url: '/cs-system-boot/appinfo/queryAppInfoByType',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: form
    })
}

/**
 * 新增app基础信息
 **/
export const addAppInfo = (data: { type: string; content: string }) => {
    return createAxios({
        url: '/cs-system-boot/appinfo/addAppInfo',
        method: 'post',
        data: data
    })
}
/**
 * 切换告警配置启用状态
 **/
export const toggleActive = (data: any) => {
    return createAxios({
        url: '/cs-system-boot/csAlarmSet/toggleActive',
        method: 'post',
        params: data
    })
}
/**
 * 切换告警配置启用状态
 **/
export const csDelete = (data: any) => {
    return createAxios({
        url: '/cs-system-boot/csAlarmSet/delete',
        method: 'post',
        params: data
    })
}
/**
 * 新增告警配置
 **/
export const add = (data: any) => {
    return createAxios({
        url: '/cs-system-boot/csAlarmSet/add',
        method: 'post',
        data: data
    })
}
/**
 * 修改告警配置
 **/
export const update = (data: any) => {
    return createAxios({
        url: '/cs-system-boot/csAlarmSet/update',
        method: 'post',
        data: data
    })
}
