import {
  Shield,
  ClipboardList,
  Image as ImageIcon,
  CalendarIcon,
} from "lucide-react";

export const columns: ColumnDefinition[] = [
  {
    key: "id",
    title: "ID",
    type: "text",
    icon: Shield,
    sortable: true,
    searchable: true,
    filterable: true,
    description: "Unique identifier",
    priority: 3,
    expandedOnly: true,
  },

  {
    key: "compound",
    title: "Category",
    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: "name",
          title: "Name",
          type: "text",
          sortable: true,
          searchable: true,
          filterable: true,
          editable: true,
          usedInCreate: true,
          description: "Category name",
          priority: 1,
        },
      },
    },
  },
  {
    key: "slug",
    title: "Slug",
    type: "text",
    icon: ClipboardList,
    sortable: true,
    searchable: true,
    filterable: true,
    editable: true,
    usedInCreate: true,
    description: "URL-friendly slug",
    priority: 2,
  },
  {
    key: "description",
    title: "Description",
    type: "text",
    icon: ClipboardList,
    sortable: false,
    searchable: true,
    filterable: false,
    editable: true,
    usedInCreate: true,
    description: "Category description",
    priority: 3,
    expandedOnly: true,
  },
  {
    key: "createdAt",
    title: "Created At",
    type: "date",
    icon: CalendarIcon,
    sortable: true,
    searchable: true,
    filterable: true,
    description: "Creation date",
    render: { type: "date", format: "PPP" },
    priority: 3,
  },
];
