function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import React from 'react';
import { usePropsConfig } from '@native-base/v3';
import styled from 'styled-components';
import { color, space, typography } from 'styled-system';
import Svg, { G, Path, Circle } from 'react-native-svg';
const SVG = styled(Svg)(color, space, typography);

const SVGIcon = ({
  viewBox,
  color: colorProp,
  stroke,
  children,
  focusable,
  size,
  style
}) => {
  const newProps = usePropsConfig('Icon', {
    size
  });
  return /*#__PURE__*/React.createElement(SVG, {
    height: parseInt(newProps.dimension || newProps.size, 10),
    width: parseInt(newProps.dimension || newProps.size, 10),
    viewBox: viewBox,
    color: colorProp,
    stroke: stroke,
    focusable: focusable,
    accessibilityRole: 'image',
    style: style
  }, React.Children.count(children) > 0 ? /*#__PURE__*/React.createElement(G, null, React.Children.map(children, ({
    props: childProps,
    type
  }) => {
    if (type.name === 'Path') {
      return /*#__PURE__*/React.createElement(Path, _extends({}, childProps, {
        fill: childProps.fill ? childProps.fill : 'currentColor'
      }));
    }

    return null;
  })) : getDefaultIcon());
};

const getDefaultIcon = () => {
  return /*#__PURE__*/React.createElement(G, {
    strokeWidth: 1.5,
    stroke: "currentColor"
  }, /*#__PURE__*/React.createElement(Path, {
    d: 'M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25',
    fill: "none"
  }), /*#__PURE__*/React.createElement(Path, {
    d: 'M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0',
    fill: "none"
  }), /*#__PURE__*/React.createElement(Circle, {
    cx: "12",
    cy: "12",
    r: "11.25",
    fill: "none"
  }));
};

export { SVGIcon };
//# sourceMappingURL=SVGIcon.js.map