import { i as isNonNullable } from './type-guard-152070e9.js';
import { R as ResponsiveFormatFacade } from './responsive-format-facade-e9926018.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 (isNonNullable(flex)) {
    return { flex: `${ResponsiveFormatFacade.formatCustom(flex)}` };
  }
  else {
    return {
      flexGrow: isNonNullable(flexGrow)
        ? `${ResponsiveFormatFacade.formatCustom(flexGrow)}`
        : undefined,
      flexShrink: isNonNullable(flexShrink)
        ? `${ResponsiveFormatFacade.formatCustom(flexShrink)}`
        : undefined,
      flexBasis: isNonNullable(flexBasis)
        ? `${ResponsiveFormatFacade.formatCustom(flexBasis)}`
        : undefined,
    };
  }
}

export { formatFlexStyles as f };
