import React from 'react';
import { TextInputMask } from 'react-native-masked-text';
import { labelAboveFieldTemplate, labelFloatingFieldTemplate, labelHiddenFieldTemplate, labelInlineFieldTemplate } from './fieldTemplates';
function renderMaskedInput(locals, textboxStyle, color) {
    return (<TextInputMask accessibilityLabel={locals.label} autoCapitalize={locals.autoCapitalize} autoCorrect={locals.autoCorrect} autoFocus={locals.autoFocus} blurOnSubmit={locals.blurOnSubmit} editable={locals.editable} keyboardType={locals.keyboardType} maxLength={locals.maxLength} multiline={locals.multiline} onBlur={locals.onBlur} onEndEditing={locals.onEndEditing} onFocus={locals.onFocus} onLayout={locals.onLayout} onSelectionChange={locals.onSelectionChange} onSubmitEditing={locals.onSubmitEditing} onContentSizeChange={locals.onContentSizeChange} placeholderTextColor={locals.placeholderTextColor} secureTextEntry={locals.secureTextEntry} selectTextOnFocus={locals.selectTextOnFocus} selectionColor={locals.selectionColor} numberOfLines={locals.numberOfLines} underlineColorAndroid={locals.underlineColorAndroid} clearButtonMode={locals.clearButtonMode} clearTextOnFocus={locals.clearTextOnFocus} enablesReturnKeyAutomatically={locals.enablesReturnKeyAutomatically} keyboardAppearance={locals.keyboardAppearance} onKeyPress={locals.onKeyPress} returnKeyType={locals.returnKeyType} selectionState={locals.selectionState} onChangeText={locals.onChange} onChange={locals.onChangeNative} placeholder={locals.placeholder} style={[textboxStyle, { borderColor: color }]} value={locals.value} {...locals.config}/>);
}
export function maskedInputAboveLabelTemplate(locals) {
    return labelAboveFieldTemplate(locals, (locals, textboxStyle, color) => {
        return renderMaskedInput(locals, textboxStyle, color);
    });
}
export function maskedInputFloatingLabelTemplate(locals) {
    return labelFloatingFieldTemplate(locals, (locals, textboxStyle, color) => {
        return renderMaskedInput(locals, textboxStyle, color);
    });
}
export function maskedInputHiddenLabelTemplate(locals) {
    return labelHiddenFieldTemplate(locals, (locals, textboxStyle, color) => {
        return renderMaskedInput(locals, textboxStyle, color);
    });
}
export function maskedInputInlineLabelTemplate(locals) {
    return labelInlineFieldTemplate(locals, (locals, textboxStyle, color) => {
        return renderMaskedInput(locals, textboxStyle, color);
    });
}
//# sourceMappingURL=maskedFieldTemplates.js.map