import {ThemeMode} from '@configs/colors';
import {RootState} from '@redux/store';
import { StatusBar } from 'react-native';
import {useSelector} from 'react-redux';

export function MyStatusBar() {
  const globalTheme = useSelector(
    (state: RootState) => state.appVariables.preferences.theme,
  );

  const currentTheme = useSelector(
    (state: RootState) => state.nonSaveVariables.theme.colors,
  );

  return (
    <StatusBar
      backgroundColor={currentTheme.backgroundDark400}
    barStyle={
       globalTheme === ThemeMode.Light ? 'dark-content' : 'light-content'
      }
    />
  );
}
