33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
'use client';
|
|
|
|
import type { Action, GameView } from '@/game/engine';
|
|
import { Button } from '@/components/ui/button';
|
|
|
|
/** The projection is owner-only and remains visible outside the market. */
|
|
export function ChoamMarketAuto({ game, act, busy }: {
|
|
game: GameView;
|
|
act: (action: Action) => void;
|
|
busy: boolean;
|
|
}) {
|
|
if (!game.choamMarketSkipActive) return null;
|
|
return (
|
|
<section className="notice" aria-label="CHOAM market preference">
|
|
<p>
|
|
Your remaining markets this turn will be skipped, including other sales
|
|
and trades and opportunities to receive gifts. A current-turn
|
|
Truthtrance answer or pending paid deal keeps the market open. Cancel
|
|
this choice to use a future market; you can enable it again only from a
|
|
future market.
|
|
</p>
|
|
<Button
|
|
className="game-action"
|
|
variant="outline"
|
|
disabled={busy}
|
|
onClick={() => { if (!busy) act({ type: 'cancelChoamMarketSkip' }); }}
|
|
>
|
|
Cancel skipping remaining markets
|
|
</Button>
|
|
</section>
|
|
);
|
|
}
|