// (C) 2025 GoodData Corporation
import { createSelector } from "@reduxjs/toolkit";
import { selectSupportsExportToCsv, selectSupportsExportToXlsx, } from "../backendCapabilities/backendCapabilitiesSelectors.js";
import { selectEnableExportToPdfTabular, selectEnableWidgetExportPngImage, } from "../config/configSelectors.js";
import { selectCanExecuteRaw, selectCanExportPdf, selectCanExportTabular, } from "../permissions/permissionsSelectors.js";
/**
 * @internal
 */
export const selectIsExportableToCSV = createSelector(selectSupportsExportToCsv, selectCanExportTabular, selectCanExecuteRaw, (supportsCapabilityCsv, canExportTabular, canExecuteRaw) => {
    return supportsCapabilityCsv && canExportTabular && canExecuteRaw;
});
/**
 * @internal
 */
export const selectIsExportableToXLSX = createSelector(selectSupportsExportToXlsx, selectCanExportTabular, (supportCapabilityXlsx, canExportTabular) => {
    return supportCapabilityXlsx && canExportTabular;
});
/**
 * @internal
 */
export const selectIsExportableToPngImage = createSelector(selectEnableWidgetExportPngImage, selectCanExportPdf, (enableWidgetExportPngImage, canExportVisual) => {
    return enableWidgetExportPngImage && canExportVisual;
});
/**
 * @internal
 */
export const selectIsExportableToPdfTabular = createSelector(selectEnableExportToPdfTabular, selectCanExportTabular, (enableExportToPdfTabular, canExportTabular) => {
    return enableExportToPdfTabular && canExportTabular;
});
//# sourceMappingURL=widgetExportsSelectors.js.map