// (C) 2025 GoodData Corporation
import { CHECKBOX_COLUMN_WIDTH, MENU_COLUMN_WIDTH, MENU_COLUMN_WIDTH_LARGE } from "./constants.js";
export const getColumnWidth = (renderMenu, isLarge, widthProp) => {
    return renderMenu ? (isLarge ? MENU_COLUMN_WIDTH_LARGE : MENU_COLUMN_WIDTH) : widthProp;
};
export const getColumnWidths = (columns, hasCheckbox, isLargeRow) => {
    const columnWidths = columns.map((col) => getColumnWidth(!!col.renderMenu, isLargeRow, col.width));
    return hasCheckbox ? [CHECKBOX_COLUMN_WIDTH, ...columnWidths] : columnWidths;
};
export const getFilterOptionsMap = (options) => {
    return new Map(options.map((item) => [item.value, item]));
};
export const stopPropagationCallback = (event, callback) => {
    event.stopPropagation();
    callback?.();
};
//# sourceMappingURL=utils.js.map