import { CollectionViewsState } from './CollectionViewsState';
import { presetsToCategories } from './presetsToCategories';
export function setViewsState(toolbar, viewsProps) {
    const { presets, onSaveView, onSaveViewChanges, onDeleteView, onRenameView, onSetAsDefaultView, allItemsViewProps, learnMoreLink, viewNamePlaceholder, } = viewsProps;
    return (toolbar.viewsState ??= new CollectionViewsState({
        table: toolbar,
        container: toolbar.container,
        presets: presetsToCategories(presets),
        allItemsViewProps,
        onDeleteView,
        onSaveView,
        onSaveViewChanges,
        onSetAsDefaultView,
        onRenameView,
        learnMoreLink,
        viewNamePlaceholder,
    }));
}
//# sourceMappingURL=setViewsState.js.map