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 _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 _Box=_interopRequireDefault(require("../Box"));var _Text=_interopRequireDefault(require("../Text"));var _hooks=require("../../../hooks");var _useLink2=require("./useLink");var _utils=require("../../../utils");var _Pressable=require("../Pressable");var _interactions=require("@react-native-aria/interactions");var _useHasResponsiveProps=require("../../../hooks/useHasResponsiveProps");var _this=this,_jsxFileName="/Users/adityajamuar/Sites/projects/nativebase/NativeBase/src/components/primitives/Link/index.tsx";var Link=function Link(props,ref){var _ref=_react.default.useRef(null);var _useHover=(0,_interactions.useHover)({},_ref),isHovered=_useHover.isHovered;var _usePropsResolution=(0,_hooks.usePropsResolution)('Link',props,{isHovered:isHovered}),isUnderlined=_usePropsResolution.isUnderlined,children=_usePropsResolution.children,_text=_usePropsResolution._text,href=_usePropsResolution.href,onPress=_usePropsResolution.onPress,isExternal=_usePropsResolution.isExternal,resolvedProps=(0,_objectWithoutProperties2.default)(_usePropsResolution,["isUnderlined","children","_text","href","onPress","isExternal"]);var _useLink=(0,_useLink2.useLink)({href:href,onPress:onPress,isExternal:isExternal,_ref:_ref}),linkProps=_useLink.linkProps;var linkTextProps=(0,_extends2.default)({textDecorationLine:isUnderlined?'underline':'none'},_text);if((0,_useHasResponsiveProps.useHasResponsiveProps)(props)){return null;}return _react.default.createElement(_react.default.Fragment,null,_reactNative.Platform.OS==='web'?_react.default.createElement(_Box.default,(0,_extends2.default)({},linkProps,resolvedProps,{_text:linkTextProps,ref:(0,_utils.mergeRefs)([ref,_ref]),flexDirection:"row",__self:_this,__source:{fileName:_jsxFileName,lineNumber:48,columnNumber:9}}),children):_react.default.createElement(_Pressable.Pressable,(0,_extends2.default)({},linkProps,resolvedProps,{ref:ref,flexDirection:"row",__self:_this,__source:{fileName:_jsxFileName,lineNumber:58,columnNumber:9}}),_react.default.Children.map(children,function(child){return typeof child==='string'||typeof child==='number'?_react.default.createElement(_Text.default,(0,_extends2.default)({},resolvedProps._text,linkTextProps,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:66,columnNumber:15}}),child):child;})));};var _default=(0,_react.memo)((0,_react.forwardRef)(Link));exports.default=_default;
  //# sourceMappingURL=index.js.map