import React, { Component } from 'react';
import { Animated, View } from 'react-native';
import ProfileViewForm from './ProfileViewForm';
import { PROFILE_FORM } from '../../FormTypes';
import { SCREEN_WIDTH } from './styles';

const DOTS_SIZE = ['first', 'second'];
const scrollX = new Animated.Value(0);

export default class ProfileForm extends Component {
  render() {
    switch (this.props.profileFormMode) {
      case 'view':      
        return (
          <View>
            <ProfileViewForm
              defaultProfile={/*this.props.defaultProfile*/ 
                { 
                  keywords: ['webdev', 'music', 'freelance'],
                  profileName: 'Business Profile',
                  tagferId: 'jdshgbjdhbf',
                  fullName: 'testName',
                  headline: 'Software Engineer at Company',
                  titleAndCompany: 'Title and Company',
                  location: 'Some Location',
                  isPublicProfile: true,
                  about: 'about txt',
                  bizCardImg: null,
                  avatarImg: null,
                  firstName: null,
                  lastName: 'Lastynameson',
                  primaryPhone: '4435465434',
                  secondaryPhone: '4434532432',
                  extension: 'nice-extension',
                  howIHelp: 'i help alot i think...',
                  whatINeed: 'i need more needs',
                  workPhone: '4435243746',
                  fax: '7654635432',
                  email: 'some@example.com',
                  website: 'examplesofexam.com',
                  street: 'street road',
                  address2: '443 agreat dres',
                  city: 'cityville',
                  region: 'DC',
                  postalCode: '20001',
                  country: 'USA',
                  referralId: '',
                  addedExperience: [{
                    jobTitle: 'Engineer',
                    jobCompany: 'Some Company',
                    jobDates: '01/01/19 - 01/15/19',
                    jobLocation: 'USA',
                    jobSummary: 'My great job summary'
                  }],
                  addedEducation: [{ 
                    school: 'UMD',
                    degree: 'B.S.',
                    fieldOfStudy: 'Computer Engineering',
                    schoolDates: '01/11/18 - 01/19/19',
                    educationSummary: 'Some cool education'
                  }]
                }
              }
              profiles={this.props.profiles}
              formMode={PROFILE_FORM}
              DOTS_SIZE={DOTS_SIZE}
              scrollX={scrollX}
              position={Animated.divide(scrollX, SCREEN_WIDTH)}
            />
          </View>
        );
      case 'edit':
        return (
          <View />
        );
      case 'create':
        return (
          <View />
        );
      default:
        return (
          <View />
        );
    }
  }
}
