import h from "./index-objectWithoutPropertiesLoose.js";
import i from "./index-extends.js";
import * as p from "react";
import e from "./index-_virtual16.js";
import { clsx as P } from "./index-clsx.js";
import x from "./index-styled.js";
import L from "./index-ListContext.js";
import { getListUtilityClass as v } from "./index-listClasses.js";
import { jsx as y, jsxs as T } from "react/jsx-runtime";
import { useDefaultProps as j } from "./index-DefaultPropsProvider.js";
import N from "./index-composeClasses.js";
const R = ["children", "className", "component", "dense", "disablePadding", "subheader"], C = (s) => {
  const {
    classes: o,
    disablePadding: t,
    dense: r,
    subheader: n
  } = s;
  return N({
    root: ["root", !t && "padding", r && "dense", n && "subheader"]
  }, v, o);
}, O = x("ul", {
  name: "MuiList",
  slot: "Root",
  overridesResolver: (s, o) => {
    const {
      ownerState: t
    } = s;
    return [o.root, !t.disablePadding && o.padding, t.dense && o.dense, t.subheader && o.subheader];
  }
})(({
  ownerState: s
}) => i({
  listStyle: "none",
  margin: 0,
  padding: 0,
  position: "relative"
}, !s.disablePadding && {
  paddingTop: 8,
  paddingBottom: 8
}, s.subheader && {
  paddingTop: 0
})), _ = /* @__PURE__ */ p.forwardRef(function(o, t) {
  const r = j({
    props: o,
    name: "MuiList"
  }), {
    children: n,
    className: a,
    component: c = "ul",
    dense: d = !1,
    disablePadding: m = !1,
    subheader: u
  } = r, f = h(r, R), b = p.useMemo(() => ({
    dense: d
  }), [d]), l = i({}, r, {
    component: c,
    dense: d,
    disablePadding: m
  }), g = C(l);
  return /* @__PURE__ */ y(L.Provider, {
    value: b,
    children: /* @__PURE__ */ T(O, i({
      as: c,
      className: P(g.root, a),
      ref: t,
      ownerState: l
    }, f, {
      children: [u, n]
    }))
  });
});
process.env.NODE_ENV !== "production" && (_.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: e.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object,
  /**
   * @ignore
   */
  className: e.string,
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: e.elementType,
  /**
   * If `true`, compact vertical padding designed for keyboard and mouse input is used for
   * the list and list items.
   * The prop is available to descendant components as the `dense` context.
   * @default false
   */
  dense: e.bool,
  /**
   * If `true`, vertical padding is removed from the list.
   * @default false
   */
  disablePadding: e.bool,
  /**
   * The content of the subheader, normally `ListSubheader`.
   */
  subheader: e.node,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
});
export {
  _ as default
};
