/**
 * The `tera:` office catalogue — every built-in asset, in one list.
 *
 * Importing this module registers all of them into the shared `kit`, which is
 * what `kit.ts` says that registry is for. A self-hoster who wants their own
 * registry instead calls `registerOfficeAssets(mine)`; one who wants ours plus
 * theirs registers `acme:desk.standing` with `overrides: "tera:desk.workstation"`
 * afterwards and every desk in every pack becomes theirs, with no fork.
 *
 * ### What is deliberately not here
 *
 * There is no `shell.wall`, `shell.door` or `shell.window` (CONTRACT.md §2).
 * Walls are the `Floorplan`'s wall runs and a door or a window is an `Opening`
 * punched out of one; `Plan` hands each solid run left over to the `wallRun`
 * part in `parts.ts`. Shipping door props beside door-shaped holes would put
 * every opening in the scene twice, or — worse, because it is invisible until
 * somebody walks through a wall — leave the collider with no gap where the door
 * is.
 *
 * Seventeen assets is not a furniture catalogue and is not trying to be. It is
 * the set that gets a real floor plate looking like an office: somewhere to
 * work, somewhere to sit, somewhere to meet, somewhere to put things, something
 * to look at, something alive, and light.
 */

import { kit, type AnyAsset, type AssetRegistry } from "../kit.ts";
import { deskPartition, deskPedestal, deskWorkstation } from "./desks.ts";
import { plantPotted, plantTall } from "./greenery.ts";
import { lightPendant, lightTroffer } from "./lighting.ts";
import { robotOptimus } from "./optimus.ts";
import { screenMonitor, screenWallDisplay } from "./screens.ts";
import { seatLounge, seatTaskChair } from "./seating.ts";
import { storageLocker, storageShelf } from "./storage.ts";
import { rug, whiteboard } from "./surfaces.ts";
import { tableMeeting, tableSide } from "./tables.ts";

export const OFFICE_ASSETS: readonly AnyAsset[] = [
  deskWorkstation,
  deskPedestal,
  deskPartition,
  seatTaskChair,
  seatLounge,
  tableMeeting,
  tableSide,
  storageShelf,
  storageLocker,
  screenMonitor,
  screenWallDisplay,
  plantPotted,
  plantTall,
  lightPendant,
  lightTroffer,
  robotOptimus,
  rug,
  whiteboard,
];

/** Register the built-in catalogue into a registry. Defaults to the shared one. */
export function registerOfficeAssets(registry: AssetRegistry = kit): AssetRegistry {
  return registry.registerAll(OFFICE_ASSETS);
}

registerOfficeAssets();

export {
  deskPartition,
  deskPedestal,
  deskWorkstation,
  lightPendant,
  lightTroffer,
  robotOptimus,
  plantPotted,
  plantTall,
  rug,
  screenMonitor,
  screenWallDisplay,
  seatLounge,
  seatTaskChair,
  storageLocker,
  storageShelf,
  tableMeeting,
  tableSide,
  whiteboard,
};
