import * as i0 from '@angular/core';
import { ModuleWithProviders, ElementRef, Injector } from '@angular/core';
import { IInjectable, StateRegistry, UIRouter } from '@uirouter/core';
import * as i1 from '@uirouter/angular';
import { Ng2StateDeclaration, StatesModule, ParentUIViewInject } from '@uirouter/angular';
import { Ng1StateDeclaration, Ng1StateTransitionHook } from '@uirouter/angularjs';
import * as i2 from '@angular/upgrade/static';
interface _NgHybridStateDeclaration extends Ng2StateDeclaration {
onExit?: any;
onRetain?: any;
onEnter?: any;
}
interface _NgHybridStateModule extends StatesModule {
states?: any;
}
interface NgHybridStateDeclaration extends _NgHybridStateDeclaration {
onEnter?: Ng1StateTransitionHook | IInjectable;
onRetain?: Ng1StateTransitionHook | IInjectable;
onExit?: Ng1StateTransitionHook | IInjectable;
}
interface NgHybridStatesModule extends _NgHybridStateModule {
states?: NgHybridStateDeclaration[];
}
declare module '@uirouter/core/lib/state/stateRegistry' {
interface StateRegistry {
register(state: Ng1StateDeclaration): any;
register(state: Ng2StateDeclaration): any;
}
}
declare module '@uirouter/angularjs/lib/stateProvider' {
interface StateProvider {
state(name: string, definition: Ng1StateDeclaration): StateProvider;
state(name: string, definition: Ng2StateDeclaration): StateProvider;
state(definition: Ng1StateDeclaration): StateProvider;
state(definition: Ng2StateDeclaration): StateProvider;
}
}
/**
* Create a ng1 module for the ng1 half of the hybrid application to depend on.
*
* Example:
* const myApp = angular.module('myApp', ['ui.router.upgrade']);
*/
declare const upgradeModule: any;
declare function objectFactory(): {};
/**
* UIViewNgUpgrade is a component bridge from ng1 ui-view to ng2 ui-view
*
* When a ui-router for ng1 is registering a state it checks if a view's
* `component:` is an ng2 Component class. If so, it creates a special ng1 template
* which references this component, i.e.,