// Metro module 10311 (f10312). import { useLayoutEffect, useCallback } from "react"; import { View } from "react-native"; import UserGuildSettingsStore from "../../../../stores/UserGuildSettingsStore"; import { createStyles } from "../../../../design/components/Styles/native/createStyles"; import Module712 from "../../../../_bundle/Module712"; import { useChannelPresetInheritance, updateChannelToGuildDefault } from "../utils/notficationSettingsChannelFlagUtils"; import { intl, t } from "../../../../intl/index.native"; import useChannelName from "../../../channel/useChannelName"; import { useNavigation } from "../../../../design/components/Navigator/native/useNavigation.native"; import { NavigatorHeader, getHeaderBackButton } from "../../../../design/components/Navigator/native/NavigatorHeader.native"; import NotificationSettingsModalActionCreators from "../../../../actions/NotificationSettingsModalActionCreators"; import { NotificationLabels } from "../../../../utils/NotificationSettingsUtils"; import { useStateFromStoresObject } from "../../../../_bundle/Module589"; import { Form } from "../../../../design/void/Form/native/index"; import { NotificationSettingsMuteBanner, getMuteBannerSubtitleFromConfig } from "./NotificationSettingsMuteBanner"; import { NotificationSettingsChannelPresets } from "./NotificationSettingsPresets"; import { NotificationSettingsChannelMessageNotification } from "./NotificationSettingsMessageNotification"; import { NotificationSettingsChannelMessageUnread } from "./NotificationSettingsMessageUnread"; import { NotificationSettingsChannelPost } from "./NotificationSettingsChannelPost"; import { Button } from "../../../../design/components/Button/native/Button.native"; const useStyles = createStyles({ screenContainer: { flex: 1, backgroundColor: Module712.colors.BACKGROUND_BASE_LOW, padding: 16 } }); export default function NotificationSettingsChannel(props) { let c17860_0 = props; const channelPresetInheritance = useChannelPresetInheritance(props.channel); const title = intl.string(t.h850Ss); const subtitle = useChannelName(props.channel); const navigation = useNavigation(); const styles = useStyles(); useLayoutEffect(() => { navigation.setOptions({ title: `${title} (${subtitle})`, headerTitle: () => }); if (c17860_0.inGuildContext) { navigation.setOptions({ headerLeft: getHeaderBackButton(() => navigation.popToTop()) }); } }); const callback2 = useCallback(() => updateChannelToGuildDefault(c17860_0.channel.guild_id, c17860_0.channel.id), [props.channel]); const callback = useCallback(() => { NotificationSettingsModalActionCreators.updateChannelOverrideSettings(c17860_0.channel.guild_id, c17860_0.channel.id, { muted: false }, NotificationLabels.Unmuted); }, [props.channel]); const stateFromStoresObject = useStateFromStoresObject([UserGuildSettingsStore], () => ({ config: UserGuildSettingsStore.getChannelMuteConfig(c17860_0.channel.guild_id, c17860_0.channel.id), muted: UserGuildSettingsStore.isChannelMuted(c17860_0.channel.guild_id, c17860_0.channel.id) })); const r79 = [stateFromStoresObject.muted && , , , , props.channel.isForumLikeChannel() && , ,]; const inherited = channelPresetInheritance.inherited; r79[5] = inherited ? !inherited :