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 _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _native=_interopRequireDefault(require("styled-components/native"));var _styledSystem=require("styled-system");var _useThemeProps=require("../../../hooks/useThemeProps");var _customProps=require("../../../utils/customProps");var _interactions=require("@react-native-aria/interactions");var _mergeRefs=require("../../../utils/mergeRefs");var _useResolvedFontFamily=require("../../../hooks/useResolvedFontFamily");var _this=this,_jsxFileName="/Users/adityajamuar/Sites/projects/nativebase/NativeBase/src/components/primitives/Text/index.tsx";var StyledText=(0,_native.default)(_reactNative.Text)(_styledSystem.color,_styledSystem.space,_styledSystem.position,_styledSystem.layout,_styledSystem.flexbox,_styledSystem.border,_styledSystem.typography,_styledSystem.position,_customProps.customPosition,_customProps.customBorder,_customProps.customBackground,_customProps.customOutline,_customProps.customShadow,_customProps.customExtra,_customProps.customLayout,_customProps.customTypography);var Text=function Text(_ref2,ref){var children=_ref2.children,props=(0,_objectWithoutProperties2.default)(_ref2,["children"]);var _usePropsResolution=(0,_useThemeProps.usePropsResolution)('Text',props),isTruncated=_usePropsResolution.isTruncated,noOfLines=_usePropsResolution.noOfLines,bold=_usePropsResolution.bold,italic=_usePropsResolution.italic,sub=_usePropsResolution.sub,highlight=_usePropsResolution.highlight,underline=_usePropsResolution.underline,strikeThrough=_usePropsResolution.strikeThrough,propFontFamily=_usePropsResolution.fontFamily,propFontWeight=_usePropsResolution.fontWeight,propFontStyle=_usePropsResolution.fontStyle,_hover=_usePropsResolution._hover,_usePropsResolution$f=_usePropsResolution.fontSize,fontSize=_usePropsResolution$f===void 0?'md':_usePropsResolution$f,reslovedProps=(0,_objectWithoutProperties2.default)(_usePropsResolution,["isTruncated","noOfLines","bold","italic","sub","highlight","underline","strikeThrough","fontFamily","fontWeight","fontStyle","_hover","fontSize"]);var _ref=(0,_react.useRef)(null);var _useHover=(0,_interactions.useHover)({},_hover?_ref:null),isHovered=_useHover.isHovered;var fontFamily=propFontFamily;var fontStyle=italic?'italic':propFontStyle;var fontWeight=bold?'bold':propFontWeight;var resolvedFontFamily=(0,_useResolvedFontFamily.useResolvedFontFamily)({fontFamily:fontFamily,fontWeight:fontWeight,fontStyle:fontStyle});return _react.default.createElement(StyledText,(0,_extends2.default)({},reslovedProps,{numberOfLines:noOfLines?noOfLines:isTruncated?1:undefined},resolvedFontFamily,{bg:highlight?'warning.200':reslovedProps.bg,textDecorationLine:underline&&strikeThrough?'underline line-through':underline?'underline':strikeThrough?'line-through':reslovedProps.textDecorationLine,fontSize:sub?10:fontSize,ref:(0,_mergeRefs.mergeRefs)([ref,_ref])},isHovered&&_hover,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:5}}),children);};var _default=(0,_react.memo)((0,_react.forwardRef)(Text));exports.default=_default;
//# sourceMappingURL=index.js.map