{
  "slug": "work",
  "label": "Work",
  "kind": "collection",
  "fields": [
    { "name": "type", "label": "Type", "type": "select", "options": ["photography", "videography", "podcast", "music-video", "production"], "required": true },
    { "name": "title", "label": "Title", "type": "text", "required": true },
    { "name": "badge", "label": "Badge", "type": "text", "required": true },
    {
      "name": "thumbnailMediaId",
      "label": "Thumbnail upload / library",
      "type": "media",
      "accept": ["image/jpeg", "image/png", "image/webp", "image/gif"]
    },
    { "name": "thumbnailSrc", "label": "Thumbnail URL (if not uploading)", "type": "url" },
    { "name": "thumbnailAlt", "label": "Thumbnail alt", "type": "text" },
    { "name": "thumbnailWidth", "label": "Thumbnail width", "type": "number" },
    { "name": "thumbnailHeight", "label": "Thumbnail height", "type": "number" },
    {
      "name": "lightboxMediaId",
      "label": "Lightbox upload / library",
      "type": "media",
      "accept": ["image/jpeg", "image/png", "image/webp", "image/gif"]
    },
    { "name": "lightbox", "label": "Lightbox image URL (if not uploading)", "type": "url" },
    {
      "name": "videoMediaId",
      "label": "Video upload / library",
      "type": "media",
      "accept": ["video/mp4", "video/webm", "video/quicktime"]
    },
    { "name": "video", "label": "Video URL (if not uploading)", "type": "url" },
    {
      "name": "posterMediaId",
      "label": "Video poster upload / library",
      "type": "media",
      "accept": ["image/jpeg", "image/png", "image/webp", "image/gif"]
    },
    { "name": "poster", "label": "Video poster URL (if not uploading)", "type": "url" },
    { "name": "sort", "label": "Sort order", "type": "number" },
    { "name": "status", "label": "Status", "type": "select", "options": ["published", "draft"], "required": true }
  ],
  "constraints": [
    {
      "type": "exclusive",
      "fields": ["thumbnailMediaId", "thumbnailSrc"],
      "message": "Use either thumbnail upload or thumbnail URL, not both."
    },
    {
      "type": "exclusive",
      "fields": ["lightboxMediaId", "lightbox"],
      "message": "Use either lightbox upload or lightbox URL, not both."
    },
    {
      "type": "exclusive",
      "fields": ["videoMediaId", "video"],
      "message": "Use either video upload or video URL, not both."
    },
    {
      "type": "exclusive",
      "fields": ["posterMediaId", "poster"],
      "message": "Use either poster upload or poster URL, not both."
    }
  ]
}
