import moment from 'moment'
import {UserProfile_Enum} from '../../../../../redux/helpers/action-enums'
import { MettaSvr_Common } from '../../../../../redux/helpers/action-enums'
export const PersonalIformationInitialValues = (userProfile) =>{
    // 0: day, 1: month, 2: year
    let comps = userProfile.dob.split('-')    
    let obj = {
        Salutation: userProfile.salutation,
        FirstName:userProfile.firstName,  
        LastName:userProfile.lastName,
        Email:userProfile.email,
        PhoneNo: userProfile.phoneNo,
        DOB: moment(`${comps[2]}-${comps[1]}-${comps[0]}`).format(MettaSvr_Common.SaveDateFormat),
        Gender: userProfile.gender,
        UpdateType: UserProfile_Enum.UpdateType.PersonalDetails
    }
    console.log(obj)
    return obj
}

export const AddressInformationInitialValues = ({city='', email='', street='', state='', country='', pinCode=''}) =>({
    Street: street,
    City: city,
    State: state,
    Country: country,
    PinCode: pinCode,
    Email:email,
    UpdateType: UserProfile_Enum.UpdateType.AddressDetails

})
    /*
    Qualification: [{Details: '', CompletionYear: ''}], 
    Certification: [{Details: '', CompletionYear: ''}], 
    WorkExperience: [{Details: '', TillDate: '', FromDate: ''}],          
    RegisterReason: ''
    */