import { useStore } from 'App/mstore'; import React from 'react'; import { observer } from 'mobx-react-lite'; import { Typography, Switch, Button, Space, Tooltip, Alert } from 'antd'; import { ExportOutlined } from '@ant-design/icons'; import { useTranslation } from 'react-i18next'; interface SidePanelProps { onSave: () => void; onPreview: () => void; taskLen: number; isStartingPointValid: boolean; } const SidePanel: React.FC = ({ onSave, onPreview, taskLen, isStartingPointValid, }) => { const { t } = useTranslation(); const { uxtestingStore } = useStore(); const canPublishOrPreview = taskLen > 0 && isStartingPointValid; return (
{t('Participant Requirements')}
{t( "Enable the camera and mic to observe participants' reactions and hear their comments for better insights", )} .
{uxtestingStore.instance && ( <>
{t('Mic')} uxtestingStore.instance?.setProperty('requireMic', checked) } checkedChildren="Required" unCheckedChildren="Not Required" />
{t('Camera')} uxtestingStore.instance?.setProperty('requireCamera', checked) } checkedChildren="Required" unCheckedChildren="Not Required" />
)}
{!canPublishOrPreview && ( )}
); }; export default observer(SidePanel);