+
+export const openRemoveWorkflowDialog =
+(resource: ContextMenuResource, numOfWorkflows: Number) => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+ const confirmationText =
+ numOfWorkflows === 1
+ ? "Are you sure you want to remove this workflow?"
+ : `Are you sure you want to remove these ${numOfWorkflows} workflows?`;
+ const titleText = numOfWorkflows === 1 ? "Remove workflow permanently" : "Remove workflows permanently";
+
+ dispatch(
+ dialogActions.OPEN_DIALOG({
+ id: REMOVE_WORKFLOW_DIALOG,
+ data: {
+ title: titleText,
+ text: confirmationText,
+ confirmButtonLabel: "Remove",
+ uuid: resource.uuid,
+ resource,
+ },
+ })
+ );
+};
+
+export const REMOVE_WORKFLOW_DIALOG = "removeWorkflowDialog";
\ No newline at end of file