import React from 'react';
import { View } from 'react-native';
import { CrossButton, Colors, } from 'react-native-cross-components';
import styles from '../../styles';
import { CrossEditor } from 'react-native-cross-components';
/**
 * Allows the user to ender credentials and passes them back through prop events.
 *
 * Props are {@link IConfirmFormProps}
 *
 * @example
 *  <ConfirmForm
 *      onConfirmPress={(code) => console.log('Confirmed', code)}
 *      confirmButtonProps={{title: 'Enlist'}}
 *      codeInputProps={{label: 'WouldntYouLikeToKnow'}}>
 *     <Text>Custom layouts here</Text>
 *  </ConfirmForm>
 */
export class ConfirmForm extends React.Component {
    render() {
        return (React.createElement(View, { style: [styles.container], testID: this.props.testID },
            this.props.children,
            ' ',
            React.createElement(CrossEditor, Object.assign({ label: 'E-mail', placeholder: 'E-mail', autoCapitalize: 'none', clearButtonMode: 'always', autoCorrect: false, value: this.props.initialEmail || '', onChangeText: (text) => this.props.onEmailChanged(text) }, this.props.emailInputProps)),
            React.createElement(CrossEditor, Object.assign({ label: 'Confirmation code', placeholder: 'Enter the code that was sent to you', autoCapitalize: 'none', clearButtonMode: 'always', autoCorrect: false, value: this.props.code || '', onChangeText: this.props.onCodeChanged }, this.props.codeInputProps)),
            React.createElement(CrossButton, Object.assign({ style: styles.marginTop10, buttonStyle: styles.buttonStyle, onPress: this.props.onConfirmPress, mode: 'contained', title: 'Confirm', backgroundColor: Colors.NextButton, iconName: 'sign-in' }, this.props.confirmButtonProps))));
    }
}
export default ConfirmForm;
//# sourceMappingURL=ConfirmForm.js.map