<commit_before>/**
 * Puppy Play Date
 * https://github.com/Tooconfident/Puppy_PlayDate
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Navigator,
  TabBarIOS
} from 'react-native';

var base64Icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAQAAACSR7JhAAADtUlEQVR4Ac3YA2Bj6QLH0XPT1Fzbtm29tW3btm3bfLZtv7e2ObZnms7d8Uw098tuetPzrxv8wiISrtVudrG2JXQZ4VOv+qUfmqCGGl1mqLhoA52oZlb0mrjsnhKpgeUNEs91Z0pd1kvihA3ULGVHiQO2narKSHKkEMulm9VgUyE60s1aWoMQUbpZOWE+kaqs4eLEjdIlZTcFZB0ndc1+lhB1lZrIuk5P2aib1NBpZaL+JaOGIt0ls47SKzLC7CqrlGF6RZ09HGoNy1lYl2aRSWL5GuzqWU1KafRdoRp0iOQEiDzgZPnG6DbldcomadViflnl/cL93tOoVbsOLVM2jylvdWjXolWX1hmfZbGR/wjypDjFLSZIRov09BgYmtUqPQPlQrPapecLgTIy0jMgPKtTeob2zWtrGH3xvjUkPCtNg/tm1rjwrMa+mdUkPd3hWbH0jArPGiU9ufCsNNWFZ40wpwn+62/66R2RUtoso1OB34tnLOcy7YB1fUdc9e0q3yru8PGM773vXsuZ5YIZX+5xmHwHGVvlrGPN6ZSiP1smOsMMde40wKv2VmwPPV<KEY>';

import MainScene from './MainScene';
import TestPage from './TestPage';
import UserDogs from './UserDogs';
import PlayDates from './PlayDates';
import PlayDateCreate from './PlayDateCreate';

class PuppyPlayDateApp extends Component {
  constructor(props){
    super(props);
    this.state = {
      selectedTab: "test",
    };
  }
  renderScene(route, navigator){
    console.log("renderScene was called: passProps: " + route.passProps);
    return(
      <route.component navigator={navigator} {...route.passProps}/>
    );
  }
  render() {
    return (
      <TabBarIOS
        barTintColor= "black"
        unselectedTintColor= "red"
        tintColor= "white"
        selectedTab={this.state.selectedTab}
      >
         <TabBarIOS.Item
          icon = {{uri: base64Icon, scale: 3}}
          title = "Home"
          selected = {this.state.selectedTab === "main"}
          onPress = {() => {
            console.log("Pressed");
            this.setState({
              selectedTab: "main"
            });
          }}
         >

           <Navigator
           renderScene = {this.renderScene}
           initialRoute = {{
             title: 'PuppyPlayDate',
             component: MainScene,
           }}
           />
         </TabBarIOS.Item>

         <TabBarIOS.Item
          title = "Profile"
          selected = {this.state.selectedTab === "profile"}
          icon = {{uri: base64Icon, scale: 3}}
          onPress = {() => {
            this.setState({
              selectedTab: "profile"
            });
          }}
         >
         <Navigator
         renderScene = {this.renderScene}
         initialRoute = {{
           title: 'Profile',
           component: UserDogs,
         }}
         />
        </TabBarIOS.Item>

        <TabBarIOS.Item
         title = "PlayDates"
         selected = {this.state.selectedTab === "playdates"}
         icon = {{uri: base64Icon, scale: 3}}
         onPress = {() => {
           this.setState({
             selectedTab: "playdates"
           });
         }}
        >
        <Navigator
        renderScene = {this.renderScene}
        initialRoute = {{
          title: 'PlayDates',
          component: PlayDates,
        }}
        />
       </TabBarIOS.Item>

       <TabBarIOS.Item
        title = "Test"
        selected = {this.state.selectedTab === "test"}
        icon = {{uri: base64Icon, scale: 3}}
        onPress = {() => {
          this.setState({
            selectedTab: "test"
          });
        }}
       >
       <Navigator
       renderScene = {this.renderScene}
       initialRoute = {{
         title: 'Test',
         component: TestPage,
       }}
       />
      </TabBarIOS.Item>

      </TabBarIOS>
    );
  }
}

const styles = StyleSheet.create({
  container: {<commit_msg>Add commented code for SuperNavigator<commit_after>/**
 * Puppy Play Date
 * https://github.com/Tooconfident/Puppy_PlayDate
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Navigator,
  NavigatorIOS,
  TabBarIOS
} from 'react-native';

var base64Icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAQAAACSR7JhAAADtUlEQVR4Ac3YA2Bj6QLH0XPT1Fzbtm29tW3btm3bfLZtv7e2ObZnms7d8Uw098tuetPzrxv8wiISrtVudrG2JXQZ4VOv+qUfmqCGGl1mqLhoA52oZlb0mrjsnhKpgeUNEs91Z0pd1kvihA3ULGVHiQO2narKSHKkEMulm9VgUyE60s1aWoMQUbpZOWE+kaqs4eLEjdIlZTcFZB0ndc1+lhB1lZrIuk5P2aib1NBpZaL+JaOGIt0ls47SKzLC7CqrlGF6RZ09HGoNy1lYl2aRSWL5GuzqWU1KafRdoRp0iOQEiDzgZPnG6DbldcomadViflnl/cL93tOoVbsOLVM2jylvdWjXolWX1hmfZbGR/wjypDjFL<KEY>';

import MainScene from './MainScene';
import TestPage from './TestPage';
import UserDogs from './UserDogs';
import PlayDates from './PlayDates';
import PlayDateCreate from './PlayDateCreate';

// class SuperNav extends Component {
//
//   renderScene(route, navigator) {
//     var Component = route.component;
//     return (
//       <View style={styles.container}>
//         <Text>This is shit</Text>
//         <Component
//           route={route}
//           navigator={navigator}
//           topNavigator={navigator}
//         />
//       </View>
//     );
//   }
//
//   render() {
//     return (
//       <Navigator
//       sceneStyle={styles.container}
//       ref={(navigator) => { this.navigator = navigator; }}
//       renderScene={this.renderScene}
//       tintColor='#D6573D'
//       barTintColor='#FFFFFD'
//       titleTextColor='#D6573D'
//       navigationBarHidden={true}
//       initialRoute={{
//         title: 'Main',
//         component: Main,
//       }}
//     />
//     );
//   }
// }

class PuppyPlayDateApp extends Component {
  constructor(props){
    super(props);
    this.state = {
      selectedTab: "test",
    };
  }
  renderScene(route, navigator){
    console.log("renderScene was called: passProps: " + route.passProps);
    return(
      <route.component navigator={navigator} {...route.passProps}/>
    );
  }
  render() {
    return (
      <TabBarIOS
        barTintColor= "black"
        unselectedTintColor= "red"
        tintColor="white"
        selectedTab={this.state.selectedTab}
      >
         <TabBarIOS.Item
          icon = {{uri: base64Icon, scale: 3}}
          title = "Home"
          selected = {this.state.selectedTab === "main"}
          onPress = {() => {
            console.log("TabBarIOS was Pressed");
            console.log("navigator: " + this.props.navigator);
            this.setState({
              selectedTab: "main"
            });
          }}
         >

           <Navigator
             renderScene = {this.renderScene}
             initialRoute = {{
             title: 'PuppyPlayDate',
             component: MainScene,
           }}
           />
         </TabBarIOS.Item>

         <TabBarIOS.Item
          title = "Profile"
          selected = {this.state.selectedTab === "profile"}
          icon = {{uri: base64Icon, scale: 3}}
          onPress = {() => {
            this.setState({
              selectedTab: "profile"
            });
          }}
         >
         <Text>Navigator for Profile</Text>
         <Navigator
         renderScene = {this.renderScene}
         initialRoute = {{
           title: 'Profile',
           component: UserDogs,
         }}
         />
        </TabBarIOS.Item>

        <TabBarIOS.Item
         title = "PlayDates"
         selected = {this.state.selectedTab === "playdates"}
         icon = {{uri: base64Icon, scale: 3}}
         onPress = {() => {
           this.setState({
             selectedTab: "playdates"
           });
         }}
        >
        <Navigator
        renderScene = {this.renderScene}
        initialRoute = {{
          title: 'PlayDates',
          component: PlayDates,
        }}
        />
       </TabBarIOS.Item>

       <TabBarIOS.Item
        title = "Test"
        selected = {this.state.selectedTab === "test"}
        icon = {{uri: base64Icon, scale: 3}}
        onPress = {() => {
          this.setState({
            selectedTab: "test"
          });
        }}
       >
       <Navigator
       renderScene = {this.renderScene}
       initialRoute = {{
         title: 'Test',
         component: TestPage,
       }}
       />
      </TabBarIOS.Item>

      </TabBarIOS>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    marginTop: 20,
{'fraction_non_alphanumeric': 0.12461969088475112, 'fraction_numerical': 0.023974686625289034, 'mean_word_length': 2.0235467255334805, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 52, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4007763', 'n_tokens_mistral': 2958, 'n_tokens_neox': 2869, 'n_words': 400}