text: var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireWildcard(require("react"));var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNative=require("react-native");var _withTheme=_interopRequireDefault(require("../../../Theme/withTheme"));var _Ripple=_interopRequireDefault(require("../../Ripple/Ripple"));var _Icon=_interopRequireDefault(require("../../Icon/Icon"));var _jsxFileName="/Users/gerard/dev/reciclos/repos/material-bread/src/Components/Drawer/DrawerItem/DrawerItem.js";var DrawerItem=function(_Component){(0,_inherits2.default)(DrawerItem,_Component);function DrawerItem(){(0,_classCallCheck2.default)(this,DrawerItem);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(DrawerItem).apply(this,arguments));}(0,_createClass2.default)(DrawerItem,[{key:"render",value:function render(){var _this$props=this.props,icon=_this$props.icon,text=_this$props.text,onPress=_this$props.onPress,active=_this$props.active,iconComponent=_this$props.iconComponent,theme=_this$props.theme;return _react.default.createElement(_Ripple.default,{style:[theme.drawerItem,{backgroundColor:active?theme.drawerItemActive.backgroundColor:theme.drawerItem.backgroundColor}],onPress:onPress,rippleContainerBorderRadius:4,__source:{fileName:_jsxFileName,lineNumber:24}},icon?_react.default.createElement(_Icon.default,{name:icon,size:theme.drawerItemIcon.size,color:active?theme.drawerItemActive.color:theme.drawerItemIcon.color,iconComponent:iconComponent,__source:{fileName:_jsxFileName,lineNumber:36}}):null,_react.default.createElement(_reactNative.Text,{style:[theme.drawerItemText,{marginLeft:icon?24:0,color:active?theme.drawerItemActive.color:theme.drawerItemText.color}],__source:{fileName:_jsxFileName,lineNumber:45}},text));}}]);return DrawerItem;}(_react.Component);(0,_defineProperty2.default)(DrawerItem,"propTypes",{children:_propTypes.default.node,style:_propTypes.default.oneOfType([_propTypes.default.object,_propTypes.default.array]),text:_propTypes.default.string,icon:_propTypes.default.string,onPress:_propTypes.default.func,active:_propTypes.default.bool,iconComponent:_propTypes.default.func,theme:_propTypes.default.object});var _default=(0,_withTheme.default)(DrawerItem);exports.default=_default;