/* eslint-disable lines-around-comment */ import React from 'react'; // @ts-ignore import { Dialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n/functions'; import { connect } from '../../../base/redux/functions'; import Switch from '../../../base/ui/components/web/Switch'; import AbstractMuteEveryonesVideoDialog, { type Props, abstractMapStateToProps } // @ts-ignore from '../AbstractMuteEveryonesVideoDialog'; /** * A React Component with the contents for a dialog that asks for confirmation * from the user before disabling all remote participants cameras. * * @augments AbstractMuteEveryonesVideoDialog */ class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog { /** * Toggles advanced moderation switch. * * @returns {void} */ _onToggleModeration() { // @ts-ignore this.setState(state => { return { moderationEnabled: !state.moderationEnabled, // @ts-ignore content: this.props.t(state.moderationEnabled ? 'dialog.muteEveryonesVideoDialog' : 'dialog.muteEveryonesVideoDialogModerationOn' ) }; }); } /** * Implements React's {@link Component#render()}. * * @inheritdoc * @returns {ReactElement} */ render() { return (
{/* @ts-ignore */} {this.state.content} {/* @ts-ignore */} { this.props.isModerationSupported && this.props.exclude.length === 0 && ( <>
)}
); } _onSubmit: () => boolean; } // @ts-ignore export default translate(connect(abstractMapStateToProps)(MuteEveryonesVideoDialog));