import React from 'react';
import { View, Text } from 'react-native';
import { IAutocompleteUserRoom } from '../../interfaces';
import Avatar from '../../../Avatar';
import RoomTypeIcon from '../../../RoomTypeIcon';
import { fetchIsAllOrHere } from '../../helpers';
import I18n from '../../../../i18n';
import { useStyle } from './styles';
export const AutocompleteUserRoom = ({ item }: { item: IAutocompleteUserRoom }) => {
const [styles] = useStyle();
const isAllOrHere = fetchIsAllOrHere(item);
return (
<>
{!isAllOrHere ? : null}
{!isAllOrHere ? (
) : null}
{isAllOrHere ? `@${item.title}` : item.title}
{item.type === '#' ? null : (
{item.subtitle}
{item.outside ? {I18n.t('Not_in_channel')} : null}
)}
>
);
};