// Auto-generated by generate-intent-tools.mjs — do not edit
export function dispatchIntentTool(toolName, args, execute) {
    switch (toolName) {
        case 'superdoc_get_content': {
            const { action, ...rest } = args;
            switch (action) {
                case 'text': return execute('doc.getText', rest);
                case 'markdown': return execute('doc.getMarkdown', rest);
                case 'html': return execute('doc.getHtml', rest);
                case 'info': return execute('doc.info', rest);
                case 'extract': return execute('doc.extract', rest);
                case 'blocks': return execute('doc.blocks.list', rest);
                default: throw new Error(`Unknown action for superdoc_get_content: ${action}`);
            }
        }
        case 'superdoc_edit': {
            const { action, ...rest } = args;
            switch (action) {
                case 'insert': return execute('doc.insert', rest);
                case 'replace': return execute('doc.replace', rest);
                case 'delete': return execute('doc.delete', rest);
                case 'undo': return execute('doc.history.undo', rest);
                case 'redo': return execute('doc.history.redo', rest);
                default: throw new Error(`Unknown action for superdoc_edit: ${action}`);
            }
        }
        case 'superdoc_format': {
            const { action, ...rest } = args;
            switch (action) {
                case 'inline': return execute('doc.format.apply', rest);
                case 'set_style': return execute('doc.styles.paragraph.setStyle', rest);
                case 'set_alignment': return execute('doc.format.paragraph.setAlignment', rest);
                case 'set_indentation': return execute('doc.format.paragraph.setIndentation', rest);
                case 'set_spacing': return execute('doc.format.paragraph.setSpacing', rest);
                case 'set_flow_options': return execute('doc.format.paragraph.setFlowOptions', rest);
                case 'set_direction': return execute('doc.format.paragraph.setDirection', rest);
                default: throw new Error(`Unknown action for superdoc_format: ${action}`);
            }
        }
        case 'superdoc_create': {
            const { action, ...rest } = args;
            switch (action) {
                case 'paragraph': return execute('doc.create.paragraph', rest);
                case 'heading': return execute('doc.create.heading', rest);
                case 'table': return execute('doc.create.table', rest);
                default: throw new Error(`Unknown action for superdoc_create: ${action}`);
            }
        }
        case 'superdoc_list': {
            const { action, ...rest } = args;
            switch (action) {
                case 'insert': return execute('doc.lists.insert', rest);
                case 'create': return execute('doc.lists.create', rest);
                case 'attach': return execute('doc.lists.attach', rest);
                case 'detach': return execute('doc.lists.detach', rest);
                case 'delete': return execute('doc.lists.delete', rest);
                case 'indent': return execute('doc.lists.indent', rest);
                case 'outdent': return execute('doc.lists.outdent', rest);
                case 'merge': return execute('doc.lists.merge', rest);
                case 'split': return execute('doc.lists.split', rest);
                case 'set_level': return execute('doc.lists.setLevel', rest);
                case 'set_value': return execute('doc.lists.setValue', rest);
                case 'continue_previous': return execute('doc.lists.continuePrevious', rest);
                case 'set_type': return execute('doc.lists.setType', rest);
                default: throw new Error(`Unknown action for superdoc_list: ${action}`);
            }
        }
        case 'superdoc_comment': {
            const { action, ...rest } = args;
            switch (action) {
                case 'create': return execute('doc.comments.create', rest);
                case 'update': return execute('doc.comments.patch', rest);
                case 'delete': return execute('doc.comments.delete', rest);
                case 'get': return execute('doc.comments.get', rest);
                case 'list': return execute('doc.comments.list', rest);
                default: throw new Error(`Unknown action for superdoc_comment: ${action}`);
            }
        }
        case 'superdoc_track_changes': {
            const { action, ...rest } = args;
            switch (action) {
                case 'list': return execute('doc.trackChanges.list', rest);
                case 'decide': return execute('doc.trackChanges.decide', rest);
                default: throw new Error(`Unknown action for superdoc_track_changes: ${action}`);
            }
        }
        case 'superdoc_search':
            return execute('doc.query.match', args);
        case 'superdoc_mutations': {
            const { action, ...rest } = args;
            switch (action) {
                case 'preview': return execute('doc.mutations.preview', rest);
                case 'apply': return execute('doc.mutations.apply', rest);
                default: throw new Error(`Unknown action for superdoc_mutations: ${action}`);
            }
        }
        case 'superdoc_table': {
            const { action, ...rest } = args;
            switch (action) {
                case 'delete': return execute('doc.tables.delete', rest);
                case 'set_layout': return execute('doc.tables.setLayout', rest);
                case 'insert_row': return execute('doc.tables.insertRow', rest);
                case 'delete_row': return execute('doc.tables.deleteRow', rest);
                case 'set_row': return execute('doc.tables.setRowHeight', rest);
                case 'set_row_options': return execute('doc.tables.setRowOptions', rest);
                case 'insert_column': return execute('doc.tables.insertColumn', rest);
                case 'delete_column': return execute('doc.tables.deleteColumn', rest);
                case 'set_column': return execute('doc.tables.setColumnWidth', rest);
                case 'merge_cells': return execute('doc.tables.mergeCells', rest);
                case 'unmerge_cells': return execute('doc.tables.unmergeCells', rest);
                case 'set_cell': return execute('doc.tables.setCellProperties', rest);
                case 'set_cell_text': return execute('doc.tables.setCellText', rest);
                case 'set_shading': return execute('doc.tables.setShading', rest);
                case 'set_style_options': return execute('doc.tables.applyStyle', rest);
                case 'set_borders': return execute('doc.tables.setBorders', rest);
                case 'set_options': return execute('doc.tables.setTableOptions', rest);
                default: throw new Error(`Unknown action for superdoc_table: ${action}`);
            }
        }
        default:
            throw new Error(`Unknown intent tool: ${toolName}`);
    }
}
