//
// SPDX-License-Identifier: AGPL-3.0
-import { ContextMenuActionSet } from "../context-menu-action-set";
-import actions from "../../../store/project/project-action";
-import { IconTypes } from "../../../components/icon/icon";
+import { ContextMenuActionItemSet } from '../context-menu-action-set';
+import { openCollectionCreateDialog } from 'store/collections/collection-create-actions';
+import { NewProjectIcon, CollectionIcon } from 'components/icon/icon';
+import { openProjectCreateDialog } from 'store/projects/project-create-actions';
-export const rootProjectActionSet: ContextMenuActionSet = [[{
- icon: IconTypes.FOLDER,
- name: "New project",
- execute: (dispatch, resource) => {
- dispatch(actions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
- }
-}]];
\ No newline at end of file
+export const rootProjectActionSet: ContextMenuActionItemSet = [
+ [
+ {
+ icon: NewProjectIcon,
+ name: 'New project',
+ execute: (dispatch, resources) => {
+ dispatch<any>(openProjectCreateDialog(resources[0].uuid));
+ },
+ },
+ {
+ icon: CollectionIcon,
+ name: 'New Collection',
+ execute: (dispatch, resources) => {
+ dispatch<any>(openCollectionCreateDialog(resources[0].uuid));
+ },
+ },
+ ],
+];