import { Shield, ClipboardList, DollarSign, CheckSquare } from "lucide-react";

export const columns: ColumnDefinition[] = [
  {
    key: "id",
    title: "ID",
    type: "text",
    icon: Shield,
    sortable: true,
    searchable: true,
    filterable: true,
    description: "Unique identifier for the currency",
    priority: 1,
  },
  {
    key: "name",
    title: "Name",
    type: "text",
    icon: Shield,
    sortable: true,
    searchable: true,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "Currency name",
    priority: 1,
  },
  {
    key: "symbol",
    title: "Symbol",
    type: "text",
    icon: Shield,
    sortable: true,
    searchable: true,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "Currency symbol",
    priority: 1,
  },
  {
    key: "precision",
    title: "Precision",
    type: "number",
    icon: ClipboardList,
    sortable: true,
    searchable: false,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "Decimal precision",
    expandedOnly: true,
    priority: 2,
  },
  {
    key: "price",
    title: "Price",
    type: "number",
    icon: DollarSign,
    sortable: true,
    searchable: true,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "Current market price",
    priority: 2,
  },
  {
    key: "status",
    title: "Status",
    type: "boolean",
    render: {
      type: "toggle",
      config: {
        url: "/api/admin/finance/currency/fiat/[id]/status",
        method: "PUT",
        field: "status",
        trueValue: true,
        falseValue: false,
      },
    },
    icon: CheckSquare,
    sortable: true,
    searchable: true,
    filterable: true,
    editable: false,
    usedInCreate: false,
    description: "Whether the currency is active",
    priority: 1,
  },
];
