export function getText ( this , key ) { return this [ key + "Text" ] ; } export function selectPage ( this , page , evt ) { if ( evt ) { evt . preventDefault ( ) ; } let clickAllowed = ! this . disabled || ! evt ; if ( clickAllowed && this . currentPage !== page && page > 0 && page <= this . totalPages ) { if ( evt && evt . target ) { evt . target . blur ( ) ; } this . currentPage = page ; if ( this . changeOnClick ) { this . $emit ( "change" ) ; } } } export function makePage ( number , text , isActive ) { return { number : number , text : text , active : isActive } ; } export function createDataForModel ( currentPage , numPages ) { let data = { currentPage , numPages } ; Object . defineProperties ( data , { numPages : { get ( ) { return numPages ; } } } ) ; return data ; }