const commands = [
    {
        target: 'all',
        label: 'Expand all',
        execute: (ctx) => {
            const menu = ctx.root;
            menu.expandAll();
        },
    },
    {
        target: 'all',
        label: 'Collapse all',
        execute: (ctx) => {
            const menu = ctx.root;
            menu.collapseAll();
        },
    },
    {
        target: 'endpoints',
        label: 'Expand all endpoints',
        execute: (ctx) => {
            const menu = ctx.root;
            menu.expandAllEndpoints();
        },
    },
    {
        target: 'endpoints',
        label: 'Collapse all endpoints',
        execute: (ctx) => {
            const menu = ctx.root;
            menu.collapseAllEndpoints();
        },
    },
    {
        target: 'endpoints',
        label: 'Layout',
        execute: (ctx) => {
            const { item } = ctx;
            if (!item.id) {
                return;
            }
            const menu = ctx.root;
            if (item.id === 'off') {
                menu.layout = undefined;
            }
            else {
                menu.layout = item.id;
            }
        },
        children: [
            {
                label: 'None',
                id: 'off',
            },
            {
                label: 'Tree',
                id: 'tree',
            },
            {
                label: 'Natural',
                id: 'natural'
            },
            {
                label: 'Natural (sorted)',
                id: 'natural-sort',
            }
        ],
    },
];
export default commands;
//# sourceMappingURL=ApiNavigationCommands.js.map