text: // Copyright (c) Microsoft Corporation.
  // Licensed under the MIT license.
  import React, { createContext, useContext } from 'react';
  const CallAdapterContext = createContext(undefined);
  /**
   * @private
   */
  export const CallAdapterProvider = (props) => {
      const { adapter } = props;
      return React.createElement(CallAdapterContext.Provider, { value: adapter }, props.children);
  };
  /**
   * @private
   */
  export const useAdapter = () => {
      const adapter = useContext(CallAdapterContext);
      if (!adapter) {
          throw 'Cannot find adapter please initialize before usage.';
      }
      return adapter;
  };
  //# sourceMappingURL=CallAdapterProvider.js.map