import type { RobotOperationsDefinition } from "../../interiors/robotOperations.ts";

/** Authored, seeded demonstration operations for the public Mateo Court plan. */
export const MATEO_COURT_ROBOT_OPERATIONS = Object.freeze({
  id: "mateo-court-robot-operations",
  version: 1,
  officeId: "mateo-court",
  disclosure: "Seeded robot simulation — no live people, company activity, or operational data.",
  stations: [
    // Against the west wall of the yard, standing on `court-dock` — the
    // `tera:dock.robot` prop the pack now places at (10.15, 16.9). This used to
    // read (18.4, 13.2), which is underneath the courtyard's long table: fine
    // for as long as nothing was drawn there, and a robot standing in the lunch
    // the moment something was. The dock faces east out of the pad, which is
    // where its `facing` comes from.
    { id: "la-l1-dock", label: "Court charge dock", role: "charge", anchor: { kind: "point", levelId: "level-1", position: { x: 10.9, z: 16.9 }, facing: { x: 1, z: 0 } } },
    { id: "la-l1-paseo", label: "Paseo patrol point", role: "patrol", anchor: { kind: "room", roomId: "paseo" } },
    { id: "la-l1-mess", label: "Mess patrol point", role: "patrol", anchor: { kind: "room", roomId: "mess" } },
    { id: "la-l1-court", label: "Court patrol point", role: "patrol", anchor: { kind: "room", roomId: "court" } },
    { id: "la-l1-parcel-pickup", label: "Store shelf", role: "pickup", anchor: { kind: "prop", propId: "store-shelf-02", standoffM: 0.8, side: -1 } },
    { id: "la-l1-parcel-drop", label: "Works locker", role: "dropoff", anchor: { kind: "prop", propId: "works-locker-02", standoffM: 0.8, side: -1 } },
    { id: "la-l1-directory", label: "Paseo directory", role: "inspect", anchor: { kind: "prop", propId: "paseo-directory", standoffM: 0.7, side: -1 } },
    { id: "la-l1-display", label: "Works display", role: "inspect", anchor: { kind: "prop", propId: "works-display", standoffM: 0.72, side: -1 } },

    // The upper dock moved east out of the new `loft-b` bench, whose three
    // columns now occupy x 13.4–16.8. It stands on the `loft-dock` prop in the
    // model bay instead, beside the racks, on the one stretch of the street wall
    // upstairs with no window in it. Its bay opens south, hence the facing.
    { id: "la-l2-dock", label: "Loft charge dock", role: "charge", anchor: { kind: "point", levelId: "level-2", position: { x: 22.6, z: 1.5 }, facing: { x: 0, z: 1 } } },
    { id: "la-l2-loft", label: "Loft patrol point", role: "patrol", anchor: { kind: "room", roomId: "loft" } },
    { id: "la-l2-palmetto", label: "Palmetto patrol point", role: "patrol", anchor: { kind: "room", roomId: "palmetto" } },
    { id: "la-l2-loggia", label: "Loggia patrol point", role: "patrol", anchor: { kind: "point", levelId: "level-2", position: { x: 10.0, z: 8.0 } } },
    { id: "la-l2-parcel-pickup", label: "Loft locker", role: "pickup", anchor: { kind: "prop", propId: "loft-locker-02", standoffM: 0.8, side: -1 } },
    { id: "la-l2-parcel-drop", label: "Jesse shelf", role: "dropoff", anchor: { kind: "prop", propId: "jesse-shelf-01", standoffM: 0.78, side: -1 } },
    { id: "la-l2-display", label: "Loft display", role: "inspect", anchor: { kind: "prop", propId: "loft-display", standoffM: 0.72 } },
    { id: "la-l2-board", label: "Jesse board", role: "inspect", anchor: { kind: "prop", propId: "jesse-board-02", standoffM: 0.72, side: -1 } },
  ],
  jobs: [
    { id: "la-l1-patrol", label: "Ground-floor safety patrol", kind: "patrol", stationIds: ["la-l1-paseo", "la-l1-mess", "la-l1-court"], dwellTicks: 6 },
    { id: "la-l1-deliver", label: "Store-to-works parcel", kind: "deliver", stationIds: ["la-l1-parcel-pickup", "la-l1-parcel-drop"], dwellTicks: 9 },
    { id: "la-l1-inspect-directory", label: "Directory inspection", kind: "inspect", stationIds: ["la-l1-directory"], dwellTicks: 12 },
    { id: "la-l1-inspect-display", label: "Works display inspection", kind: "inspect", stationIds: ["la-l1-display"], dwellTicks: 14 },
    { id: "la-l1-charge", label: "Court charge cycle", kind: "charge", stationIds: ["la-l1-dock"], dwellTicks: 1 },
    { id: "la-l2-patrol", label: "Upper-floor safety patrol", kind: "patrol", stationIds: ["la-l2-loft", "la-l2-palmetto", "la-l2-loggia"], dwellTicks: 6 },
    { id: "la-l2-deliver", label: "Loft-to-Jesse parcel", kind: "deliver", stationIds: ["la-l2-parcel-pickup", "la-l2-parcel-drop"], dwellTicks: 9 },
    { id: "la-l2-inspect-display", label: "Loft display inspection", kind: "inspect", stationIds: ["la-l2-display"], dwellTicks: 14 },
    { id: "la-l2-inspect-board", label: "Jesse board inspection", kind: "inspect", stationIds: ["la-l2-board"], dwellTicks: 12 },
    { id: "la-l2-charge", label: "Loft charge cycle", kind: "charge", stationIds: ["la-l2-dock"], dwellTicks: 1 },
  ],
  robots: [
    {
      id: "la-office-activity-01",
      label: "LA office operations robot",
      levelId: "level-1",
      spawnStationId: "la-l1-dock",
      schedule: ["la-l1-deliver", "la-l1-inspect-directory", "la-l1-inspect-display", "la-l1-patrol", "la-l1-charge"],
      initialBattery: 0.7,
    },
    {
      id: "la-office-activity-02",
      label: "LA model review robot",
      levelId: "level-2",
      spawnStationId: "la-l2-dock",
      schedule: ["la-l2-deliver", "la-l2-inspect-display", "la-l2-inspect-board", "la-l2-patrol", "la-l2-charge"],
      initialBattery: 0.66,
    },
  ],
} satisfies RobotOperationsDefinition);
