// (C) 2026 GoodData Corporation
import { createSelector } from "@reduxjs/toolkit";
import { selectDashboardId } from "../meta/metaSelectors.js";
const selectSelf = createSelector((state) => state, (state) => state.dashboardSummaryWorkflow);
export const selectDashboardSummaryWorkflowInfoByDashboardId = (dashboardId) => createSelector(selectSelf, (state) => state.byDashboardId[dashboardId]);
export const selectCurrentDashboardSummaryWorkflowInfo = createSelector(selectDashboardId, selectSelf, (dashboardId, state) => {
    if (!dashboardId) {
        return undefined;
    }
    return state.byDashboardId[dashboardId];
});
export const selectCurrentDashboardSummaryWorkflowStatus = createSelector(selectCurrentDashboardSummaryWorkflowInfo, (info) => info?.status);
