import { createElement , remove } from '@syncfusion/ej2-base' ; import { Pager , IRender } from './pager' ; /**
 * `ExternalMessage` module is used to display user provided message.
 */ export class ExternalMessage implements IRender { private element : HTMLElement ; private pagerModule : Pager ; param { Pager } pagerModule returns hidden constructor ( pagerModule ? ) { this . pagerModule = pagerModule ; } private protected getModuleName ( ) { return 'externalMessage' ; } hidden public render ( ) { this . element = createElement ( 'div' , { className : 'e-pagerexternalmsg' , attrs : { 'aria-label' : 'Pager external message' } } ) ; this . pagerModule . element . appendChild ( this . element ) ; this . refresh ( ) ; } /**
     * Refreshes the external message of Pager.
     */ public refresh ( ) { if ( this . pagerModule . externalMessage && this . pagerModule . externalMessage . toString ( ) . length ) { this . showMessage ( ) ; this . element . innerHTML = this . pagerModule . externalMessage ; } else { this . hideMessage ( ) ; } } /**
     * Hides the external message of Pager.
     */ public hideMessage ( ) { this . element . style . display = 'none' ; } /**
     * Shows the external message of the Pager.
     */ public showMessage ( ) { this . element . style . display = '' ; } method return { void } hidden public destroy ( ) { remove ( this . element ) ; } }