"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "useInnerProps", {
    enumerable: true,
    get: function() {
        return useInnerProps;
    }
});
var _react = require("react");
var _utils = require("../utils");
var useInnerProps = function useInnerProps(props, initialInnerProps) {
    return (0, _react.useMemo)(function() {
        var width = props.width, height = props.height;
        if (!width || !height) {
            return (0, _utils.getFallbackProps)(props, initialInnerProps);
        }
        var innerProps = {
            wrapperWidth: (0, _utils.sizeFormatting)(width),
            wrapperHeight: (0, _utils.sizeFormatting)(height),
            svgWidth: height,
            svgHeight: width,
            color: initialInnerProps.color
        };
        return (0, _utils.getFallbackProps)(props, innerProps);
    }, [
        props.width,
        props.height,
        props.view,
        props.size
    ]);
};
