import { PERMS } from "@/lib/permission-slugs";
import type { HousekeepingPageInput } from "../../../route-handlers";
import { economyQuery } from "../queries/catalog";
import { EconomyCommandForm } from "./economy-command-form";
import {
EconomyPageFrame,
type EconomyPageProps,
parseEconomyListInput,
} from "./economy-page-frame";
export function EconomyItemsPage(props: EconomyPageProps) {
const edit = props.context.has(PERMS.CATALOG_EDIT) ? (
) : null;
return (
);
}
export async function renderEconomyItemsPage(input: HousekeepingPageInput) {
const routeId = input.match.routeId as EconomyPageProps["routeId"];
const result = await economyQuery.run(input.context, {
routeId: routeId ?? "economy.items.overview",
params: input.match.params,
list: parseEconomyListInput(input.searchParams ?? {}),
});
return (
);
}