/**
 * Built-in Commands Index
 *
 * Export all built-in command definitions and registration functions.
 */

// Import register functions for use in registerBuiltinCommands
import { registerViewportCommands as _registerViewportCommands } from './viewport-commands';
import { registerSelectionCommands as _registerSelectionCommands } from './selection-commands';
import { registerHistoryCommands as _registerHistoryCommands } from './history-commands';
import { registerLayoutCommands as _registerLayoutCommands } from './layout-commands';
import { registerClipboardCommands as _registerClipboardCommands } from './clipboard-commands';
import { registerGroupCommands as _registerGroupCommands } from './group-commands';
import { registerSearchCommands as _registerSearchCommands } from './search-commands';
import { registerMergeCommands as _registerMergeCommands } from './merge-commands';
import { registerSerializationCommands as _registerSerializationCommands } from './serialization-commands';

// Viewport commands
export {
	fitToViewCommand,
	fitSelectionCommand,
	resetViewportCommand,
	zoomInCommand,
	zoomOutCommand,
	registerViewportCommands,
} from './viewport-commands';

// Selection commands
export {
	selectAllCommand,
	clearSelectionCommand,
	invertSelectionCommand,
	registerSelectionCommands,
} from './selection-commands';

// History commands
export { undoCommand, redoCommand, registerHistoryCommands } from './history-commands';

// Layout commands
export {
	forceLayoutCommand,
	treeLayoutCommand,
	gridLayoutCommand,
	horizontalLayoutCommand,
	registerLayoutCommands,
} from './layout-commands';

// Clipboard commands
export {
	copyCommand,
	cutCommand,
	pasteCommand,
	duplicateCommand,
	deleteSelectedCommand,
	registerClipboardCommands,
} from './clipboard-commands';

// Group commands
export {
	groupNodesCommand,
	ungroupNodesCommand,
	collapseGroupCommand,
	expandGroupCommand,
	registerGroupCommands,
} from './group-commands';

// Search commands
export {
	searchNodesCommand,
	clearSearchCommand,
	registerSearchCommands,
} from './search-commands';

// Merge commands
export {
	mergeNodesCommand,
	registerMergeCommands,
} from './merge-commands';

// Serialization commands (v1.3)
export {
	exportCanvasCommand,
	importCanvasCommand,
	registerSerializationCommands,
} from './serialization-commands';

/**
 * Register all built-in commands.
 * Call this once during app initialization to make built-in commands available.
 */
export function registerBuiltinCommands(): void {
	_registerViewportCommands();
	_registerSelectionCommands();
	_registerHistoryCommands();
	_registerLayoutCommands();
	_registerClipboardCommands();
	_registerGroupCommands();
	_registerSearchCommands();
	_registerMergeCommands();
	_registerSerializationCommands();
}
