109 lines
5.6 KiB
TypeScript
109 lines
5.6 KiB
TypeScript
// Metro module 16381 (f16382).
|
|
import { View } from "react-native";
|
|
import { getActionType, getTargetType } from "../../../records/AuditLogRecord";
|
|
import { AuditLogActionTypes, AuditLogActions, AuditLogTargetTypes } from "../../../Constants";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import { ListBulletsIcon } from "../../../design/components/Icon/native/redesign/generated/ListBulletsIcon";
|
|
import { ChannelListIcon } from "../../../design/components/Icon/native/redesign/generated/ChannelListIcon";
|
|
import { ReactionIcon } from "../../../design/components/Icon/native/redesign/generated/ReactionIcon";
|
|
import { CircleInformationIcon } from "../../../design/components/Icon/native/redesign/generated/CircleInformationIcon";
|
|
import { PuzzlePieceIcon } from "../../../design/components/Icon/native/redesign/generated/PuzzlePieceIcon";
|
|
import { LinkIcon } from "../../../design/components/Icon/native/redesign/generated/LinkIcon";
|
|
import { FlagIcon } from "../../../design/components/Icon/native/redesign/generated/FlagIcon";
|
|
import { GroupIcon } from "../../../design/components/Icon/native/redesign/generated/GroupIcon";
|
|
import { WebhookIcon } from "../../../design/components/Icon/native/redesign/generated/WebhookIcon";
|
|
import { StageIcon } from "../../../design/components/Icon/native/redesign/generated/StageIcon";
|
|
import { CalendarIcon } from "../../../design/components/Icon/native/redesign/generated/CalendarIcon";
|
|
import { ThreadIcon } from "../../../design/components/Icon/native/redesign/generated/ThreadIcon";
|
|
import { StickerIcon } from "../../../design/components/Icon/native/redesign/generated/StickerIcon";
|
|
import { SlashBoxIcon } from "../../../design/components/Icon/native/redesign/generated/SlashBoxIcon";
|
|
import { SoundboardIcon } from "../../../design/components/Icon/native/redesign/generated/SoundboardIcon";
|
|
import { HomeIcon } from "../../../design/components/Icon/native/redesign/generated/HomeIcon";
|
|
import { CircleQuestionIcon } from "../../../design/components/Icon/native/redesign/generated/CircleQuestionIcon";
|
|
import { ChatIcon } from "../../../design/components/Icon/native/redesign/generated/ChatIcon";
|
|
import { RobotIcon } from "../../../design/components/Icon/native/redesign/generated/RobotIcon";
|
|
import Module16386 from "../../../_bundle/Module16386";
|
|
import Module16387 from "../../../_bundle/Module16387";
|
|
import Module16388 from "../../../_bundle/Module16388";
|
|
import { Icon } from "../../../design/void/native";
|
|
let useStyles, c11788_11;
|
|
const AuditIcons = function AuditIcons(props) {
|
|
let ChatIcon2;
|
|
const action = props.action;
|
|
const styles = useStyles();
|
|
const actionType = getActionType(action);
|
|
const source = AuditLogActionTypes.CREATE === actionType ? Module16386 : AuditLogActionTypes.UPDATE === actionType ? Module16387 : AuditLogActionTypes.DELETE === actionType ? Module16388 : null;
|
|
L15: {
|
|
const targetType = getTargetType(action);
|
|
if (action === AuditLogActions.MESSAGE_DELETE) {
|
|
ChatIcon2 = ChatIcon;
|
|
} else {
|
|
if (action !== AuditLogActions.AUTO_MODERATION_BLOCK_MESSAGE && action !== AuditLogActions.AUTO_MODERATION_FLAG_TO_CHANNEL && action !== AuditLogActions.AUTO_MODERATION_USER_COMMUNICATION_DISABLED && action !== AuditLogActions.AUTO_MODERATION_QUARANTINE_USER) {
|
|
ChatIcon2 = c11788_11[targetType];
|
|
break L15;
|
|
}
|
|
ChatIcon2 = RobotIcon;
|
|
}
|
|
}
|
|
return <View style={styles.actionImageContainer}>
|
|
<ChatIcon2 size="custom" style={styles.iconComponent} />
|
|
<View style={[styles.actionImageOverlay, styles.actionImage]} />
|
|
<Icon style={styles.actionImage} source={source} disableColor />
|
|
</View>;
|
|
};
|
|
useStyles = createStyles({
|
|
actionImageContainer: {
|
|
height: 24,
|
|
width: 24
|
|
},
|
|
actionImageOverlay: {
|
|
borderRadius: Module712.radii.round,
|
|
width: 13,
|
|
height: 13,
|
|
bottom: 0,
|
|
right: 0,
|
|
backgroundColor: Module712.colors.BACKGROUND_SURFACE_HIGH
|
|
},
|
|
iconComponent: {
|
|
width: 22,
|
|
height: 22
|
|
},
|
|
actionImage: {
|
|
position: "absolute"
|
|
}
|
|
});
|
|
const r49 = {};
|
|
r49[AuditLogTargetTypes.ALL] = ListBulletsIcon;
|
|
r49[AuditLogTargetTypes.CHANNEL] = ChannelListIcon;
|
|
r49[AuditLogTargetTypes.CHANNEL_OVERWRITE] = ChannelListIcon;
|
|
r49[AuditLogTargetTypes.EMOJI] = ReactionIcon;
|
|
r49[AuditLogTargetTypes.GUILD] = CircleInformationIcon;
|
|
r49[AuditLogTargetTypes.GUILD_PROFILE] = CircleInformationIcon;
|
|
r49[AuditLogTargetTypes.INTEGRATION] = PuzzlePieceIcon;
|
|
r49[AuditLogTargetTypes.INVITE] = LinkIcon;
|
|
r49[AuditLogTargetTypes.ROLE] = FlagIcon;
|
|
r49[AuditLogTargetTypes.USER] = GroupIcon;
|
|
r49[AuditLogTargetTypes.WEBHOOK] = WebhookIcon;
|
|
r49[AuditLogTargetTypes.STAGE_INSTANCE] = StageIcon;
|
|
r49[AuditLogTargetTypes.GUILD_SCHEDULED_EVENT] = CalendarIcon;
|
|
r49[AuditLogTargetTypes.GUILD_SCHEDULED_EVENT_EXCEPTION] = CalendarIcon;
|
|
r49[AuditLogTargetTypes.THREAD] = ThreadIcon;
|
|
r49[AuditLogTargetTypes.STICKER] = StickerIcon;
|
|
r49[AuditLogTargetTypes.APPLICATION_COMMAND] = SlashBoxIcon;
|
|
r49[AuditLogTargetTypes.AUTO_MODERATION_RULE] = WebhookIcon;
|
|
r49[AuditLogTargetTypes.GUILD_SOUNDBOARD] = SoundboardIcon;
|
|
r49[AuditLogTargetTypes.ONBOARDING_PROMPT] = GroupIcon;
|
|
r49[AuditLogTargetTypes.GUILD_ONBOARDING] = GroupIcon;
|
|
r49[AuditLogTargetTypes.HOME_SETTINGS] = GroupIcon;
|
|
r49[AuditLogTargetTypes.GUILD_MEMBER_VERIFICATION] = GroupIcon;
|
|
r49[AuditLogTargetTypes.VOICE_CHANNEL_STATUS] = ChannelListIcon;
|
|
r49[AuditLogTargetTypes.GUILD_HOME] = HomeIcon;
|
|
r49[AuditLogTargetTypes.UNKNOWN] = CircleQuestionIcon;
|
|
c11788_11 = r49;
|
|
export default function AuditLogActionIcon(props) {
|
|
return <View style={useStyles().actionImageContainer}>
|
|
<AuditIcons action={props.action} />
|
|
</View>;
|
|
};
|