text: "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));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=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _extractViewBox=require("../lib/extract/extractViewBox");var _extractProps=require("../lib/extract/extractProps");var _Shape2=_interopRequireDefault(require("./Shape"));var _NativeComponents=require("./NativeComponents");var _jsxFileName="/Users/aurelienboquet/Code/react-native-svg/src/elements/Image.tsx";var spacesRegExp=/\s+/;var SvgImage=function(_Shape){(0,_inherits2.default)(SvgImage,_Shape);function SvgImage(){(0,_classCallCheck2.default)(this,SvgImage);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(SvgImage).apply(this,arguments));}(0,_createClass2.default)(SvgImage,[{key:"render",value:function render(){var props=this.props;var preserveAspectRatio=props.preserveAspectRatio,x=props.x,y=props.y,width=props.width,height=props.height,xlinkHref=props.xlinkHref,_props$href=props.href,href=_props$href===void 0?xlinkHref:_props$href;var modes=preserveAspectRatio?preserveAspectRatio.trim().split(spacesRegExp):[];var align=modes[0];var meetOrSlice=modes[1];return _react.default.createElement(_NativeComponents.RNSVGImage,(0,_extends2.default)({ref:this.refMethod},(0,_extractProps.withoutXY)(this,props),{x:x,y:y,width:width,height:height,meetOrSlice:_extractViewBox.meetOrSliceTypes[meetOrSlice]||0,align:_extractViewBox.alignEnum[align]||'xMidYMid',src:!href?null:_reactNative.Image.resolveAssetSource(typeof href==='string'?{uri:href}:href),__source:{fileName:_jsxFileName,lineNumber:48}}));}}]);return SvgImage;}(_Shape2.default);exports.default=SvgImage;(0,_defineProperty2.default)(SvgImage,"displayName",'Image');(0,_defineProperty2.default)(SvgImage,"defaultProps",{x:0,y:0,width:0,height:0,preserveAspectRatio:'xMidYMid meet'});
  //# sourceMappingURL=Image.js.map