"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
require("clsx");
const useProps = require("../../../core/MantineProvider/use-props/use-props.cjs");
const factory = require("../../../core/factory/factory.cjs");
const Collapse = require("../../Collapse/Collapse.cjs");
const Accordion_context = require("../Accordion.context.cjs");
const AccordionItem_context = require("../AccordionItem.context.cjs");
const Accordion_module_css = require("../Accordion.module.css.cjs");
const defaultProps = {};
const AccordionPanel = factory.factory((props, ref) => {
  const { classNames, className, style, styles, vars, children, ...others } = useProps.useProps(
    "AccordionPanel",
    defaultProps,
    props
  );
  const { value } = AccordionItem_context.useAccordionItemContext();
  const ctx = Accordion_context.useAccordionContext();
  return /* @__PURE__ */ jsxRuntime.jsx(
    Collapse.Collapse,
    {
      ref,
      ...ctx.getStyles("panel", { className, classNames, style, styles }),
      ...others,
      in: ctx.isItemActive(value),
      transitionDuration: ctx.transitionDuration ?? 200,
      role: "region",
      id: ctx.getRegionId(value),
      "aria-labelledby": ctx.getControlId(value),
      children: /* @__PURE__ */ jsxRuntime.jsx("div", { ...ctx.getStyles("content", { classNames, styles }), children })
    }
  );
});
AccordionPanel.displayName = "@mantine/core/AccordionPanel";
AccordionPanel.classes = Accordion_module_css.default;
exports.AccordionPanel = AccordionPanel;
