import { jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import { c as cx } from './index-De1g9FRV.js';
import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-DMDdfIah.js';

import './List.css';const list = "_list_10rco_2";
const item = "_item_10rco_15";
const unordered = "_unordered_10rco_36";
const ordered = "_ordered_10rco_39";
const small = "_small_10rco_44";
const large = "_large_10rco_47";
const styles = {
	list: list,
	item: item,
	unordered: unordered,
	ordered: ordered,
	small: small,
	large: large
};

const ListItem = forwardRef(
  (props, ref) => {
    const { className, children, ...rest } = props;
    return /* @__PURE__ */ jsx(
      "li",
      {
        ref,
        className: cx(styles["item"], className),
        "data-anv": "list-item",
        ...rest,
        children
      }
    );
  }
);
ListItem.displayName = "ListItem";

const List = Object.assign(
  forwardRef(
    function ListInner(props, ref) {
      const { layoutStyles, componentProps } = useLayoutPropsUtil(props);
      const {
        className,
        children,
        variant = "unordered",
        size = "medium",
        style,
        ...rest
      } = componentProps;
      const listClasses = cx(styles["list"], className, {
        [styles["unordered"]]: variant === "unordered",
        [styles["ordered"]]: variant === "ordered",
        [styles["small"]]: size === "small",
        [styles["large"]]: size === "large"
      });
      const styleCombined = {
        ...style,
        ...layoutStyles
      };
      if (variant === "ordered") {
        return /* @__PURE__ */ jsx(
          "ol",
          {
            ref,
            className: listClasses,
            style: styleCombined,
            "data-anv": "list",
            ...rest,
            children
          }
        );
      }
      return /* @__PURE__ */ jsx(
        "ul",
        {
          ref,
          className: listClasses,
          style: styleCombined,
          "data-anv": "list",
          ...rest,
          children
        }
      );
    }
  ),
  {
    /**
     * ListItem component for individual items within a List.
     *
     * Features:
     * - Renders as a semantic list item (li)
     * - Supports layout and styling via standard HTML attributes
     *
     * @example
     * <List.Item>Item content</List.Item>
     */
    Item: ListItem
  }
);
List.displayName = "List";

export { List as L };
//# sourceMappingURL=List--KhCpjZn.js.map
