// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import moment from 'moment-timezone'; import React from 'react'; import {View} from 'react-native'; import CustomStatusEmoji from '@components/custom_status/custom_status_emoji'; import CustomStatusExpiry from '@components/custom_status/custom_status_expiry'; import CustomStatusText from '@components/custom_status/custom_status_text'; import FormattedText from '@components/formatted_text'; import {useTheme} from '@context/theme'; import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme'; import {typography} from '@utils/typography'; type Props = { customStatus: UserCustomStatus; }; const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({ container: { marginVertical: 8, }, row: { flexDirection: 'row', }, description: { color: theme.centerChannelColor, flex: 1, ...typography('Body', 200), }, title: { color: changeOpacity(theme.centerChannelColor, 0.56), marginBottom: 2, ...typography('Body', 50, 'SemiBold'), }, expiry: { color: changeOpacity(theme.centerChannelColor, 0.56), marginLeft: 3, marginBottom: 2, textTransform: 'lowercase', ...typography('Body', 50, 'SemiBold'), }, emoji: { marginRight: 8, }, })); const UserProfileCustomStatus = ({customStatus}: Props) => { const theme = useTheme(); const styles = getStyleSheet(theme); return ( {Boolean(customStatus?.duration) && } {Boolean(customStatus.emoji) && } ); }; export default UserProfileCustomStatus;