import type { PostTypeIconName } from '../../components/posts/icons.js'

/**
 * Quick Post Type presets — curated starter templates surfaced on the
 * New Post Type screen. Picking one pre-fills the form (slug, labels,
 * icon, accent color, description) AND a tailored set of extra fields
 * that get injected into the generated `actuate.config.ts` snippet
 * after the shared base fields (title / slug / body / SEO / …).
 *
 * Presets are NOT a runtime data model — they only seed the snippet.
 * Collections stay code-defined; this just saves the developer from
 * hand-authoring common field sets.
 *
 * Only the canonical **Blog** post type ships as a built-in preset. Other
 * content types (case studies, portfolio, team, …) are available as opt-in
 * collection factories in `@actuate-media/cms-core` (`collections/presets.ts`)
 * rather than shipped here as defaults.
 */

export type PresetColor = 'purple' | 'green' | 'orange' | 'blue' | 'red' | 'pink'

export interface QuickPreset {
  key: string
  /** Gallery card label, e.g. "Case Studies". */
  label: string
  singular: string
  plural: string
  slug: string
  description: string
  color: PresetColor
  icon: PostTypeIconName
  /**
   * Field definition lines injected after the shared base fields.
   * Each entry is a complete `key: { … },` line (no leading indent —
   * the snippet generator indents them).
   */
  extraFields: string[]
}

export const POST_TYPE_PRESETS: QuickPreset[] = [
  {
    key: 'blog',
    label: 'Blog',
    singular: 'Post',
    plural: 'Posts',
    slug: 'blog',
    description: 'Long-form articles and blog posts with author, category, and tags.',
    color: 'purple',
    icon: 'newspaper',
    extraFields: [
      "author: { type: 'text', label: 'Author' },",
      "category: { type: 'text', label: 'Category' },",
      "tags: { type: 'array', label: 'Tags', fields: { value: { type: 'text', label: 'Tag' } } },",
    ],
  },
]
