import 'package:flutter/widgets.dart'; import '../../../../core/api_gateway.dart'; /// The pane More menu's choices that a chat row's menu also offers. enum SessionPaneAction { addPane, openChats, centerStage, moveUp, moveDown, moveLeft, moveRight, closePane, chatDetails, files, runCommand, openTerminal, dismissFinished, } /// One pane choice as the row's menu shows it: the pane's own label. A /// disabled choice stays listed, as the pane lists it (a move with no pane /// across that edge). typedef SessionPaneChoice = ({ SessionPaneAction action, String label, bool enabled, }); /// The open chat panes, as a chat row's menu reaches them. The offers are read /// when the menu opens, so they follow the panes as they are then. abstract interface class SessionPaneMenu { /// The pane More menu's choices for [session] now, in the pane's order and /// with its visibility (narrow layouts, one pane, no window or terminal). List choicesFor(BuildContext context, JsonMap session); /// Runs [action] for [session], opening the chat first where the pane's /// handler acts on an open chat. void run(BuildContext context, JsonMap session, SessionPaneAction action); }