import { AddChildFromBuilder , CSSType , ContentView , View , ViewBase } from '@nativescript/core' ; import { TabContentItem as TabContentItemDefinition } from '.' ; import { TabNavigationBase } from '../tab-navigation-base' ; export const traceCategory = 'TabView' ; @ CSSType ( 'MDTabContentItem' ) export abstract class TabContentItemBase extends ContentView implements TabContentItemDefinition , AddChildFromBuilder { public eachChild ( callback ) { if ( this . content ) { callback ( this . content ) ; } } public loadView ( view ) { const tabView = this . parent as TabNavigationBase ; if ( tabView && tabView . items ) { if ( ( this as TabContentItemDefinition ) . canBeLoaded ) { super . loadView ( view ) ; } } } }