var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.MyTextInput=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _theme=require("../theme");var _index=require("./index");var _this=this,_jsxFileName="/Users/tima/Tima/react-native-timacare/src/components/MyTextInput.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var MyTextInput=exports.MyTextInput=_react.default.forwardRef(function(props,ref){var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isFocus=_useState2[0],setIsFocus=_useState2[1];var error=props.error;return _react.default.createElement(_reactNative.View,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:11,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:{backgroundColor:error?'#FFF6F6':'#F8F8F8',borderRadius:8,overflow:'hidden',borderWidth:1,borderColor:error?'#DC2626':isFocus?_theme.color.primary:'transparent'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:12,columnNumber:7}},_react.default.createElement(_index.MTextInput,(0,_extends2.default)({ref:ref},props,{onFocus:function onFocus(){setIsFocus(true);if(props.onFocus)props.onFocus();},onBlur:function onBlur(){setIsFocus(false);if(props.onBlur)props.onBlur();},__self:_this,__source:{fileName:_jsxFileName,lineNumber:25,columnNumber:9}}))),error&&_react.default.createElement(_index.MText,{style:{color:'#A60303',paddingTop:7,fontSize:12},__self:_this,__source:{fileName:_jsxFileName,lineNumber:39,columnNumber:9}},error));});
//# sourceMappingURL=MyTextInput.js.map