// You can (explore) the built-in icon families and icons on the web at https://icons.expo.fyi/

import Ionicons from '@expo/vector-icons/Ionicons';
import { type IconProps } from '@expo/vector-icons/build/createIconSet';
import { type ComponentProps } from 'react';
import { useColorScheme } from '@/lib/hooks/useColorScheme';
import { Colors } from '@/lib/constants/Colors';

export function ThemedIcon({ style, ...rest }: IconProps<ComponentProps<typeof Ionicons>['name']>) {
    const colorScheme = useColorScheme() ?? 'light';

    return <Ionicons color={Colors[ colorScheme ].text} style={[ style ]} {...rest} />;
}
