;
{
  try {
    let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
    n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "20744d5f-ef85-41af-9e58-255d052c50a8", e._sentryDebugIdIdentifier = "sentry-dbid-20744d5f-ef85-41af-9e58-255d052c50a8");
  } catch (e) {
  }
}
;
import { jsx, jsxs } from "preact/jsx-runtime";
import cx from "classnames";
import { a as useId } from "./useId-BZ0PA7jP.js";
const structuredList = "adyen-kyc-structured-list";
const structuredListSectionField = "adyen-kyc-structured-list-section-field";
const structuredListSectionLabel = "adyen-kyc-structured-list-section-label";
const structuredListSectionData = "adyen-kyc-structured-list-section-data";
const structuredListSectionDetail = "adyen-kyc-structured-list-section-detail";
const styles = {
  structuredList,
  structuredListSectionField,
  structuredListSectionLabel,
  structuredListSectionData,
  structuredListSectionDetail
};
const StructuredList = ({
  className,
  detailsGroupClassName,
  items
}) => {
  const structuredListClassNames = cx(styles.structuredList, className);
  const detailsGroupClassNames = cx(styles.structuredListSectionData, detailsGroupClassName);
  return /* @__PURE__ */ jsx("dl", { className: structuredListClassNames, children: items.map((item, index) => /* @__PURE__ */ jsx(
    StructuredListItemEl,
    {
      item,
      detailsGroupClassNames
    },
    index
  )) });
};
const StructuredListItemEl = ({
  item: { term, details },
  detailsGroupClassNames
}) => {
  const uniqueId = useId("structured-list-item");
  return /* @__PURE__ */ jsxs("div", { className: styles.structuredListSectionField, children: [
    /* @__PURE__ */ jsx("dt", { id: uniqueId, className: styles.structuredListSectionLabel, children: term }),
    Array.isArray(details) ? /* @__PURE__ */ jsx("div", { className: detailsGroupClassNames, children: details.map((detail, index) => /* @__PURE__ */ jsx(
      "dd",
      {
        "aria-labelledby": uniqueId,
        className: styles.structuredListSectionDetail,
        children: detail
      },
      index
    )) }) : /* @__PURE__ */ jsx("dd", { "aria-labelledby": uniqueId, className: detailsGroupClassNames, children: details })
  ] });
};
export {
  StructuredList as S
};
