82 lines
3.2 KiB
TypeScript
82 lines
3.2 KiB
TypeScript
// Metro module 10326 (f10327).
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { getUnreadSelectOptions } from "../utils/notificationSettingsPresetOptionUtils";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { PressableOpacity } from "../../../../design/void/Pressables/native/Pressables";
|
|
import NotificationSettingsMockChannels from "./NotificationSettingsMockChannels";
|
|
import { useGuildPresetSettings } from "../utils/notificationSettingsGuildFlagUtils";
|
|
import ActionSheetActionCreators from "../../../action_sheet/native/ActionSheetActionCreators";
|
|
import { useChannelPresetSettings } from "../utils/notficationSettingsChannelFlagUtils";
|
|
let useStyles;
|
|
const NotificationSettingsMessageUnread = function NotificationSettingsMessageUnread(props) {
|
|
let c17873_0 = props;
|
|
const styles = useStyles();
|
|
const r18 = getUnreadSelectOptions().find((item) => item.value === c17873_0.setting);
|
|
const r55 = [<View style={styles.header}>
|
|
<Text variant="text-sm/semibold" color="text-default" style={styles.headerTitle}>
|
|
{intl.string(t.Tqd1Af)}
|
|
</Text>
|
|
<Text variant="text-xs/semibold" color="text-default">
|
|
{intl.string(t.RpQgm5)}
|
|
</Text>
|
|
</View>, ,];
|
|
const r69 = [<NotificationSettingsMockChannels unreadSetting={props.setting} />, , ,];
|
|
let r75 = r18?.label;
|
|
if (r75 == null) {
|
|
r75 = "unset";
|
|
}
|
|
r69[1] = <Text variant="text-sm/medium" style={styles.label}>{r75}</Text>;
|
|
r69[2] = <PressableOpacity onPress={props.onCustomize}>
|
|
<Text variant="text-sm/semibold" style={styles.cta} color="text-brand">
|
|
{intl.string(t.yxiV9W)}
|
|
{" "}
|
|
</Text>
|
|
</PressableOpacity>;
|
|
r55[1] = <PressableOpacity onPress={props.onCustomize} activeOpacity={0.6}>
|
|
<View style={styles.card}>{r69}</View>
|
|
</PressableOpacity>;
|
|
return <View style={props.style}>{r55}</View>;
|
|
};
|
|
useStyles = createStyles({
|
|
card: {
|
|
backgroundColor: Module712.colors.BACKGROUND_BASE_LOWEST,
|
|
borderColor: Module712.colors.BACKGROUND_MOD_SUBTLE,
|
|
borderRadius: 20,
|
|
borderWidth: 1,
|
|
padding: 14
|
|
},
|
|
cta: {
|
|
marginTop: 4,
|
|
textAlign: "center"
|
|
},
|
|
label: {
|
|
marginTop: 8,
|
|
textAlign: "center"
|
|
},
|
|
header: {
|
|
marginBottom: 8
|
|
},
|
|
headerTitle: {
|
|
marginBottom: 4
|
|
}
|
|
});
|
|
export function NotificationSettingsGuildMessageUnread(props) {
|
|
let c17874_0 = props;
|
|
return <NotificationSettingsMessageUnread style={props.style} setting={useGuildPresetSettings(props.guildId).unread} onCustomize={() => {
|
|
ActionSheetActionCreators.openLazy(import("./NotificationSettingsMessageUnreadGuildActionSheet"), "MessageUnreadActionSheet", {
|
|
guildId: c17874_0.guildId
|
|
});
|
|
}} />;
|
|
}
|
|
export function NotificationSettingsChannelMessageUnread(props) {
|
|
let c17875_0 = props;
|
|
return <NotificationSettingsMessageUnread style={props.style} setting={useChannelPresetSettings(props.channel).unread} onCustomize={() => {
|
|
ActionSheetActionCreators.openLazy(import("./NotificationSettingsMessageUnreadChannelActionSheet"), "MessageUnreadActionSheet", {
|
|
channel: c17875_0.channel
|
|
});
|
|
}} />;
|
|
}
|