import React, { FC } from "react";
import { ScrollView } from "react-native";
import { TrainDataView } from "./TrainDataView";
import { trainDataType } from "@/lib/trainPositionTextArray";
type props = {
  currentTrainData: trainDataType;
  currentPosition: string[] | undefined;
  nearTrainIDList: string[];
  openTrainInfo: (f: string) => void;
  navigate: (screen: string, data?: any) => void;
}
export const ShortHeader:FC<props> = ({
  currentTrainData,
  currentPosition,
  nearTrainIDList,
  openTrainInfo,
  navigate,
}) => {
  return (
    <ScrollView
      style={{
        flexDirection: "row",
        flex: 1,
      }}
      horizontal
      pagingEnabled
    >
      <TrainDataView
        mode={2}
        currentTrainData={currentTrainData}
        currentPosition={currentPosition}
        nearTrainIDList={nearTrainIDList}
        openTrainInfo={openTrainInfo}
        navigate={navigate}
      />
    </ScrollView>
  );
};
