/**
 * React Native Full App (https://store.enappd.com/product/react-native-full-app)
 *
 * Copyright © 2019-present Enappd. All rights reserved.
 *
 * This source code is licensed as per the terms found in the
 * LICENSE.md file in the root directory of this source tree.
 */
import React, { Component } from 'react';
import { Root } from 'native-base';
import LoginView from './loginView';
import { NavigationStackScreenProps } from 'react-navigation-stack';

interface Iprops extends NavigationStackScreenProps {}
interface Istate {
  selected: any;
}

class LoginContainer extends React.Component<Iprops, Istate> {
  static defaultNavigationOptions = {
    headerShown: false,
  };

  constructor(props: Iprops) {
    super(props);
    this.state = {
      selected: 'IN',
    };
  }
  onValueChange = (value: any) => {
    this.setState({
      selected: value,
    });
  };
  goto = (routeName: string) => {
    this.props.navigation.navigate(routeName);
  };
  render() {
    return (
      <Root>
        <LoginView
          goto={this.goto}
          onValueChange={this.onValueChange}
          selected={this.state.selected}
        />
      </Root>
    );
  }
}
export default LoginContainer;
