import React from 'react';
import { ImageStyle, Pressable, Text, View, ViewStyle } from 'react-native';
import { Strings } from '../../resources/localization/Strings';
import { IStyledProps } from '../common/types';
import { TelephonyIcon } from './TelephonyIcon';
import { NavigationProp } from '@react-navigation/native';
import { RootStackParamList } from '../../RootStackParamList';

interface ITelephonyViewProps extends IStyledProps<ITelephonyViewStyleProps> {
  navigation: NavigationProp<RootStackParamList>;

 }

interface ITelephonyViewStyleProps {
  iconContainer?: ViewStyle;
  icon?: ImageStyle;
  container?: ViewStyle;
}
export const MenuTelephonyView: React.FunctionComponent<ITelephonyViewProps> = ({navigation}) => {
  const openTelephonySettings = () => {
    navigation.navigate('Telephony');
  };
  return (
    <Pressable onPress={openTelephonySettings} style={{marginHorizontal :4}}>
      <View style={{flex: 1, flexDirection: 'row'}}  >
        <TelephonyIcon />
          <Text>{Strings.menuTelephonySettings}</Text>
      </View>

    </Pressable>
  );
};
