// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { createDefaultCallingHandlers } from "../../../../../calling-component-bindings/src";
import { createDefaultTeamsCallingHandlers } from "../../../../../calling-component-bindings/src";
import { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from "../../../../../calling-stateful-client/src";
/**
 * @private
 *
 * This is used to create correct handler for generic agent type
 */
export function createHandlers(callClient, callAgent, deviceManager, call, options) {
    // Call can be either undefined or ACS Call
    if (_isACSCallAgent(callAgent) && (!call || call && _isACSCall(call))) {
        return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call, options);
    }
    if (_isTeamsCallAgent(callAgent) && (!call || call && _isTeamsCall(call))) {
        return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call, options);
    }
    throw new Error('Unhandled agent type');
}
//# sourceMappingURL=createHandlers.js.map