1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ResourceKind } from "models/resource";
6 import { MultiSelectMenuActionSet} from "views-components/multiselect-toolbar/ms-menu-actions";
7 import { msCollectionActionSet } from "views-components/multiselect-toolbar/ms-collection-action-set";
8 import { msProjectActionSet } from "views-components/multiselect-toolbar/ms-project-action-set";
9 import { msProcessActionSet } from "views-components/multiselect-toolbar/ms-process-action-set";
10 import { msWorkflowActionSet } from "views-components/multiselect-toolbar/ms-workflow-action-set";
12 export function findActionByName(name: string, actionSet: MultiSelectMenuActionSet) {
13 return actionSet[0].find(action => action.name === name);
16 const { COLLECTION, PROCESS, PROJECT, WORKFLOW } = ResourceKind;
18 export const kindToActionSet: Record<string, MultiSelectMenuActionSet> = {
19 [COLLECTION]: msCollectionActionSet,
20 [PROCESS]: msProcessActionSet,
21 [PROJECT]: msProjectActionSet,
22 [WORKFLOW]: msWorkflowActionSet,