import type { ActionSet, ActionDefinition } from '../types'; /** * ActionSet for theme switching actions. */ export class ThemeActionSet implements ActionSet { readonly id = 'theme'; constructor( private setTheme: ( theme: 'light' | 'dark' | ((prev: 'light' | 'dark') => 'light' | 'dark'), ) => void, ) {} getActions(): ActionDefinition[] { return [ { id: 'toggle', name: 'Toggle theme', description: 'Switch between light and dark mode', execute: () => this.setTheme((prev) => (prev === 'light' ? 'dark' : 'light')), }, ]; } }