import type { GlobalConfig } from "payload";

export const Contact: GlobalConfig = {
  slug: "contact",
  access: { read: () => true },
  admin: { group: "Site" },
  fields: [
    {
      name: "intro",
      type: "group",
      fields: [
        { name: "eyebrow", type: "text", defaultValue: "01 // DIRECT CHANNELS" },
        { name: "headline", type: "text" },
        { name: "body", type: "textarea" },
      ],
    },
    {
      name: "channels",
      type: "array",
      fields: [
        {
          name: "icon",
          type: "select",
          options: [
            { label: "Email", value: "email" },
            { label: "GitHub", value: "github" },
            { label: "LinkedIn", value: "linkedin" },
            { label: "Twitter", value: "twitter" },
            { label: "Mastodon", value: "mastodon" },
            { label: "RSS", value: "rss" },
            { label: "Phone", value: "phone" },
          ],
        },
        { name: "label", type: "text", required: true },
        { name: "value", type: "text" },
        { name: "href", type: "text" },
      ],
    },
    {
      name: "formCopy",
      type: "group",
      fields: [
        { name: "headline", type: "text" },
        { name: "description", type: "textarea" },
        { name: "submitLabel", type: "text", defaultValue: "Send signal" },
        { name: "successMessage", type: "textarea" },
      ],
    },
    {
      name: "availability",
      type: "group",
      fields: [
        { name: "statusLine", type: "text", defaultValue: "Open to collaboration" },
        { name: "note", type: "textarea" },
      ],
    },
  ],
};
