namespace DragonISO.App.Services;

// /teams/* route handlers â€” UIAutomation-driven in-call controls.
//
//   POST /teams/mute         â†’ InvokeTeams(ToggleMute, "mute")
//   POST /teams/camera       â†’ InvokeTeams(ToggleCamera, "camera")
//   POST /teams/leave        â†’ InvokeTeams(LeaveCall, "leave")
//   POST /teams/share        â†’ InvokeTeams(OpenShareTray, "share")
//   POST /teams/raise-hand   â†’ InvokeTeams(ToggleRaiseHand, "raise-hand")
public sealed partial class ControlSurfaceServer
{
    private object InvokeTeams(Func<TeamsControlBridge.InvokeResult> invoke, string action)
    {
        var result = invoke();
        return new
        {
            ok = result == TeamsControlBridge.InvokeResult.Invoked,
            action,
            result = result.ToString(),
        };
    }
}
