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

18 lines (17 loc) • 453 B
JavaScript
import { useMemo as t } from "../../../external/preact/hooks/dist/hooks.module.js";
import u from "../../../core/Context/useCoreContext.js";
import { uuid as n } from "../../../utils/random/uuid.js";
const c = (r) => {
const { i18n: o } = u();
return t(() => r.map((e) => ({
key: e.key,
value: e.value,
id: n(),
label: o.get(e.key),
type: e.type,
config: e.config
})), [o, r]);
};
export {
c as useStructuredListItems
};