77 lines
3.7 KiB
TypeScript
77 lines
3.7 KiB
TypeScript
// Metro module 8861 (f8862).
|
|
import { memo } from "react";
|
|
import { StyleSheet } from "react-native";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { MuteDeafenIconState, VideoIconState } from "../utils/VoiceStateIconUtils";
|
|
import { HeadphonesDenyIcon } from "../../../../design/components/Icon/native/redesign/generated/HeadphonesDenyIcon";
|
|
import { HeadphonesSlashIcon } from "../../../../design/components/Icon/native/redesign/generated/HeadphonesSlashIcon";
|
|
import { MicrophoneDenyIcon } from "../../../../design/components/Icon/native/redesign/generated/MicrophoneDenyIcon";
|
|
import { MicrophoneSlashIcon } from "../../../../design/components/Icon/native/redesign/generated/MicrophoneSlashIcon";
|
|
import { assertNever } from "../../../../utils/GlobalUtils";
|
|
import { IconSizes, getIconStyle, Icon } from "../../../../design/void/native";
|
|
import Module8531, { Path } from "../../../../_bundle/Module8531";
|
|
import Module8871 from "../../../../_bundle/Module8871";
|
|
import Module8872 from "../../../../_bundle/Module8872";
|
|
let useStyles;
|
|
const VideoDisabledSvgIcon = function VideoDisabledSvgIcon(props) {
|
|
const { size = IconSizes.MEDIUM, style, ...props2 } = props;
|
|
const styles = useStyles();
|
|
const iconStyle = getIconStyle(size);
|
|
const r27 = StyleSheet.flatten(style);
|
|
let fill = r27?.tintColor;
|
|
if (fill == null) {
|
|
fill = styles.defaultTint.tintColor;
|
|
}
|
|
return <Module8531 {...props2} style={[iconStyle, r27]} viewBox="0 0 24 24">
|
|
<Path d="M8.48485 19H13C15.2091 19 17 17.2091 17 15L19.563 17.0504C20.5451 17.8361 22 17.1368 22 15.8791V8.12094C22 7.35968 21.467 6.80301 20.8285 6.65636L8.48485 19Z" fill={fill} />
|
|
<Path d="M14.9873 5.52783C14.4019 5.192 13.7233 5 13 5H6C3.79086 5 2 6.79086 2 9V15C2 15.9811 2.35325 16.8798 2.93949 17.5757L14.9873 5.52783Z" fill={fill} />
|
|
<Path d="M21.2785 2.70712C20.888 2.31659 20.2549 2.31659 19.8643 2.70711L2.70711 19.8643C2.31658 20.2549 2.31658 20.888 2.70711 21.2785L2.72146 21.2929C3.11199 21.6834 3.74515 21.6834 4.13567 21.2929L21.2929 4.13568C21.6834 3.74515 21.6834 3.11199 21.2929 2.72147L21.2785 2.70712Z" fill={styles.redTint.tintColor} />
|
|
</Module8531>;
|
|
};
|
|
useStyles = createStyles({
|
|
redTint: {
|
|
tintColor: Module712.colors.ICON_FEEDBACK_CRITICAL
|
|
},
|
|
defaultTint: {
|
|
tintColor: Module712.colors.INTERACTIVE_TEXT_DEFAULT
|
|
},
|
|
noTint: {
|
|
tintColor: void 0
|
|
}
|
|
});
|
|
const r41 = memo(function({ style, state, alwaysWhite = false }) {
|
|
const styles = useStyles();
|
|
if (MuteDeafenIconState.DEAFENED_SERVER === state) {
|
|
return <HeadphonesDenyIcon style={[style, alwaysWhite ? null : styles.redTint]} size="xs" />;
|
|
}
|
|
if (MuteDeafenIconState.DEAFENED === state) {
|
|
return <HeadphonesSlashIcon style={[style]} size="xs" />;
|
|
}
|
|
if (MuteDeafenIconState.MUTED_SERVER === state) {
|
|
return <MicrophoneDenyIcon style={[style, alwaysWhite ? null : styles.redTint]} size="xs" />;
|
|
}
|
|
if (MuteDeafenIconState.MUTED_LOCAL === state) {
|
|
return <MicrophoneDenyIcon style={[style]} size="xs" />;
|
|
}
|
|
if (MuteDeafenIconState.MUTED === state) {
|
|
return <MicrophoneSlashIcon style={[style]} size="xs" />;
|
|
}
|
|
assertNever(state);
|
|
});
|
|
const r44 = memo(function({ state, ...props }) {
|
|
const styles = useStyles();
|
|
if (VideoIconState.VIDEO_DISABLED_LOCAL_AUTO === state) {
|
|
return <Icon {...props} source={Module8871} style={[props.style, styles.noTint]} />;
|
|
}
|
|
if (VideoIconState.VIDEO_DISABLED_LOCAL === state) {
|
|
return <VideoDisabledSvgIcon {...props} />;
|
|
}
|
|
if (VideoIconState.VIDEO_ACTIVE === state) {
|
|
return <Icon {...props} source={Module8872} />;
|
|
}
|
|
assertNever(state);
|
|
});
|
|
export { r41 as MuteDeafenIcon };
|
|
export { r44 as VideoIcon };
|