<?php
  return [
    "type"           => "story",
    "model"          => "Story",
    "label"          => "Stories",
    "label_singular" => "Story",
    "group"          => "content",
    "order"          => TRUE,
    "template"       => FALSE,
    //  "showSlug" => true,
    "showUri"        => TRUE,
    "baseUri"        => [
      'de' => Lang::get('routes.uri_stories', [], 'de'),
      'en' => Lang::get('routes.uri_stories', [], 'en'),
      'fr' => Lang::get('routes.uri_stories', [], 'fr')
    ],
    "fields"         => [
      [
        "name"          => "title",
        "label"         => "title",
        "type"          => "textBox",
        "maxLength"     => 50,
        "multiLanguage" => TRUE,
        "preValidation" => "strip_tags|xss_clean|trim",
        "validation"    => "required|max:50",
        "inList"        => TRUE,
        "search"        => TRUE,
        "sort"          => TRUE
      ],
      [
        "name"      => "is_highlighted",
        "label"     => "Main Story?",
        "type"      => "selectBox",
        "list"      => [
          "1" => "Highlight",
          "0" => "Don't Highlight"
        ],
        "placement" => "sidebar",
        "info"      => "Choose if story is the Main Story of Homepage"
      ],
      [
        "name"          => "highlight_title",
        "label"         => "Highlight Title",
        "type"          => "textArea",
        "maxLength"     => 255,
        "multiLanguage" => TRUE,
        "preValidation" => "xss_clean|trim",
        "validation"    => "max:255",
        "parent"        => [
          "name"   => "is_highlighted",
          "values" => ["1"]
        ]
      ],
      [
        "name"          => "highlight_subtitle",
        "label"         => "Highlight Subtitle",
        "type"          => "textArea",
        "maxLength"     => 255,
        "multiLanguage" => TRUE,
        "preValidation" => "xss_clean|trim",
        "validation"    => "max:255",
        "parent"        => [
          "name"   => "is_highlighted",
          "values" => ["1"]
        ]
      ],
      [
        "name"          => "highlight_cta_text",
        "label"         => "Highlight CTA Text",
        "type"          => "textBox",
        "maxLength"     => 255,
        "multiLanguage" => TRUE,
        "preValidation" => "xss_clean|trim",
        "validation"    => "max:255",
        "parent"        => [
          "name"   => "is_highlighted",
          "values" => ["1"]
        ]
      ],
      [
        "name"        => "blocks",
        "label"       => "Blocks",
        "type"        => "singlePicker",
        "longList"    => TRUE,
        "allowInsert" => TRUE,
        "objectType"  => "block",
        "order"       => TRUE
      ],
      [
        "name"          => "meta_title",
        "label"         => "Meta Title",
        "type"          => "textBox",
        "maxLength"     => 160,
        "multiLanguage" => TRUE,
        "preValidation" => "strip_tags|xss_clean|trim",
        "validation"    => "max:160",
        "placement"     => "sidebar"
      ],
      [
        "name"          => "meta_description",
        "label"         => "Meta Description",
        "type"          => "textArea",
        "maxLength"     => 160,
        "multiLanguage" => TRUE,
        "preValidation" => "strip_tags|xss_clean|trim",
        "validation"    => "max:160",
        "placement"     => "sidebar"
      ],
      [
        "name"          => "meta_keywords",
        "label"         => "Meta Keywords",
        "type"          => "textArea",
        "maxLength"     => 255,
        "multiLanguage" => TRUE,
        "preValidation" => "strip_tags|xss_clean|trim",
        "validation"    => "max:255",
        "placement"     => "sidebar"
      ],
    ],
    "actions"        => [
      "insert", "edit", "delete", "order"
    ]
  ];
