import type { ModuleManifest } from "../_core/module"; import { loadContainerForShare, type ContainerShareData } from "./server/share-queries"; import { searchContainers } from "./server/queries"; const gardenManifest: ModuleManifest = { id: "garden", name: "Garden", nav: { href: "/garden", label: "Garden", icon: "sprout" }, entities: [ { type: "garden.container", label: { singular: "Container", plural: "Containers" }, share: { canShare: true, defaultCapabilities: ["read"] }, search: { search: searchContainers }, resolveUrl: (id) => `/garden/containers/${id}`, loadForShare: (id) => loadContainerForShare(id), renderSharedView: ({ data }) => { const d = data as ContainerShareData; return (
{d.type}
{d.locationNotes &&{d.locationNotes}
} {d.plants.length > 0 && (Plants