Initial commit

This commit is contained in:
Dmitry Popov
2024-09-18 01:55:30 +04:00
parent 6a96a5f56e
commit 4136aaad76
1675 changed files with 124664 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
import { isKnownSpace } from '@/hooks/Mapper/components/map/helpers/isKnownSpace.ts';
import {
SECURITY_FOREGROUND_CLASSES,
SYSTEM_CLASS_STYLES,
WORMHOLE_CLASS_STYLES,
} from '@/hooks/Mapper/components/map/constants.ts';
import { isWormholeSpace } from '@/hooks/Mapper/components/map/helpers/isWormholeSpace.ts';
import { SolarSystemStaticInfo } from '@/hooks/Mapper/types';
type SystemClassStylesProps = Pick<SolarSystemStaticInfo, 'systemClass' | 'security'>;
export const getSystemClassStyles = ({ systemClass, security }: SystemClassStylesProps) => {
if (isKnownSpace(systemClass)) {
return SECURITY_FOREGROUND_CLASSES[security];
}
if (isWormholeSpace(systemClass)) {
return WORMHOLE_CLASS_STYLES[systemClass];
}
return SYSTEM_CLASS_STYLES[systemClass];
};