import { ɵComponentType as ComponentType } from '@angular/core' ; import { createCustomElement } from './create-custom-element' ; import { LazyIvyElementStrategyFactory } from './ivy-strategy-factory' ; import { NgElementStrategyFactory } from './element-strategy' ; import { EventContract } from '../tsaction/event_contract' ; export function registerCustomElement < T > ( doc , ceRegistry , ngBitsLoader , tag , component , rendererFactory ? , moduleLoader ? , contract ? ) { let strategyFactory ; if ( typeof component === 'function' ) { strategyFactory = new LazyIvyElementStrategyFactory ( doc , ngBitsLoader , component , rendererFactory , moduleLoader , contract ) ; } else { strategyFactory = new LazyIvyElementStrategyFactory ( doc , ngBitsLoader , tag , rendererFactory , moduleLoader , contract ) ; } ceRegistry . define ( tag , createCustomElement ( component , { strategyFactory } ) ) ; }