import React, {FC} from 'react';

import {AvatarStyle as S} from '../../styles/avatar.style';
import {IAvatarWrapper} from './avatar-wrapper.type';

export const AvatarWrapperComponent: FC<IAvatarWrapper> = ({
    children,
    ...restProps
}) => {
    const {size, status} = restProps;

    return (
        <S.Container {...restProps}>
            {children}
            {status === 'online' && <S.Online size={size} />}
            {status === 'verified' && <S.Verified size={size} />}
        </S.Container>
    );
};
