import { SatObject } from '@app/js/api/keepTrackTypes' ; import { SpaceObjectType } from '@app/js/api/SpaceObjectType' ; import { ColorInformation , colorSchemeManager , Pickable } from '../colorSchemeManager' ; export const groupRules = ( sat ) : ColorInformation => { if ( sat . isInGroup ) { return { color : colorSchemeManager . colorTheme . inGroup , pickable : Pickable . Yes , } ; } if ( sat . marker ) { return { color : colorSchemeManager . colorTheme . marker [ 0 ] , marker : true , pickable : Pickable . No , } ; } if ( sat . static && sat . type === SpaceObjectType . STAR ) { if ( sat . vmag >= 4.7 && colorSchemeManager . objectTypeFlags . starLow ) { return { color : colorSchemeManager . colorTheme . starLow , pickable : Pickable . Yes , } ; } else if ( sat . vmag >= 3.5 && sat . vmag < 4.7 && colorSchemeManager . objectTypeFlags . starMed ) { return { color : colorSchemeManager . colorTheme . starMed , pickable : Pickable . Yes , } ; } else if ( sat . vmag < 3.5 && colorSchemeManager . objectTypeFlags . starHi ) { return { color : colorSchemeManager . colorTheme . starHi , pickable : Pickable . Yes , } ; } else { return { color : colorSchemeManager . colorTheme . deselected , pickable : Pickable . No , } ; } } return { color : colorSchemeManager . colorTheme . transparent , pickable : Pickable . No , } ; } ;