'use strict';

var index = require('./index-Bc25FxCt.js');
var responsiveFormatFacade = require('./responsive-format-facade-HA8sO-0_.js');

/**
 * Fomatter flex styles.
 *
 * @param {Nullable<ResponsiveType<FlexType>>} flex - flex
 * @param {Nullable<ResponsiveType<FlexGrowType>>} flexGrow - flex-grow
 * @param {Nullable<ResponsiveType<FlexShrinkType>>} flexShrink - flex-shrink
 * @param {Nullable<ResponsiveType<FlexBasisType>>} flexBasis - flex-basis
 * @returns {FormattedStylesType} - formatted styles
 */
function formatFlexStyles(flex, flexGrow, flexShrink, flexBasis) {
    if (index.isNonNullable(flex)) {
        return { flex: `${responsiveFormatFacade.ResponsiveFormatFacade.formatCustom(flex)}` };
    }
    else {
        return {
            flexGrow: index.isNonNullable(flexGrow)
                ? `${responsiveFormatFacade.ResponsiveFormatFacade.formatCustom(flexGrow)}`
                : undefined,
            flexShrink: index.isNonNullable(flexShrink)
                ? `${responsiveFormatFacade.ResponsiveFormatFacade.formatCustom(flexShrink)}`
                : undefined,
            flexBasis: index.isNonNullable(flexBasis)
                ? `${responsiveFormatFacade.ResponsiveFormatFacade.formatCustom(flexBasis)}`
                : undefined,
        };
    }
}

exports.formatFlexStyles = formatFlexStyles;
