import React, { memo } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import { getUserFirstOrLastName } from '../../global/helpers'; import { selectTheme, selectUser } from '../../global/selectors'; import { LOCAL_TGS_URLS } from '../common/helpers/animatedAssets'; import renderText from '../common/helpers/renderText'; import useLastCallback from '../../hooks/useLastCallback'; import useOldLang from '../../hooks/useOldLang'; import AnimatedIconWithPreview from '../common/AnimatedIconWithPreview'; import Icon from '../common/icons/Icon'; import Button from '../ui/Button'; import styles from './PremiumRequiredMessage.module.scss'; type OwnProps = { userId: string; }; type StateProps = { patternColor?: string; userName?: string; }; function PremiumRequiredMessage({ patternColor, userName }: StateProps) { const lang = useOldLang(); const { openPremiumModal } = getActions(); const handleOpenPremiumModal = useLastCallback(() => openPremiumModal()); return (