import DebouncedRequestListener from "./DebouncedRequestListener";
import RequestListenerLoadingBar from "./RequestListenerLoadingBar";
class RequestListenerFactory {
  static create({ strategy }) {
    switch (strategy) {
      case 'request_name':
        return new RequestListenerLoadingBar();
      case 'request_time':
        return new DebouncedRequestListener();
      default:
        throw new Error('Strategy not found');
    }
    ;
  }
}
export default RequestListenerFactory;
