@adyen/adyen-platform-experience-web
Version:

37 lines (36 loc) • 1.15 kB
JavaScript
import { jsx as r } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { useEffect as C } from "../../../external/preact/hooks/dist/hooks.module.js";
import { popoverUtil as h } from "../Popover/utils/popoverUtil.js";
import s from "../../../core/Context/useCoreContext.js";
import M from "../Modal/ModalContent/ModalContent.js";
import a from "../Modal/Modal.js";
const O = ({
children: i,
className: p,
selectedDetail: o,
resetDetails: f,
dataCustomization: u
}) => {
const { i18n: m } = s(), n = !!o;
return C(() => {
n && h.closeAll();
}, [n]), /* @__PURE__ */ r("div", { className: p, children: [
i,
o && /* @__PURE__ */ r(
a,
{
title: o != null && o.title ? m.get(o.title) : void 0,
isOpen: !!o,
"aria-label": m.get("payoutDetails"),
onClose: f,
isDismissible: !0,
headerWithBorder: !1,
size: (o == null ? void 0 : o.modalSize) ?? "large",
children: o && /* @__PURE__ */ r(M, { dataCustomization: { details: u }, ...o == null ? void 0 : o.selection })
}
)
] });
};
export {
O as DataDetailsModal
};