import type { GlobalConfig } from "payload";

export const Navigation: GlobalConfig = {
  slug: "navigation",
  access: { read: () => true },
  admin: { group: "Site" },
  fields: [
    {
      name: "primary",
      type: "array",
      fields: [
        { name: "label", type: "text", required: true },
        { name: "href", type: "text", required: true },
        { name: "external", type: "checkbox", defaultValue: false },
      ],
    },
    {
      name: "socials",
      type: "array",
      fields: [
        {
          name: "platform",
          type: "select",
          required: true,
          options: [
            { label: "GitHub", value: "github" },
            { label: "LinkedIn", value: "linkedin" },
            { label: "Twitter", value: "twitter" },
            { label: "Mastodon", value: "mastodon" },
            { label: "RSS", value: "rss" },
          ],
        },
        { name: "label", type: "text" },
        { name: "href", type: "text", required: true },
      ],
    },
    {
      name: "footerStatusText",
      type: "text",
      defaultValue: "LATENCY: 42ms | CORE STATUS: NOMINAL",
    },
  ],
};
