"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get getFallbackProps () {
        return getFallbackProps;
    },
    get sizeFormatting () {
        return sizeFormatting;
    }
});
const sizeFormatting = (size, deviceScale = 1)=>{
    const scalingPixelBasis = 16;
    if (typeof size === 'number' || !size.endsWith('rem') && !size.endsWith('px')) {
        return `${Number(size) / (scalingPixelBasis * deviceScale)}rem`;
    }
    return size;
};
const getFallbackProps = (props, initialInnerProps)=>{
    const { size } = props;
    const color = props.color || initialInnerProps.color;
    if (typeof size === 'number' || size && !Number.isNaN(parseInt(size, 10))) {
        const wrapperSize = sizeFormatting(size);
        return {
            wrapperWidth: wrapperSize,
            wrapperHeight: wrapperSize,
            svgWidth: size,
            svgHeight: size,
            color
        };
    }
    return {
        ...initialInnerProps,
        color
    };
};
