import type { CollectionConfig } from "payload";

export const Gear: CollectionConfig = {
  slug: "gear",
  access: { read: () => true },
  admin: {
    useAsTitle: "name",
    defaultColumns: ["name", "type"],
    description: "Music / maker gear — decorative only for v0.0.x",
  },
  fields: [
    { name: "name", type: "text", required: true },
    {
      name: "type",
      type: "select",
      options: [
        { label: "Daily driver", value: "daily-driver" },
        { label: "Interface", value: "interface" },
        { label: "Monitor", value: "monitor" },
        { label: "Workbench", value: "workbench" },
      ],
    },
    { name: "notes", type: "textarea" },
    { name: "image", type: "upload", relationTo: "media" },
    {
      name: "accent",
      type: "select",
      defaultValue: "tertiary",
      options: [
        { label: "Primary", value: "primary" },
        { label: "Secondary", value: "secondary" },
        { label: "Tertiary", value: "tertiary" },
      ],
    },
  ],
};
