import {
  Shield,
  ClipboardList,
  DollarSign,
  ImageIcon,
  CheckSquare,
  PercentIcon,
} 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 deposit method",
    priority: 2,
    expandedOnly: true,
  },
  {
    key: "depositCompound",
    title: "Method",
    type: "compound",
    disablePrefixSort: true,
    sortable: true,
    searchable: true,
    filterable: true,
    priority: 1,
    icon: Shield,
    render: {
      type: "compound",
      config: {
        image: {
          key: "image", // Row's image URL
          fallback: "/img/placeholder.svg",
          type: "image",
          title: "Image",
          description: "Method image URL",
          editable: true,
          usedInCreate: true,
          filterable: false,
          sortable: false,
        },
        primary: {
          key: "title", // Row's display title
          title: "Title",
          description: "Display title",
          editable: true,
          usedInCreate: true,
          sortable: true,
          sortKey: "title",
        },
      },
    },
  },
  {
    key: "instructions",
    title: "Instructions",
    type: "text",
    icon: ClipboardList,
    sortable: false,
    searchable: true,
    filterable: false,
    editable: true,
    usedInCreate: true,
    description: "Payment instructions",
    expandedOnly: true,
    priority: 3,
  },
  {
    key: "fixedFee",
    title: "Fixed Fee",
    type: "number",
    icon: DollarSign,
    sortable: true,
    searchable: false,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "Fixed fee charged",
    priority: 1,
  },
  {
    key: "percentageFee",
    title: "Percentage Fee",
    type: "number",
    icon: PercentIcon,
    sortable: true,
    searchable: false,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "Percentage fee charged",
    priority: 1,
  },
  {
    key: "minAmount",
    title: "Min Amount",
    type: "number",
    icon: DollarSign,
    sortable: true,
    searchable: false,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "Minimum deposit amount",
    expandedOnly: true,
    priority: 2,
  },
  {
    key: "maxAmount",
    title: "Max Amount",
    type: "number",
    icon: DollarSign,
    sortable: true,
    searchable: false,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "Maximum deposit amount",
    expandedOnly: true,
    optional: true,
    priority: 2,
  },
  {
    key: "status",
    title: "Status",
    type: "boolean",
    render: {
      type: "toggle",
      config: {
        url: "/api/admin/finance/deposit/method/[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 deposit method is active",
    priority: 1,
  },
  {
    key: "createdAt",
    title: "Created At",
    type: "date",
    icon: ClipboardList,
    sortable: true,
    searchable: true,
    filterable: true,
    description: "Creation date",
    render: { type: "date", format: "PPP" },
    expandedOnly: true,
    priority: 2,
  },
  {
    key: "customFields",
    title: "Custom Fields",
    type: "customFields",
    icon: ClipboardList,
    sortable: false,
    searchable: false,
    filterable: false,
    editable: true,
    usedInCreate: true,
    description: "Additional custom fields",
    expandedOnly: true,
    priority: 3,
  },
];
