// (C) 2024-2026 GoodData Corporation
export function loadFilterViews(ctx) {
    const { backend, workspace } = ctx;
    if (!ctx.dashboardRef || ctx.config?.isReadOnly) {
        return Promise.resolve([]);
    }
    return backend
        .workspace(workspace)
        .dashboards()
        .getFilterViewsForCurrentUser(ctx.dashboardRef)
        .catch((error) => {
        console.error("Loading of the user filter views for the dashboard failed", error);
        return Promise.resolve([]);
    });
}
//# sourceMappingURL=loadFilterViews.js.map