import type { GlobalConfig } from "payload";

export const Home: GlobalConfig = {
  slug: "home",
  access: { read: () => true },
  fields: [
    { name: "heroPrefix", type: "text", defaultValue: "01 // THE MANIFESTO" },
    { name: "heroHeadline", type: "richText" },
    { name: "heroSub", type: "textarea" },
    {
      name: "ctas",
      type: "array",
      fields: [
        { name: "label", type: "text", required: true },
        { name: "href", type: "text", required: true },
        {
          name: "style",
          type: "select",
          defaultValue: "primary",
          options: [
            { label: "Primary (neon)", value: "primary" },
            { label: "Secondary", value: "secondary" },
            { label: "Ghost", value: "ghost" },
          ],
        },
      ],
    },
    {
      name: "featuredProjects",
      type: "relationship",
      relationTo: "projects",
      hasMany: true,
    },
  ],
};
