// (C) 2025-2026 GoodData Corporation
/**
 * Creates the ConvertDashboardTabFromDefault command.
 *
 * @param title - Optional title for the new tab.
 * @param correlationId - Specify correlation id to use for this command.
 * @returns Convert dashboard tab from default command.
 *
 * @alpha
 */
export function convertDashboardTabFromDefault(title, correlationId) {
    return {
        type: "GDC.DASH/CMD.TAB.CONVERT_FROM_DEFAULT",
        correlationId,
        payload: { title },
    };
}
/**
 * Creates the SwitchDashboardTab command.
 *
 * @param tabId - identifier of the tab to switch to
 * @param correlationId - specify correlation id to use for this command
 * @returns switch dashboard tab command
 *
 * @alpha
 */
export function switchDashboardTab(tabId, correlationId) {
    return {
        type: "GDC.DASH/CMD.TAB.SWITCH",
        correlationId,
        payload: {
            tabId,
        },
    };
}
/**
 * Creates the RepositionDashboardTab command.
 *
 * @param oldIndex - old index of the tab before the reposition
 * @param newIndex - new index of the tab after the reposition
 * @param correlationId - specify correlation id to use for this command
 * @returns reposition dashboard tab command
 *
 * @alpha
 */
export function repositionDashboardTab(oldIndex, newIndex, correlationId) {
    return {
        type: "GDC.DASH/CMD.TAB.REPOSITION",
        correlationId,
        payload: {
            oldIndex,
            newIndex,
        },
    };
}
/**
 * Creates the CreateDashboardTab command.
 *
 * @param title - optional title for the new tab
 * @param index - optional position to insert tab (defaults to end)
 * @param shouldStartRenaming - optional flag to indicate whether the new tab should be started in renaming mode
 * @param correlationId - specify correlation id to use for this command
 * @returns create dashboard tab command
 *
 * @alpha
 */
export function createDashboardTab(title, index, shouldStartRenaming, correlationId) {
    return {
        type: "GDC.DASH/CMD.TAB.CREATE",
        correlationId,
        payload: {
            title,
            index,
            shouldStartRenaming,
        },
    };
}
/**
 * Creates the DeleteDashboardTab command.
 *
 * @param tabId - identifier of the tab to delete
 * @param correlationId - specify correlation id to use for this command
 * @returns delete dashboard tab command
 *
 * @alpha
 */
export function deleteDashboardTab(tabId, correlationId) {
    return {
        type: "GDC.DASH/CMD.TAB.DELETE",
        correlationId,
        payload: {
            tabId,
        },
    };
}
/**
 * Creates the StartRenamingDashboardTab command.
 * @alpha
 */
export function startRenamingDashboardTab(tabId, correlationId, shouldSelectTab) {
    return {
        type: "GDC.DASH/CMD.TAB.RENAME_MODE.START",
        correlationId,
        payload: { tabId, shouldSelectTab },
    };
}
/**
 * Creates the CancelRenamingDashboardTab command.
 * @alpha
 */
export function cancelRenamingDashboardTab(tabId, correlationId) {
    return {
        type: "GDC.DASH/CMD.TAB.RENAME_MODE.CANCEL",
        correlationId,
        payload: { tabId },
    };
}
/**
 * Creates the RenameDashboardTab command.
 * @alpha
 */
export function renameDashboardTab(title, tabId, correlationId) {
    return {
        type: "GDC.DASH/CMD.TAB.RENAME",
        correlationId,
        payload: { title, tabId },
    };
}
//# sourceMappingURL=tabs.js.map