import { jsx as _jsx } from "react/jsx-runtime";
import { cnb } from "cnbuilder";
import { forwardRef } from "react";
import { bem } from "../utils/bem.js";
import { ListItemText } from "./ListItemText.js";
const styles = bem("rmd-list-subheader");
/**
 * @remarks \@since 6.0.0
 */ export function listSubheader(options = {}) {
    const { inset = false, className } = options;
    return cnb(styles({
        inset
    }), className);
}
/**
 * **Server Component**
 *
 * The `ListSubheader` is a wrapper for the `<li>` element to apply subheader
 * typography styles and {@link ListItemText} layout.
 */ export const ListSubheader = /*#__PURE__*/ forwardRef(function ListSubheader(props, ref) {
    const { role = "presentation", inset = false, className, children, textProps, ...remaining } = props;
    return /*#__PURE__*/ _jsx("li", {
        ...remaining,
        ref: ref,
        role: role,
        className: listSubheader({
            inset,
            className
        }),
        children: /*#__PURE__*/ _jsx(ListItemText, {
            ...textProps,
            children: children
        })
    });
});

//# sourceMappingURL=ListSubheader.js.map