import type { BoardSize, OldmarrConfig } from "@homarr/old-schema"; import { mapApp, mapWidget } from "../mappers/map-item"; export const prepareItems = ( { apps, widgets }: Pick, boardSize: BoardSize, appsMap: Map, sectionMap: Map, ) => widgets .map((widget) => mapWidget(widget, boardSize, appsMap, sectionMap)) .concat(apps.map((app) => mapApp(app, boardSize, appsMap, sectionMap))) .filter((widget) => widget !== null);