// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { IncomingCallNotification } from './IncomingCallNotification';
import { Stack } from '@fluentui/react';
import React from 'react';
/**
 * Wrapper to manage multiple incoming calls
 * @param props - {@link IncomingCallManagerProps}
 * @returns
 * @public
 */
export const IncomingCallStack = (props) => {
    const { activeIncomingCalls, removedIncomingCalls, onAcceptCall, onRejectCall, styles, strings, tabIndex } = props;
    return React.createElement(Stack, { tokens: {
            childrenGap: '0.25rem'
        }, role: 'group', tabIndex: tabIndex }, activeIncomingCalls.filter(incomingCall => !removedIncomingCalls.some(call => call.id === incomingCall.id)).map(incomingCall => {
        return React.createElement(IncomingCallNotification, { key: incomingCall.id, callerName: incomingCall.callerInfo.displayName, onAcceptWithAudio: () => onAcceptCall(incomingCall.id), onAcceptWithVideo: () => onAcceptCall(incomingCall.id, true), onReject: () => onRejectCall(incomingCall.id), onDismiss: () => onRejectCall(incomingCall.id), styles: styles, strings: strings, acceptOptions: {
                showAcceptWithVideo: incomingCall.videoAvailable
            } });
    }));
};
//# sourceMappingURL=IncomingCallStack.js.map