import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2025-2026 GoodData Corporation
import { useMemo } from "react";
import { isAllValuesDashboardAttributeFilter } from "@gooddata/sdk-model";
import { KdaStateProvider } from "./KdaState.js";
export function KdaProvider({ children, definition, separators, includeTags, excludeTags }) {
    const state = useMemo(() => {
        return {
            separators,
            definition,
            includeTags,
            excludeTags,
            fromValue: { ...definition?.range[0] },
            toValue: { ...definition?.range[1] },
            definitionStatus: "success",
            isMinimized: true,
            attributeFilters: (definition.filters?.slice() ?? []).filter((f) => !isAllValuesDashboardAttributeFilter(f)),
        };
    }, [definition, separators, includeTags, excludeTags]);
    return _jsx(KdaStateProvider, { value: state, children: children });
}
//# sourceMappingURL=Kda.js.map