// Metro module 9929 (f9930).
import { View } from "react-native";
import ChannelStore from "../../../stores/ChannelStore";
import GuildStore from "../../../stores/GuildStore";
import PresenceStore from "../../../stores/PresenceStore";
import RelationshipStore from "../../../stores/RelationshipStore";
import UserStore from "../../../stores/UserStore";
import { StatusTypes } from "../../../_bundle/Module505";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import useChannelName from "../../channel/useChannelName";
import GroupDMAvatar from "../../group_dm/native/GroupDMAvatar";
import { AvatarSizes, Avatar } from "../../../design/void/native";
import { Text } from "../../../design/components/Text/native/Text";
import { useStateFromStores, useStateFromStoresObject } from "../../../_bundle/Module589";
import UserUtils from "../../../utils/UserUtils";
import { GuildIconWithChannelType, GuildIconWithChannelTypeSizes } from "../../guild/native/GuildIconWithChannelType";
import { AlertModal, AlertActionButton } from "../../../design/components/AlertModal/native/AlertModal.native";
import { AlertActions } from "../../../design/components/AlertModal/native/AlertModal.native";
import { intl, t } from "../../../intl/index.native";
let useStyles, FailedUserRow, FailedChannelRow, FailedDestinationRow;
const FailedGroupDMRow = function FailedGroupDMRow(props) {
const channel2 = props.channel;
const styles = useStyles();
return
{useChannelName(channel2)}
;
};
FailedUserRow = function FailedUserRow(props) {
const user = props.user;
const styles = useStyles();
let r11 = useStateFromStores([RelationshipStore], () => RelationshipStore.getNickname(user.id));
const stateFromStoresObject = useStateFromStoresObject([PresenceStore], () => ({
isMobileOnline: PresenceStore.isMobileOnline(user.id),
status: PresenceStore.getStatus(user.id),
isVROnline: PresenceStore.isVROnline(user.id)
}));
const { isMobileOnline, isVROnline, status } = stateFromStoresObject;
const r2 = user != null;
let r32 = null;
if (r2) {
const r47 = [, ,];
if (r11 == null) {
r11 = UserUtils.getName(user);
}
r47[1] = {r11};
r32 = {r47};
}
return r32;
};
FailedChannelRow = function FailedChannelRow(props) {
const channel = props.channel;
const styles = useStyles();
return
GuildStore.getGuild(channel?.guild_id))} channel={channel} size={GuildIconWithChannelTypeSizes.SMALL_32} />
{useChannelName(channel)}
;
};
FailedDestinationRow = function FailedDestinationRow(props) {
const destination = props.destination;
const stateFromStoresObject = useStateFromStoresObject([ChannelStore, UserStore], () => ({
channel: destination.type === "channel" ? ChannelStore.getChannel(destination.id) : null,
user: destination.type === "user" ? UserStore.getUser(destination.id) : null
}));
const { channel: channel2, user: user2 } = stateFromStoresObject;
return (channel2 == null ? void 0 : channel2.isGroupDM()) ? : user2 != null ? : channel2 != null ? : null;
};
useStyles = createStyles({
container: {
borderWidth: 1,
borderColor: Module712.colors.BORDER_STRONG,
borderRadius: Module712.radii.lg,
paddingVertical: Module712.space.PX_8
},
row: {
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: Module712.space.PX_12,
height: 40,
marginHorizontal: Module712.space.PX_16
},
label: {
flexShrink: 1
}
});
export default function DestinationFailedAlertModal(props) {
const { title, content, failedDestinations, onRetry } = props;
return
{failedDestinations.map((failedDestination, index) => )}
} actions={
{onRetry != null ? <>
> : }
} />;
};