33 lines
1.4 KiB
TypeScript
33 lines
1.4 KiB
TypeScript
// Metro module 14986 (f14987).
|
|
import { View } from "react-native";
|
|
import { useSubtitleStyles } from "./useSubtitleStyles";
|
|
import { getChannelIconComponentWithGuild } from "../../../../utils/native/ChannelUtils";
|
|
import * as _TextIcon from "../../../../design/components/Icon/native/redesign/generated/TextIcon";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
export default function UnreadSubtitle(props) {
|
|
const { guild, channel, channelName, count } = props;
|
|
const styles = useSubtitleStyles();
|
|
let r18 = channel != null ? getChannelIconComponentWithGuild(channel, guild) : void 0;
|
|
if (r18 == null) {
|
|
r18 = _TextIcon.TextIcon;
|
|
}
|
|
const TextIcon = r18;
|
|
return <View style={styles.subtitleRow}>
|
|
{intl.format(t.OqlmU6, {
|
|
channelName,
|
|
count: count - 1,
|
|
labelHook: (a0, a1) => <Text key={a1} variant="text-xs/medium" color="text-muted" lineClamp={1}>
|
|
{a0}
|
|
</Text>,
|
|
iconHook: (a0, a1) => <TextIcon key={a1} size="xxs" color="icon-muted" style={styles.unreadChannelIcon} />,
|
|
channelHook: (a0, a1) => <Text key={a1} variant="text-xs/medium" color="text-muted" lineClamp={1} style={styles.subtitleText}>
|
|
{a0}
|
|
</Text>,
|
|
overflowHook: (a0, a1) => <Text key={a1} variant="text-xs/medium" color="text-muted">
|
|
{a0}
|
|
</Text>
|
|
})}
|
|
</View>;
|
|
};
|