# prettier-ignore
local_backend: true
backend:
  name: git-gateway
  branch: master # Branch to update (optional; defaults to main)
  repo: nolafs/stryker
  use_graphql: true
logo_url: https://www.stryker-training-videos.com/assets/images/logo/logo.svg
# publish_mode: editorial_workflow
display_url: https://www.stryker-training-videos.com
show_preview_links: true


collections:
- name: "speciality"
  label: "Speciality"
  folder: "content/speciality"
  sortable_fields: ["title", "weight"]
  editor:
    preview: false
  create: true
  fields:
  - { label: "Layout", name: "layout", widget: "hidden", default: "speciality" }
  - { label: "Title", name: "title", widget: "string", hint: "Warning: Duplicate document if renaming is required" }
  - { label: "Published", name: "published", widget: "boolean", default: true }
  - { label: "Weight", name: "weight", widget: "number", default: 0 }
  - { lable: "Hero Images", name: images, widget: object , required: false, collapsed: true, fields: [
      { lable: "Image", name: src, widget: image , required: false },
  ]}
  - { label: "Body", name: "body", widget: "markdown" }
  - { lable: "About", name: about, widget: object , required: false, collapsed: true, fields: [
      { lable: "Image", name: image, widget: image , required: false },
      { label: "Body", name: "body", widget: "markdown" }
  ] }
  - { label: "Procedures Categories",
      name: "proceduresCategories",
      add_to_top: true,
      label_singular: "Procedure Category",
      identifier_field: 'title',
      widget: list,
      fields: [
      { label: "Title", name: "title", widget: "string" },
      { label: "Slug", name: "slug", widget: "string", pattern: ['^((?![ -]).)*$', 'Only user underscore (_)'],  hint: "Must use underscore (_) if word separation is required" },
      { label: "Body", name: "body", widget: "text" }
   ]}
  - { label: "Contacts",
      name: "contacts",
      add_to_top: true,
      label_singular: "Contact",
      identifier_field: 'title',
      widget: list,
      fields: [
        { label: "Name", name: "name", widget: "string" },
        { label: "Position", name: "position", widget: "string" },
        { label: "Email", name: "email", widget: "string" },
        { label: "Image", name: "image", widget: "image" }
      ]
    }
- name: "procedures"
  label: "Procedures"
  folder: "content/procedures"
  path: "{{speciality}}/{{procedurescategory}}/{{slug}}"
  media_folder: '/src/assets/uploads'
  public_folder: 'assets/uploads'
  sortable_fields: ["title", "publishDate", "published", "comingSoon"]
  view_groups:
  - label: Speciality
    field: speciality
  - label: Procedures Category
    field: procedurescategory
  editor:
    preview: false
  create: true
  fields:
  - { label: "Layout", name: "layout", widget: "hidden", default: "procedures" }
  - { label: "Title", name: "title", widget: "string" ,hint: "Warning: Duplicate document if renaming is required"}
  - { label: "Publish Date", name: "publishDate", widget: "datetime" }
  - { label: "Published", name: "published", widget: "boolean", default: true }
  - { label: "Coming Soon", name: "comingSoon", widget: "boolean", default: false, required: false }
  - { label: "Type", name: "video_type", widget: "select", default: 'procedure', required: true , options: ["procedure", "training"]}
  - { label: "Body", name: "body", widget: "markdown" }
  - { label: "Speciality",
      name: "speciality",
      widget: "relation",
      multiple: false,
      required: true,
      collection: "speciality",
      search_fields: [ "title" ],
      value_field: "title",
      display_fields: [ "title" ] }
  - { label: "Procedures Category",
      name: "procedurescategory",
      widget: "relation",
      multiple: false,
      required: true,
      collection: "speciality",
      search_fields: ["proceduresCategories.*.slug"],
      value_field: "proceduresCategories.*.slug",
      display_fields: [ "proceduresCategories.*.title" ] }
  - label: Case Pre-Planning & Post-Op Result
    name: case_planning
    widget: object
    collapsed: true
    required: false
    fields:
      - label: Upload Video or URL to YouTube
        name: case_planning_videos
        widget: file
        required: false
      - label: Case Pre-Planning Youtube
        name: case_planning_youtube
        widget: boolean
        default: false
        required: false
  - label: About
    name: about_procedure
    widget: object
    collapsed: false
    fields:
    - { label: "Booking de-activate",
        name: "booking_deactivate",
        widget: "boolean",
        default: true,
        required: false,
    }
    - { label: "Surgeon",
        name: "surgeon",
        widget: "relation",
        multiple: false,
        required: false,
        collection: "surgeons",
        search_fields: [ "title", "slug" ],
        value_field: "slug",
        display_fields: [ "title" ] }
    - { label: "Location", name: "location", widget: "text" , required: false}
    - { label: "Kit", name: "kit", widget: "string" }
    - { label: "Procedure Duration", name: "duration", widget: "string" }
    - { label: "Book Case Active", name: "bookActive", widget: "boolean", default: true }
    - { lable: "Feature Image", name: images, widget: object , collapsed: false, fields: [
      { lable: "Feature Image", name: image@1x, widget: image , required: false },
    ] }
    - { label: "Footer Text", name: "footerText", widget: "markdown" , required: false}
    -  label: "Layout"
       name: "layout"
       widget: "list"
       types:
        - label: "Block Procedure Ref"
          name: "block_procedure_image"
          summary: '{{fields.title}}'
          widget: "object"
          fields:
          - { label: "Block active", name: "active", widget: "boolean", default: true }
          - { label: Title, name: title, widget: string }
          - { lable: "Feature Images", name: images, widget: object , required: false, collapsed: true, fields: [
           { lable: "Image", name: image@1x, widget: image , required: false },
          ] }
          - { label: "Image Left/Right", name: "imageDirection", widget: "boolean", default: true }
          - { label: "Procedure Url",
              name: "procedure",
              widget: "string",
              multiple: false,
              required: true
          }
          - { label: "Body", name: "body", widget: "markdown" }
        - label: "Block Text & Image"
          name: "block_text_image"
          summary: '{{fields.title}}'
          widget: "object"
          fields:
          - { label: "Block active", name: "active", widget: "boolean", default: true }
          - { label: Title, name: title, widget: string }
          - { lable: "Feature Images", name: images, widget: object , required: false, collapsed: true, fields: [
              { lable: "Image", name: image@1x, widget: image , required: false },
          ]}
          - { label: "Image Left/Right", name: "imageDirection", widget: "boolean", default: true }
          - { label: "Body", name: "body", widget: "markdown" }
        - label: "Block Text Columns"
          name: "block_text_columns"
          summary: '{{fields.title}}'
          widget: "object"
          fields:
            - { label: "Block active", name: "active", widget: "boolean", default: true }
            - { label: Title, name: title, widget: string }
            - { label: "Column 1", name: "body", widget: "markdown" }
            - { label: "Column 2", name: "body2", widget: "markdown" }
        - label: "Block Text & Slider"
          name: "block_text_slider"
          summary: '{{fields.title}}'
          widget: "object"
          fields:
          - { label: "Block active", name: "active", widget: "boolean", default: true }
          - { label: Title, name: title, widget: string }
          - { label: "Image Left/Right", name: "imageDirection", widget: "boolean", default: true }
          - { label: "Body", name: "body", widget: "markdown" }
          - { label: Images, name: images, widget: list, fields: [
            { lable: "Thumb Image", name: thumbImage, widget: image , required: false },
            { lable: "Image", name: image, widget: image , required: false },
            { label: "Feature", name: "feature", widget: "text" ,required: false  }
            ]}
        - label: "Block Carousel"
          name: "block_carousel"
          summary: '{{fields.title}}'
          widget: "object"
          fields:
          - { label: "Block active", name: "active", widget: "boolean", default: true }
          - { label: Title, name: title, widget: string }
          - { label: "Body", name: "body", widget: "text" }
          - { label: Images, name: images, widget: list, summary: "{{fields.feature}}", fields: [
            { lable: "Thumb Image", name: thumbImage, widget: image , required: false },
            { lable: "Image", name: image, widget: image , required: false },
            { label: "Feature", name: "feature", widget: "text" }
          ]}
        - label: "Block List"
          name: "block_list"
          summary: '{{fields.title}}'
          widget: "object"
          fields:
          - { label: "Block active", name: "active", widget: "boolean", default: true }
          - { label: Title, name: title, widget: string }
          - { label: "Body", name: "body", widget: "markdown" }
          - { label: Labels, name: labels, widget: list, fields: [
            { label: "Feature", name: "feature", widget: "string"  },
            { lable: "Icon", name: image, widget: image , required: false }
            ]}
        - label: "Block Equipment"
          name: "block_equipment"
          summary: '{{fields.title}}'
          widget: "object"
          fields:
          - { label: "Block active", name: "active", widget: "boolean", default: true }
          - { label: Title, name: title, widget: string }
          - { label: "Body", name: "body", widget: "markdown" ,required: false }
          - { label: Equipment, name: images, widget: list, fields: [
              { label: "Title", name: "title", widget: string ,required: false },
              { lable: "Image", name: image, widget: image , required: false },
              { lable: "Video", name: video, widget: file , required: false },
              { lable: "YouTube", name: youTube, widget: string , required: false },
              { label: Brochure, name: brochure, widget: file, required: false }
          ]}
- name: "videos"
  label: "Videos"
  folder: "src/assets/content/videos"
  format: "json"
  path: "{{speciality}}/{{category}}/{{procedure}}"
  summary: "{{procedure}} - {{title}}"
  sortable_fields: ["title", "speciality", "category", "procedure", "published"]
  identifier_field: procedure
  view_groups:
    - label: Speciality
      field: speciality
    - label: Category
      field: category
  editor:
    preview: false
  create: true
  media_folder: '/src/assets/uploads'
  public_folder: 'assets/uploads'
  fields:
  - { label: "Layout", name: "layout", widget: "hidden", default: "videos" }
  - { label: "Published", name: "published", widget: "boolean", default: true }
  - { label: "Speciality",
      name: "speciality",
      widget: "relation",
      multiple: false,
      required: true,
      collection: "speciality",
      search_fields: [ "title" ],
      value_field: "title",
      display_fields: [ "title" ] }
  - { label: "Procedure Category",
      name: "category",
      widget: "relation",
      multiple: false,
      required: true,
      collection: "speciality",
      search_fields: [ "proceduresCategories.*" ],
      value_field: "proceduresCategories.*.slug",
      display_fields: [ "proceduresCategories.*.title" ] }
  - { label: "Procedure",
      name: "procedure",
      widget: "relation",
      multiple: false,
      required: true,
      collection: "procedures",
      search_fields: [ "title" ],
      value_field: "title",
      display_fields: [ "title" ] }
  - { label: "Video Playlist",
      name: "videoList",
      widget: "list",
      fields: [
        { label: "Title", name: "title", widget: "string" },
        { label: "Total Duration", name: "totalTime", widget: "string", hint: 'Format: MM.SS', default: 1 },
       # {
       #   label: Video Files,
       #   name: videos,
       #   widget: object,
       #   collapsed: true,
       #   hint: "Video served by Large File Media or Vimeo",
       #   fields: [
       #     {
       #       label: "High def 1080 (mp4, 1920x1080)",
       #       name: "video0",
       #       widget: "file",  required: true, hint: "Master: Video is required (File limit 100mb)"
       #     },
       #     { label: "High def (mp4, 1280x720)", name: "video1", widget: "file",  required: false },
       #     { label: "Standard def (mp4, 960x540)", name: "video2", widget: "file",  required: false },
       #     { label: "Standard def (mp4, 640x360)", name: "video3", widget: "file",  required: false }
       #   ]
       # },
        {
        label: Video File,
        name: video,
        widget: object,
        collapsed: true,
          hint: "Video served (automatic transformation and encoding)",
          fields: [
            { label: "High def 1080 (1920x1080)",
              name: "video",
              widget: "file",
              required: false,
              hint: "Master: Video is required (File limit 100mb)"
          },
          { label: "Adaptive Streaming", name: "streaming", widget: "hidden", default: true,  required: false, hint: "Active: Full HD, HD and SD are delivered" },
          #{ label: "High def (mp4, 1280x720)", name: "option1", widget: "boolean", default: true,  required: false, hint: "Not applicable for Adaptive Streaming" },
          #{ label: "Standard def (mp4, 960x540)", name: "option2", widget: "boolean",  required: false, hint: "Not applicable for Adaptive Streaming" },
          #{ label: "Standard def (mp4, 640x360)", name: "option3", widget: "boolean",  required: false, hint: "Not applicable for Adaptive Streaming" }
         ]
        },
        # { lable: "Poster", name: "image", widget: "image" , required: false , hint: "Override automatic generated video poster" },
        { lable: "Info", name: info, widget: object , required: false, collapsed: true, fields: [
          { label: "Title", name: "title", widget: "string" ,required: false,},
          { label: "Body", name: "body", widget: "markdown" , required: false,},
          { lable: "Images", name: images, widget: list , required: false, collapsed: true, fields: [
            { lable: "Image", name: image, widget: image , required: false}
          ]}
        ]},
        { label: Video Info points,
          name: video_cues,
          widget: object,
          collapsed: true,
          fields: [
            { label: "Cue Points", name: "cue", widget: list, required: false, fields: [
              { label: "Title", name: "title", widget: "string" ,required: false },
              { label: "Start Time", name: "start", widget: "string", default: 0.4 ,required: false },
              { label: "Duration", name: "duration", widget: "string", default: 0.4 ,required: false },
              { lable: "Thumb Image", name: thumbImage, widget: image , required: false },
              { label: "body", name: "body", widget: "text", required: false }
            ] }
          ]
        }
      ]}
- name: "surgeons"
  label: "Surgeons"
  folder: "src/assets/content/surgeons"
  slug: "{{fields.slug}}"
  editor:
    preview: false
  create: true
  format: "json"
  fields:
  - { label: "Short Name", name: "title", widget: "string" }
  - { label: "Full Name & Qualifications", name: "name", widget: "string" }
  - { label: "Job Title", name: "job", widget: "string" }
  - widget: string
    name: slug
    label: Slug
    required: true
    pattern: [ '^[a-z0-9]+(?:-[a-z0-9]+)*$','A slug can have no spaces or special characters' ]
  - { label: "Published", name: "published", widget: "boolean", default: true }
  - { lable: "Feature Images", name: images, widget: object , required: false, collapsed: true, fields: [
      { lable: "Image", name: image@1x, widget: image , required: false },
    ]}
  - { label: "Hospital", name: "hospital", widget: "text" }
  - { label: "Specialties", name: "specialties", widget: "text" }
  - { label: "Bio", name: "body", widget: "markdown" }

- name: "pages"
  label: "Pages"
  editor:
    preview: false
  files:
  - file: "content/pages/about.md"
    label: "About"
    name: "home"
    fields:
    - { label: Title, name: title, widget: string}
    - { label: "Body", name: "body", widget: "markdown" }
  - file: "content/pages/privacy.md"
    label: "Privacy Statment"
    name: "privacy"
    fields:
    - { label: Title, name: title, widget: string }
    - { label: "Body", name: "body", widget: "markdown" }
  - file: "content/pages/terms.md"
    label: "Terms & Conditions"
    name: "terms"
    fields:
    - { label: Title, name: title, widget: string }
    - { label: "Body", name: "body", widget: "markdown" }
  - file: "content/pages/cookies.md"
    label: "Cookies Disclaimer"
    name: "cookies"
    fields:
    - { label: Title, name: title, widget: string }
    - { label: "Body", name: "body", widget: "markdown" }
  - file: "content/pages/accessibility.md"
    label: "Accessibility Statement"
    name: "accessibility"
    fields:
    - { label: Title, name: title, widget: string }
    - { label: "Body", name: "body", widget: "markdown" }
  - file: "content/pages/healthcare.md"
    label: "Healthcare professional disclaimer"
    name: "healthcare"
    fields:
    - { label: Title, name: title, widget: string }
    - { label: "Body", name: "body", widget: "markdown" }

- label: "Settings"
  name: "settings"
  editor:
    preview: false
  files:
    - label: "Social Media"
      name: "socialMedia"
      file: "src/assets/settings/socialMedia.json"
      fields:
      - label: "Social Links"
        name: "links"
        widget: "list"
        fields:
        - label: "Type"
          name: "type"
          widget: string
        - label: "id"
          name: "id"
          widget: string
        - label: "url"
          name: "url"
          widget: string
    - label: "Footer Navigation"
      name: "navigation"
      file: "src/assets/settings/navigation.json"
      fields:
      - label: "Footer Navigation Item"
        name: "footerItems"
        widget: "list"
        fields:
        - { label: Name, name: name, widget: string, required: false }
        - { label: Link, name: link, widget: string, required: false }
        - { label: Active, name: active, widget: boolean, default: true, required: false }
        - { label: External Link, name: externalLink, widget: boolean, default: true, required: false }
        - { label: "Published", name: "published", widget: "hidden", default: true }

#public_folder: '/assets/uploads'
#media_folder: '/src/assets/uploads'

media_library:
  name: cloudinary
  use_transformations: false
  config:
    cloud_name: mcm-london
    api_key: 898894858126725


