import { h } from 'vue';
import { NTag } from 'naive-ui';

export const equipmentColumns = [
  {
    title: 'GID',
    key: 'id',
  },
  {
    title: '装备ID',
    key: 'equipId',
  },
  {
    title: '装备名称',
    key: 'name',
  },
  {
    title: '装备类型',
    key: 'body',
  },
  {
    title: '宝石镶嵌',
    key: 'gems',
    render(row) {
      return row.gems.map((tag) => `${tag}`).join('\n');
      /*return row.gems.map((tag) => {
        return h(
          NTag,
          {
            style: {
              marginRight: '3px',
            },
            type: 'success',
            bordered: false,
            size: 'small',
            round: true,
          },
          {
            default: () => tag,
          }
        );
      });*/
    },
  },
  {
    title: '装备品质',
    key: 'star',
  },
  {
    title: '进阶等级',
    key: 'stepLevel',
  },
  {
    title: '装备等级',
    key: 'level',
  },
  {
    title: '角色名称',
    key: 'roleName',
  },
  {
    title: '穿戴状态',
    key: 'wear',
    render(row) {
      return h(
        NTag,
        {
          style: {
            marginRight: '6px',
          },
          type: row.wear === false ? 'warning' : 'success',
          bordered: false,
        },
        {
          default: () => (row.wear === false ? '未穿戴' : '已穿戴'),
        }
      );
    },
  },
];

export interface equipmentFields {
  id: number;
  equipId: number;
  name: string;
  body: string;
  star: string;
  level: string;
  roleName: string;
  stepLevel: string;
  wear: any;
  gems: [string];
}

export const idMaps = [
  { value: 100, label: '沙漠之鹰' },
  { value: 101, label: 'AK-47' },
  { value: 102, label: '烈焰枪' },
  { value: 104, label: 'M4A1' },
  { value: 105, label: 'Kar98k' },
  { value: 106, label: '加特林' },
  { value: 201, label: '合金头盔' },
  { value: 202, label: '战术头盔' },
  { value: 203, label: '模糊面罩' },
  { value: 204, label: '稳定头盔' },
  { value: 205, label: 'K6-3型钢盔' },
  { value: 301, label: '战狼护甲' },
  { value: 302, label: '龙鳞甲' },
  { value: 303, label: '狂野护甲' },
  { value: 304, label: '多功能作战服' },
  { value: 305, label: '幽灵战甲' },
  { value: 401, label: '铁壁护符' },
  { value: 402, label: '狼牙挂坠' },
  { value: 403, label: '摸金符' },
  { value: 404, label: '阴阳勾玉' },
  { value: 405, label: '血玉吊坠' },
  { value: 501, label: '极地手套' },
  { value: 502, label: '战术手套' },
  { value: 503, label: '技巧手套' },
  { value: 504, label: '指虎拳套' },
  { value: 505, label: '作战护手' },
  { value: 601, label: '狂暴指环' },
  { value: 602, label: '杀戮指环' },
  { value: 603, label: '守心指环' },
];

export const yanYvIdMaps = [
  { value: 101, label: '雕金弓' },
  { value: 104, label: '赤火弩' },
  { value: 201, label: '四方头巾' },
  { value: 202, label: '通天冠' },
  { value: 203, label: '玉发冠' },
  { value: 301, label: '麻布衣' },
  { value: 302, label: '护心甲' },
  { value: 303, label: '青铜甲' },
  { value: 401, label: '星辰项链' },
  { value: 402, label: '玲珑玉坠' },
  { value: 403, label: '流火玉坠' },
  { value: 501, label: '青云护腕' },
  { value: 502, label: '龙纹护腕' },
  { value: 503, label: '环臂甲' },
  { value: 601, label: '龙殇' },
  { value: 602, label: '释厄' },
  { value: 603, label: '须弥' },
];

export const bodyMaps = [
  { value: 1, label: '武器' },
  { value: 2, label: '头盔' },
  { value: 3, label: '护甲' },
  { value: 4, label: '护符' },
  { value: 5, label: '手套' },
  { value: 6, label: '指环' },
];

export const starMaps = [
  { value: 1, label: '普通' },
  { value: 2, label: '精良' },
  { value: 3, label: '稀有' },
  { value: 4, label: '史诗' },
  { value: 5, label: '传说' },
  { value: 6, label: '神话' },
  { value: 7, label: '神话+1' },
  { value: 8, label: '神话+2' },
  { value: 9, label: '神话+3' },
  { value: 10, label: '鬼赐' },
  { value: 11, label: '鬼赐+1' },
  { value: 12, label: '鬼赐+2' },
  { value: 13, label: '鬼赐+3' },
  { value: 14, label: '神赐' },
  { value: 15, label: '神赐+1' },
  { value: 16, label: '神赐+2' },
];

export const starMaxLevelMaps = [
  { value: 1, label: 20 },
  { value: 2, label: 30 },
  { value: 3, label: 40 },
  { value: 4, label: 50 },
  { value: 5, label: 60 },
  { value: 6, label: 100 },
];
