import { cnb } from "cnbuilder";
import { cssUtils } from "../cssUtils.js";
import { bem } from "../utils/bem.js";
const styles = bem("rmd-list-item");
/**
 * @since 6.0.0
 */ export function listItem(options = {}) {
    const { className, link = false, height = "auto", clickable = true, multiline = false, disabled = false, disabledOpacity = false, pressedClassName } = options;
    return cnb(styles({
        link,
        [height]: height !== "auto",
        multiline,
        "disabled-color": disabled && !disabledOpacity,
        "disabled-opacity": disabled && disabledOpacity
    }), cssUtils({
        surface: clickable
    }), pressedClassName, className);
}
/**
 * @since 6.0.0
 */ export function listItemText(options = {}) {
    const { className, secondary = false, clamped = false } = options;
    return cnb(styles("text", {
        clamped: secondary && clamped,
        secondary
    }), className);
}
/**
 *
 * @since 6.0.0
 */ export function listItemAddon(options = {}) {
    const { type = "icon", position = "middle", className, addonAfter = false, disableCenteredMedia = false, disableBeforeSpacing = false } = options;
    const isMedia = type === "media" || type === "large-media";
    const isAvatar = type === "avatar";
    return cnb(styles("addon", {
        [position]: position !== "middle",
        before: !disableBeforeSpacing && !addonAfter,
        "avatar-before": !disableBeforeSpacing && !addonAfter && isAvatar,
        media: isMedia,
        "media-large": type === "large-media",
        "media-centered": isMedia && !disableCenteredMedia
    }), className);
}

//# sourceMappingURL=listItemStyles.js.map