import React from 'react';
import { View } from 'react-native';
import { CrossEditor, styles } from 'react-native-cross-components';
/**
 * Allows the user to ender credentials and passes them back through prop events.
 *
 * Props are {@link ILoginFormProps}
 */
export class LoginForm extends React.Component {
    render() {
        // TODO: E-mail validation
        return (React.createElement(View, { style: [styles.container] },
            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: 'Password', clearButtonMode: 'always', secureTextEntry: true, value: this.props.initialPassword || '', onChangeText: (text) => this.props.onPasswordChanged(text) }, this.props.passwordInputProps))));
    }
}
export default LoginForm;
//# sourceMappingURL=LoginForm.js.map