import React, { PureComponent } from 'react';
import { requireNativeComponent, StyleSheet } from 'react-native';
export default class NativeStackNavigator extends PureComponent {
    constructor() {
        super(...arguments);
        this.unmounted = false;
        this.onDidFocus = () => {
            if (!this.unmounted) {
                this.props.onDidFocus(this.props.route);
            }
        };
        this.onDidBlur = (event) => {
            if (!this.unmounted) {
                this.props.onDidBlur(this.props.route, event.nativeEvent.dismissed);
            }
        };
    }
    componentWillUnmount() {
        this.unmounted = true;
    }
    render() {
        const { closing, translucent, transparent, transition, gestureEnabled, popover, style, statusBarStyle, statusBarHidden } = this.props;
        return (<RNNativeStackScene closing={closing} translucent={translucent} transparent={transparent} transition={transition} gestureEnabled={gestureEnabled} popover={popover} onDidFocus={this.onDidFocus} onDidBlur={this.onDidBlur} style={style ? [style, StyleSheet.absoluteFill] : StyleSheet.absoluteFill} statusBarStyle={statusBarStyle} statusBarHidden={statusBarHidden}>
        {this.props.children}
      </RNNativeStackScene>);
    }
}
const RNNativeStackScene = requireNativeComponent('RNNativeScene');
//# sourceMappingURL=NativeStackScene.js.map