import g from "./index-objectWithoutPropertiesLoose.js";
import n from "./index-extends.js";
import * as S from "react";
import o from "./index-_virtual16.js";
import { clsx as h } from "./index-clsx.js";
import k from "./index-styled.js";
import { getListSubheaderUtilityClass as x } from "./index-listSubheaderClasses.js";
import { jsx as L } from "react/jsx-runtime";
import { useDefaultProps as v } from "./index-DefaultPropsProvider.js";
import p from "./index-capitalize.js";
import R from "./index-composeClasses.js";
const G = ["className", "color", "component", "disableGutters", "disableSticky", "inset"], N = (e) => {
  const {
    classes: t,
    color: r,
    disableGutters: s,
    inset: a,
    disableSticky: l
  } = e, i = {
    root: ["root", r !== "default" && `color${p(r)}`, !s && "gutters", a && "inset", !l && "sticky"]
  };
  return R(i, x, t);
}, T = k("li", {
  name: "MuiListSubheader",
  slot: "Root",
  overridesResolver: (e, t) => {
    const {
      ownerState: r
    } = e;
    return [t.root, r.color !== "default" && t[`color${p(r.color)}`], !r.disableGutters && t.gutters, r.inset && t.inset, !r.disableSticky && t.sticky];
  }
})(({
  theme: e,
  ownerState: t
}) => n({
  boxSizing: "border-box",
  lineHeight: "48px",
  listStyle: "none",
  color: (e.vars || e).palette.text.secondary,
  fontFamily: e.typography.fontFamily,
  fontWeight: e.typography.fontWeightMedium,
  fontSize: e.typography.pxToRem(14)
}, t.color === "primary" && {
  color: (e.vars || e).palette.primary.main
}, t.color === "inherit" && {
  color: "inherit"
}, !t.disableGutters && {
  paddingLeft: 16,
  paddingRight: 16
}, t.inset && {
  paddingLeft: 72
}, !t.disableSticky && {
  position: "sticky",
  top: 0,
  zIndex: 1,
  backgroundColor: (e.vars || e).palette.background.paper
})), d = /* @__PURE__ */ S.forwardRef(function(t, r) {
  const s = v({
    props: t,
    name: "MuiListSubheader"
  }), {
    className: a,
    color: l = "default",
    component: i = "li",
    disableGutters: u = !1,
    disableSticky: f = !1,
    inset: m = !1
  } = s, b = g(s, G), c = n({}, s, {
    color: l,
    component: i,
    disableGutters: u,
    disableSticky: f,
    inset: m
  }), y = N(c);
  return /* @__PURE__ */ L(T, n({
    as: i,
    className: h(y.root, a),
    ref: r,
    ownerState: c
  }, b));
});
d.muiSkipListHighlight = !0;
process.env.NODE_ENV !== "production" && (d.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The content of the component.
   */
  children: o.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: o.object,
  /**
   * @ignore
   */
  className: o.string,
  /**
   * The color of the component. It supports those theme colors that make sense for this component.
   * @default 'default'
   */
  color: o.oneOf(["default", "inherit", "primary"]),
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: o.elementType,
  /**
   * If `true`, the List Subheader will not have gutters.
   * @default false
   */
  disableGutters: o.bool,
  /**
   * If `true`, the List Subheader will not stick to the top during scroll.
   * @default false
   */
  disableSticky: o.bool,
  /**
   * If `true`, the List Subheader is indented.
   * @default false
   */
  inset: o.bool,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
});
export {
  d as default
};
