journey_planner_bar:
  namespace: "Organisms/TM - Journey Planner Bar"
  use: "@organisms/tm-jpb/journey-planner-bar.twig"
  label: Journey Planner Bar
  description: Journey Planner Bar
  libraries:
    - journey_planner_bar_lib:
        js:
          ../behaviors/journey-planner-bar.js: { }
        css:
          component:
            ../styles/journey-planner-bar.css: { weight: 10 }

  fields:

    ld_search:
      label: Live departures form
      type: pattern
      preview:
        id: 'form-element'
        variant: 'textfield'
        fields:
          classes: 'form-group-inline form-group-no-pad'
          suffix: "<i class='fas fa-search'></i>"
          description_content: ""
          errors: ""
        settings:
          label_display: "invisible"

    plan_journey_form:
      label: Plan Journey
      type: pattern
      preview: false
#        id: 'plan_journey_main_form'

    check_service_form:
      label: Check service form
      type: pattern
      preview: false
#        id: 'form-element'
#        variant: 'textfield'
#        fields:
#          classes: 'form-group-inline form-group-no-pad'
#          suffix: "<i class='fas fa-search'></i>"
#          description_content: ""
#          errors: ""
#        settings:
#          label_display: "invisible"

    next_train_form:
      label: Next train form
      type: pattern
      preview: false
#        id: 'form-element'
#        variant: 'textfield'
#        fields:
#          classes: 'form-group-inline form-group-no-pad'
#          suffix: "<i class='fas fa-search'></i>"
#          description_content: ""
#          errors: ""
#        settings:
#          label_display: "invisible"

    jc_dropdown:
      label: Journey Check - Dropdown
      type: pattern
      preview:
        id: 'jc_dropdown'

    booking_form_desktop:
      label: Trainline Bookings - Desktop
      type: pattern
      preview:
        id: 'booking_form_desktop'

    booking_form_modal:
      label: Trainline Bookings - Modal
      type: pattern
      preview:
        id: 'booking_form_modal'
        settings:
          show_button: false

    menu_lower:
      label: Inline menu
      type: pattern
      preview:
        id: 'menu_il'
        fields:
          id: 'hml-menu'
          links:
            - lid: "_L"
              title: "Login"
              url: "/"
              icon: "far fa-user"
            - lid: "_f"
              title: "<span class='sr-only'>Follow us on Facebook</span>"
              url: "/"
              icon: "fab fa-facebook social-link"
            - lid: "_t"
              title: "<span class='sr-only'>Follow us on Twitter</span>"
              url: "/"
              icon: "fab fa-twitter social-link"

  settings:
    emulate_ajax:
      type: boolean
      label: Add ajax wrapper
      preview: true
      default: false

    show_exposed_booking_form_button:
      type: boolean
      label: Form is exposed
      preview: false
      default: false
