nre_ad_boards:
  namespace: "Organisms/TM - LDB"
  use: "@organisms/tm-ldb/nre-ad.twig"
  label: "LDB Tables"
  description: "Arrivals Departures component"
  libraries:
    - nre_ad_lib:
        css:
          component:
            ../styles/nre-ad.css: { weight: 10 }

  fields:

    departure_data:
      type: object
      label: Departures data
      preview:
        deps_1:
          serviceID: "deps_1"
          platform: "-"
          destination: "Great Yarmouth"
          departs: "17:00"
          expected: "On time"
          origin: "Norwich"
          arrives: false
          operator: "Northern"
          details:
            - text: "Great Yarmouth - Departing on time at 06:58"
            - text: "Acle - Arriving on time at 07:09"
            - text: "Brundall - Arriving on time at 07:21"
            - text: "Brundall Gardens - Arriving on time at 07:24"
            - text: "Norwich - Arriving on time at 07:35"
        deps_2:
          serviceID: "deps_2"
          platform: "-"
          destination: "Great Yarmouth"
          departs: "17:00"
          arrives: false
          expected: "On time"
          origin: "Norwich"
          operator: "Northern"
          details:
            - text: "Great Yarmouth - Departing on time at 06:58"
            - text: "Acle - Arriving on time at 07:09"
            - text: "Brundall - Arriving on time at 07:21"
            - text: "Brundall Gardens - Arriving on time at 07:24"
            - text: "Norwich - Arriving on time at 07:35"

    arrival_data:
      type: object
      label: Arrivals data
      preview:
        arrs_1:
          serviceID: "arrs_1"
          platform: "2"
          destination: "Leeds"
          departs: false
          arrives: "13:05"
          expected: "On time"
          origin: "Hidben Bridge"
          operator: "Northern"
          details:
            - text: "Moston - Cancelled"
            - text: "Mills Hill - Cancelled"
            - text: "Castleton - Cancelled"
            - text: "Rochdale - Cancelled"
            - text: "Todmorden - Cancelled"
            - text: "Hebden Bridge - Departed on time at 12:50"
            - text: "Mytholmroyd - Departed at 12:55"
        arrs_2:
          serviceID: "arrs_2"
          platform: "2"
          destination: "Leeds"
          departs: false
          arrives: "13:05"
          expected: "On time"
          origin: "Hidben Bridge"
          operator: "Northern"
          details:
            - text: "Moston - Cancelled"
            - text: "Mills Hill - Cancelled"
            - text: "Castleton - Cancelled"
            - text: "Rochdale - Cancelled"
            - text: "Todmorden - Cancelled"
            - text: "Hebden Bridge - Departed on time at 12:50"
            - text: "Mytholmroyd - Departed at 12:55"

nre_ad_block:
  namespace: "Organisms/TM - LDB"
  use: "@organisms/tm-ldb/nre-ad-block.twig"
  label: "LDB Block"
  description: "Reload and auto update"

  fields:

    station:
      type: text
      label: Station
      preview: 'NRW'

    calling_at:
      type: text
      label: Calling at

    seconds:
      type: text
      label: Auto time
      preview: 10

    initial_state:
      type: text
      label: Initial state
      preview: off

    aadc:
      type: text
      label: Dummy ajax content

nre_ad_form:
  namespace: "Organisms/TM - LDB"
  use: "@organisms/tm-ldb/nre-ad-form.twig"
  label: "LDB Form (demo)"
  description: "LDB Form (demo)"

  fields:

    form:
      type: pattern
      label: Form
      preview:
        id: form-form
        settings:
          form_class: 'style-ldb'
        fields:
          children:
            id: submit-addon
            variant: textfield
            fields:
              sub_label:
                id: form-label
                fields:
                  title: 'Filter by trains calling at:'
