<?php

function toc_emr_station_info_accordion_alter(&$accordion, $entity) {
  /** @var \Drupal\nre_stations_entity_type\Service\Constants $entityFields **/
  $entityFields = \Drupal::service('nre_stations_entity_type.constants');

  $accordion['wrapper_class'] = 'acw-a alt mb-3';

  $accordion['items'] = [
    [
      'pid' => 'station_info_accordion',
      'aiid' => 'general_info',
      'label' => '<i class="far fa-volume-up"></i> General information',
      'content' => _tm_nre_station_accordion_content_general_info($entity, $entityFields),
    ],
    [
      'pid' => 'station_info_accordion',
      'aiid' => 'fares',
      'label' => '<i class="far fa-ticket-alt"></i> Ticket buying and collection',
      'content' => _toc_emr_nre_station_accordion_content_fares($entity, $entityFields),
    ],
    [
      'pid' => 'station_info_accordion',
      'aiid' => 'passenger_services',
      'label' => '<i class="far fa-suitcase"></i> Passenger services',
      'content' => _toc_emr_nre_station_accordion_content_passenger_services($entity, $entityFields),
    ],
    [
      'pid' => 'station_info_accordion',
      'aiid' => 'station_facilities',
      'label' => '<i class="far fa-coffee"></i> Station facilities',
      'content' => _toc_emr_nre_station_accordion_content_station_facilities($entity, $entityFields),
    ],
    [
      'pid' => 'station_info_accordion',
      'aiid' => 'accessibility',
      'label' => '<i class="far fa-wheelchair"></i> Accessibility',
      'content' => _toc_emr_nre_station_accordion_content_accessibility($entity, $entityFields),
    ],
    [
      'pid' => 'station_info_accordion',
      'aiid' => 'interchange',
      'label' => '<i class="far fa-bus"></i> Interchange',
      'content' => _toc_nre_station_accordion_content_interchange($entity, $entityFields),
    ],
  ];
}
