import { get, postForm } from '../../http'

// 参数类型定义
interface DebugUrlParams {
  url: string
}

interface DebugPwdParams {
  password: string
}

/**
 * @description: 获取URL
 * @return {*}
 */
export const getDebugUrl = async (params?: Record<string, never>) => {
  return await get<any>('/getDebugUrl', params)
}

/**
 * @description: 保存URL
 * @param {DebugUrlParams} params
 */
export const saveDebugUrl = async (params: DebugUrlParams) => {
  return await postForm<any>('/setDebugUrl', params)
}

/**
 * @description: 获取调试密码
 * @param {Record<string, never>} params
 */
export const getDebugPwd = async (params?: Record<string, never>) => {
  return await get<any>('/getDebugPwd', params)
}

/**
 * @description: 保存调试密码
 * @param {DebugPwdParams} params
 */
export const saveDebugPwd = async (params: DebugPwdParams) => {
  return await postForm<any>('/setDebugPwd', params)
}
