import { toIntegrationCatalogModel, type IntegrationCatalogData, type IntegrationCatalogModel } from "@hivegrid/view-models"; import { renderIntegrationsCatalog } from "@hivegrid/ui-subframe"; import { defineAdapter } from "./defineAdapter.js"; /** * Normalizes the domain {@link IntegrationCatalogData} into the * {@link IntegrationCatalogModel} prop-model the UI implementation renders * (M015). Reuses the VM's pure `toIntegrationCatalogModel` mapper so the * Subframe / mock renderers stay dumb and swappable (M017 hot-swap drill). * Backs the integrations catalog main view (R-P5, D-P5 A6). */ export function toIntegrationsCatalogProps(vm: IntegrationCatalogData): IntegrationCatalogModel { return toIntegrationCatalogModel(vm); } export const integrationsCatalogAdapter = defineAdapter({ name: "integrationsCatalog", toProps: toIntegrationsCatalogProps, defaultRenderer: renderIntegrationsCatalog, });