import { ContentConfig } from "/@/components/PageContent";
import {
  httpAdd,
  httpDelete,
  httpStatus,
  httpList,
  httpUpdate
} from "/@/api/parameter/video";
import { renderStatus } from "/@/utils/column-helper";
import { STATUS_OPTIONS } from "/@/config/status";

const columns = [
  {
    type: "selection",
    width: 55,
    hide: ({ checkList }) => !checkList.includes("勾选列")
  },
  {
    prop: "id",
    label: "ID",
    width: "100px"
  },

  {
    prop: "video_name",
    label: "视频名称"
  },
  {
    prop: "status",
    label: "状态",
    ...renderStatus(STATUS_OPTIONS)
  },
  {
    prop: "addtime",
    label: "创建时间"
  },

  {
    label: "操作",
    fixed: "right",
    width: 160,
    slot: "operation"
  }
];
const contentConfig: ContentConfig = {
  title: "视频管理",
  columns,
  apis: {
    httpAdd,
    httpDelete,
    httpStatus,
    httpList,
    httpUpdate,
  },
  notPreview: false
};

export default contentConfig;
