"use strict";
const jsxRuntime = require("react/jsx-runtime");
const styles_lib_css_atoms_sprinkles_css_cjs = require("../../css/atoms/sprinkles.css.cjs");
const styles_lib_components_Accordion_Accordion_cjs = require("./Accordion.cjs");
const styles_lib_themes_wireframe_wireframeTheme_css_cjs = require("../../themes/wireframe/wireframeTheme.css.cjs");
const spaceScale = ["none", ...Object.keys(styles_lib_themes_wireframe_wireframeTheme_css_cjs.wireframe.space.space)];
const filterSpace = (space) => {
  const filteredSpace = styles_lib_css_atoms_sprinkles_css_cjs.mapResponsiveValue(space, (value) => {
    if (spaceScale.includes(value) && !styles_lib_components_Accordion_Accordion_cjs.validSpaceValues.includes(value)) {
      throw new Error(
        `To ensure adequate space for touch targets, 'space' prop values must be one of the following: ${styles_lib_components_Accordion_Accordion_cjs.validSpaceValues.map((x) => `"${x}"`).join(", ")}`
      );
    }
    return styles_lib_components_Accordion_Accordion_cjs.validSpaceValues.includes(value) ? value : "medium";
  });
  return filteredSpace;
};
const Accordion = ({
  space,
  size,
  tone,
  weight,
  ...restProps
}) => /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Accordion_Accordion_cjs.Accordion,
  {
    size: typeof size === "boolean" ? void 0 : size,
    tone: typeof tone === "boolean" ? void 0 : tone,
    weight: typeof weight === "boolean" ? void 0 : weight,
    space: typeof space === "string" || Array.isArray(space) ? filterSpace(space) : void 0,
    ...restProps
  }
);
exports.Accordion = Accordion;
