import { cnb } from "cnbuilder";
import { listItem } from "../list/listItemStyles.js";
import { bem } from "../utils/bem.js";
const treeStyles = bem("rmd-tree");
const treeItemStyles = bem("rmd-tree-item");
const treeGroupStyles = bem("rmd-tree-group");
/**
 * Apply the `className`s for a tree component. This will be type-safe if using
 * typescript.
 *
 * @since 6.0.0
 */ export function tree(options = {}) {
    const { className } = options;
    return cnb(treeStyles(), className);
}
/**
 * Apply the `className`s for a tree item component. This will be type-safe if
 * using typescript.
 *
 * @since 6.0.0
 */ export function treeItem(options = {}) {
    const { className, expander = false, expanderLeft = false } = options;
    return cnb(treeItemStyles({
        "expander-left": expander && expanderLeft,
        "expander-right": expander && !expanderLeft
    }), className);
}
/**
 * @since 6.0.0
 */ export function treeItemContent(options = {}) {
    const { className, link = false, focused, selected, disabled = false, ...remaining } = options;
    return cnb(treeItemStyles("content", {
        link,
        focused,
        selected,
        disabled
    }), listItem({
        className,
        disabled,
        ...remaining
    }));
}
/**
 * @since 6.0.0
 */ export function treeItemMedia(options) {
    const { isLeafNode, isMediaLeftAddon, className } = options;
    return cnb(isMediaLeftAddon && treeItemStyles("media", {
        single: isLeafNode
    }), className);
}
/**
 * @since 6.0.0
 */ export function treeGroup(options = {}) {
    const { className } = options;
    return cnb(treeGroupStyles(), className);
}

//# sourceMappingURL=styles.js.map