import React from "react";
export const useViewFieldsVariables = (view, filter = () => true) => {
    const suggestions = React.useMemo(() => {
        return ((view === null || view === void 0 ? void 0 : view.columns) || [])
            .filter(filter)
            .map((column) => ({ display: column.name, id: column.name }));
    }, [view === null || view === void 0 ? void 0 : view.columns, filter]);
    return suggestions;
};
//# sourceMappingURL=useViewFieldsVariables.js.map