UNPKG

@azure/communication-react

Version:

React library for building modern communication user experiences utilizing Azure Communication Services

26 lines 1.98 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { ErrorBar } from "../../../../../react-components/src"; import React from 'react'; import { useLocale } from '../../localization'; import { CallArrangement } from '../components/CallArrangement'; import { HoldPane } from '../components/HoldPane'; import { usePropsFor } from '../hooks/usePropsFor'; import { disableCallControls, reduceCallControlsForMobile } from '../utils'; /** * @beta */ export const HoldPage = (props) => { var _a, _b, _c, _d, _e; const errorBarProps = usePropsFor(ErrorBar); const strings = useLocale().strings.call; let callControlOptions = props.mobileView ? reduceCallControlsForMobile((_a = props.options) === null || _a === void 0 ? void 0 : _a.callControls) : (_b = props.options) === null || _b === void 0 ? void 0 : _b.callControls; callControlOptions = disableCallControls(callControlOptions, ['cameraButton', 'microphoneButton', 'devicesButton', 'screenShareButton', 'holdButton']); return React.createElement(CallArrangement, { complianceBannerProps: { strings }, errorBarProps: ((_c = props.options) === null || _c === void 0 ? void 0 : _c.errorBar) !== false && errorBarProps, showErrorNotifications: (_e = (_d = props.options) === null || _d === void 0 ? void 0 : _d.errorBar) !== null && _e !== void 0 ? _e : true, callControlProps: { options: callControlOptions, increaseFlyoutItemSize: props.mobileView }, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => React.createElement(HoldPane, null), dataUiId: 'hold-page', updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, latestNotifications: props.latestNotifications, onDismissError: props.onDismissError, onDismissNotification: props.onDismissNotification }); }; //# sourceMappingURL=HoldPage.js.map