import { cnb } from "cnbuilder";
/**
 * This is used to apply css utility functions to any element within your
 * application such as:
 * - specific theme colors as background, text, or outline color
 * - removing margin
 * - screen reader visible only text
 * - text-align, text-decoration, text-transform, font-style, font-weight
 * - disable line wrap
 *
 * @since 6.0.0
 */ export function cssUtils(options) {
    const { className, srOnly, textColor, outlineColor, backgroundColor, surface, surfaceColor, margin, fontStyle, fontWeight, textAlign, textDecoration, textTransform, textOverflow } = options;
    const isMarginTop = margin === "top";
    const isTextColor = textColor === "text-primary" || textColor === "text-secondary" || textColor === "text-hint" || textColor === "text-disabled";
    return cnb(!backgroundColor && !isTextColor && textColor && `rmd-${textColor}-color`, !backgroundColor && isTextColor && `rmd-${textColor}-color`, backgroundColor && "rmd-background-container", backgroundColor && backgroundColor !== "current-color" && backgroundColor !== "surface" && `rmd-${backgroundColor}-container`, outlineColor && "rmd-outline", outlineColor && `rmd-${outlineColor}-outline`, (isMarginTop || margin === "bottom") && `rmd-no-margin-${isMarginTop ? "bottom" : "top"}`, margin === "none" && "rmd-no-margin", margin === "centered" && "rmd-centered", textAlign && `rmd-align-${textAlign}`, textDecoration && `rmd-${textDecoration}`, textTransform && `rmd-${textTransform}`, fontStyle && `rmd-${fontStyle}`, fontWeight && `rmd-${fontWeight}`, srOnly && srOnly !== "phone" && "rmd-sr-only", srOnly === "phone" && "rmd-phone-sr-only", srOnly === "focusable" && "rmd-sr-only--focusable", surfaceColor === "light" && "rmd-light-surface", surfaceColor === "dark" && "rmd-dark-surface", textOverflow && textOverflow !== "allow" && "rmd-nowrap", textOverflow === "ellipsis" && "rmd-ellipsis", surface && "rmd-interaction-surface", className);
}

//# sourceMappingURL=cssUtils.js.map