import { ConnectedAircraft } from "@repo/db";

export const HPGValidationRequired = (
	missionStationIds?: number[],
	aircrafts?: ConnectedAircraft[],
	hpgMissionString?: string | null,
) => {
	return (
		missionStationIds?.some((id) => {
			const aircraft = aircrafts?.find((a) => a.stationId === id);

			return aircraft?.posH145active;
		}) && hpgMissionString?.length !== 0
	);
};
