journey_planner_bar:
  label: Journey Planner Bar
  namespace: Organisms/TM - Journey Planner Bar
  use: '@organisms/tm-jpb/journey-planner-bar.twig'
  description: Journey Planner Bar
  dependencies:
    - form-element
    - jc_dropdown
    - booking_form_desktop
    - booking_form_modal
    - menu_il
    - bs-tabs-items
  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
    check_service_form:
      label: Check service form
      type: pattern
      preview: false
    next_train_form:
      label: Next train form
      type: pattern
      preview: false
    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-f social-link
              - lid: _t
                title: <span class='sr-only'>Follow us on Twitter</span>
                url: /
                icon: fc fc-tx 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
