'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var index = require('../utils/index.js');

var useInnerProps = function useInnerProps(props, initialInnerProps) {
  return React.useMemo(function () {
    var width = props.width,
      height = props.height;
    if (!width || !height) {
      return index.getFallbackProps(props, initialInnerProps);
    }
    var innerProps = {
      wrapperWidth: index.sizeFormatting(width),
      wrapperHeight: index.sizeFormatting(height),
      svgWidth: height,
      svgHeight: width,
      color: initialInnerProps.color
    };
    return index.getFallbackProps(props, innerProps);
  }, [props.width, props.height, props.view, props.size]);
};

exports.useInnerProps = useInnerProps;
