// (C) 2021-2026 GoodData Corporation
import { put } from "redux-saga/effects";
import { layoutSectionHeadersToggled } from "../../events/layout.js";
import { tabsActions } from "../../store/tabs/index.js";
export function* toggleLayoutSectionHeadersHandler(ctx, cmd) {
    const { layoutPath, enableSectionHeaders } = cmd.payload;
    yield put(tabsActions.toggleLayoutSectionHeaders({
        layoutPath,
        enableSectionHeaders,
        undo: {
            cmd,
        },
    }));
    return layoutSectionHeadersToggled(ctx, layoutPath, enableSectionHeaders, cmd.correlationId);
}
