communication-react-19
Version:
React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)
34 lines • 2.29 kB
JavaScript
// 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, _f, _g;
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,
/* @conditional-compile-remove(call-readiness) */
doNotShowCameraAccessNotifications: ((_g = (_f = props.options) === null || _f === void 0 ? void 0 : _f.deviceChecks) === null || _g === void 0 ? void 0 : _g.camera) === 'doNotPrompt' }));
};
//# sourceMappingURL=HoldPage.js.map