import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 主题风格信息 */
export interface KeyboardThemeStyles {
          id: number; // 主键 Id
          styleName: string; // 风格名称
          createdAt: string | Dayjs; // 创建时间
          updatedAt: string | Dayjs; // 更新时间
  }

// 主题风格 API
export const KeyboardThemeStylesApi = {
  // 查询主题风格分页
  getKeyboardThemeStylesPage: async (params: any) => {
    return await request.get({ url: `/keyboard-server/keyboard-theme-styles/page`, params })
  },

  // 查询主题风格详情
  getKeyboardThemeStyles: async (id: number) => {
    return await request.get({ url: `/keyboard-server/keyboard-theme-styles/get?id=` + id })
  },

  // 新增主题风格
  createKeyboardThemeStyles: async (data: KeyboardThemeStyles) => {
    return await request.post({ url: `/keyboard-server/keyboard-theme-styles/create`, data })
  },

  // 修改主题风格
  updateKeyboardThemeStyles: async (data: KeyboardThemeStyles) => {
    return await request.put({ url: `/keyboard-server/keyboard-theme-styles/update`, data })
  },

  // 删除主题风格
  deleteKeyboardThemeStyles: async (id: number) => {
    return await request.delete({ url: `/keyboard-server/keyboard-theme-styles/delete?id=` + id })
  },

  /** 批量删除主题风格 */
  deleteKeyboardThemeStylesList: async (ids: number[]) => {
    return await request.delete({ url: `/keyboard-server/keyboard-theme-styles/delete-list?ids=${ids.join(',')}` })
  },

  // 导出主题风格 Excel
  exportKeyboardThemeStyles: async (params) => {
    return await request.download({ url: `/keyboard-server/keyboard-theme-styles/export-excel`, params })
  }
}