// Metro module 10547 (f10548). import { View } from "react-native"; import ChannelStore from "../../../stores/ChannelStore"; import { Fonts } from "../../../Constants"; import { createStyles } from "../../../design/components/Styles/native/createStyles"; import Module712 from "../../../_bundle/Module712"; import { StreamEnded } from "../../../design/components/Illustration/native/redesign/generated/StreamEnded"; import { LegacyText } from "../../../design/void/native"; import { intl, t } from "../../../intl/index.native"; import { StreamFailed } from "../../../design/components/Illustration/native/redesign/generated/StreamFailed"; import { getErrorInfo, AVError } from "../../../modules/errors/av_errors/AVError"; import { useStateFromStores } from "../../../_bundle/Module589"; import useMountEffect from "../../../hooks/useMountEffect"; import { stopStream } from "../../../actions/StreamActionCreators"; import { encodeStreamKey } from "../../../modules/go_live/utils/StreamKeyUtils"; import { Text } from "../../../design/components/Text/native/Text"; import { BaseTextButton } from "../../../design/components/Button/native/BaseTextButton.native"; let c7088_8 = { NONE: "NONE", STREAM_ENDED: "STREAM_ENDED", STREAM_FAILED: "STREAM_FAILED" }; const useStyles = createStyles({ container: { alignItems: "center", justifyContent: "center", backgroundColor: Module712.unsafe_rawColors.PRIMARY_700, padding: 8 }, placeholderImage: { marginBottom: 8, width: "100%", resizeMode: "contain" }, placeholderText: { color: Module712.unsafe_rawColors.WHITE, fontFamily: Fonts.PRIMARY_SEMIBOLD, fontSize: 16, lineHeight: 20, textAlign: "center" }, buttonWrapper: { marginTop: 16, alignSelf: "center" }, buttonPill: { borderRadius: Module712.radii.round } }); export default function VideoEmptyState(props) { const { type, style, avError, removeSplashImage, removeCloseButton, stream, ...props2 } = props; const styles = useStyles(); const r31 = c7088_8.STREAM_ENDED === type ? <> {removeSplashImage ? !removeSplashImage : } {intl.formatToMarkdownString(t["1Ww0Hi"], {})} : c7088_8.STREAM_FAILED === type ? <> {removeSplashImage ? !removeSplashImage : } {intl.string(t.rSlOep)} : c7088_8.NONE === type ? null : void 0; const errorCode = avError != null ? getErrorInfo(avError).errorCode : type === c7088_8.STREAM_FAILED ? getErrorInfo(AVError.STREAM_FAILED_TO_START).errorCode : null; const stateFromStores = useStateFromStores([ChannelStore], () => ChannelStore.getChannel(stream.channelId), [stream.channelId]); useMountEffect(() => { if (stateFromStores == null ? void 0 : stateFromStores.isGuildStageVoice()) { stopStream(encodeStreamKey(stream)); } }); return {r31} {errorCode != null && {intl.formatToPlainString(t.ejOT95, { errorCode })} } {removeCloseButton ? !removeCloseButton : { stopStream(encodeStreamKey(stream)); }} /> } ; }; export { c7088_8 as VideoEmptyTypes };