export var DashboardTileTypes;
(function (DashboardTileTypes) {
    DashboardTileTypes["SAVED_CHART"] = "saved_chart";
    DashboardTileTypes["SQL_CHART"] = "sql_chart";
    DashboardTileTypes["MARKDOWN"] = "markdown";
    DashboardTileTypes["LOOM"] = "loom";
    DashboardTileTypes["HEADING"] = "heading";
    DashboardTileTypes["DATA_APP"] = "data_app";
})(DashboardTileTypes || (DashboardTileTypes = {}));
export const isDashboardChartTileType = (tile) => tile.type === DashboardTileTypes.SAVED_CHART;
export const isDashboardMarkdownTileType = (tile) => tile.type === DashboardTileTypes.MARKDOWN;
export const isDashboardLoomTileType = (tile) => tile.type === DashboardTileTypes.LOOM;
export const isDashboardSqlChartTile = (tile) => tile.type === DashboardTileTypes.SQL_CHART;
export const isDashboardHeadingTileType = (tile) => tile.type === DashboardTileTypes.HEADING;
export const isDashboardDataAppTileType = (tile) => tile.type === DashboardTileTypes.DATA_APP;
export var DashboardSummaryTone;
(function (DashboardSummaryTone) {
    DashboardSummaryTone["FRIENDLY"] = "friendly";
    DashboardSummaryTone["FORMAL"] = "formal";
    DashboardSummaryTone["DIRECT"] = "direct";
    DashboardSummaryTone["ENTHUSIASTIC"] = "enthusiastic";
})(DashboardSummaryTone || (DashboardSummaryTone = {}));
export const isDashboardUnversionedFields = (data) => ('name' in data && !!data.name) ||
    ('spaceUuid' in data && !!data.spaceUuid);
export const isDashboardVersionedFields = (data) => 'tiles' in data && !!data.tiles;
export const defaultTileSize = {
    h: 9,
    w: 15,
    x: 0,
    y: 0,
};
export const getDefaultChartTileSize = (chartType) => {
    switch (chartType) {
        case 'big_number':
            return {
                h: 6,
                w: 9,
                x: 0,
                y: 0,
            };
        default:
            return defaultTileSize;
    }
};
export const hasChartsInDashboard = (dashboard) => dashboard.tiles.some((tile) => isDashboardChartTileType(tile) &&
    tile.properties.belongsToDashboard);
export function isDuplicateDashboardParams(params) {
    return 'dashboardName' in params && 'dashboardDesc' in params;
}
//# sourceMappingURL=dashboard.js.map