import { useEffect, useState } from "react";
// Each logical pixel = 2 SVG units on a 20×30 grid → 40×60 viewBox
const P = 2;
const r = (x: number, y: number, w: number, h: number, c: string) =>
;
// Team Manager — professional woman in navy business suit
const SK = "#fde8c8"; // skin
const SK2 = "#e8c8a0"; // skin shadow
const HR = "#110808"; // very dark brown hair
const BN = "#1e1010"; // bun highlight
const JK = "#1a2050"; // navy jacket
const LJK = "#2a305e"; // jacket lapel/highlight
const WT = "#f0eef0"; // white blouse
const SKT = "#0d0d28"; // dark skirt
const LE = "#fde8c8"; // leg skin
const HE = "#080810"; // black heels
const STK = "#8b5e3c"; // wooden stick (brown)
const STK2 = "#6b4020"; // stick shadow
const O = "#08080c"; // outline
const LR = "#d07080"; // lip colour
const CB = "#d4a860"; // clipboard tan
const CBL = "#8b6830"; // clipboard border
export type ManagerState = "idle" | "walking" | "inspecting" | "poking" | "writing";
export type ManagerDirection = "right" | "left" | "up" | "down";
interface Props {
state?: ManagerState;
direction?: ManagerDirection;
scale?: number;
}
export function ManagerFigure({ state = "idle", direction = "right", scale = 1 }: Props) {
const [blink, setBlink] = useState(false);
const [pokeFwd, setPokeFwd] = useState(false);
useEffect(() => {
const t = setInterval(() => {
setBlink(true);
setTimeout(() => setBlink(false), 100);
}, 3200 + Math.random() * 2000);
return () => clearInterval(t);
}, []);
// Poke pulse animation
useEffect(() => {
if (state !== "poking") { setPokeFwd(false); return; }
let on = true;
const cycle = () => {
if (!on) return;
setPokeFwd(true);
setTimeout(() => { if (on) { setPokeFwd(false); setTimeout(() => { if (on) cycle(); }, 400); } }, 350);
};
cycle();
return () => { on = false; };
}, [state]);
const isWalking = state === "walking";
const isPoking = state === "poking";
const isWriting = state === "writing";
const isInspect = state === "inspecting";
// Flip for left/up direction
const flip = direction === "left" || direction === "up";
// Stick x offset when poking
const stickX = pokeFwd ? 17 : 14;
return (
);
}