import { ArtColumn } from "ali-react-table";
import { getColumns, getConditionalColumns } from "@components/OrderList/columnHelpers";

export const positionColumns: ArtColumn[] = getColumns([
  "positionSymbol",
  "leverage",
  "positionAmt",
  "avgEntryPrice",
  "markPrice",
  "liquidationPrice",
  "posMargin",
  "posMarginRate",
  "unrealisedPnl",
  "positionDelivery",
  "oneKeyClose"
]);

export const openOrderColumns: ArtColumn[] = getColumns([
  "createTime",
  "positionSymbol",
  "orderType",
  "side",
  "price",
  "orderQty",
  "cumQty",
  "postOnly",
  "positionDelivery",
  "killAllOrders"
]);

export const conditionalColumns = getConditionalColumns(openOrderColumns);

export const ordersHistoryColumns = getColumns([
  "createTime",
  "symbol",
  "orderType",
  "side",
  "avgPrice",
  "price",
  "orderQty",
  "cumQty",
  "orderStatus"
]);

export const historyTradeColumns: ArtColumn[] = getColumns([
  "createTime",
  "symbol",
  "side",
  "filledPrice",
  "filledQty",
  "commission",
  "taker",
  "realProfit"
]);

export const positionClosedColumns: ArtColumn[] = getColumns([
  "createTime",
  "symbol",
  "side",
  "avgEntryPrice",
  "positionQty",
  "closingTime",
  "closeProfit",
  "marginCloseOutAmt"
]);

export const accountIncomeColumns: ArtColumn[] = getColumns(["createTime", "symbol", "incomeType", "income"]);
