blob: 36c5a7539418b28d76c70bcce545f52c48207522 [file] [log] [blame]
import DependenciesProviderSingleton, {
WorkflowsDependency,
WorkflowsImportDependency,
} from '../../../common/architecture/dependenciesProvider/DependenciesProvider';
import {
ScriptEnvironment,
ScriptPage,
ScriptRunPhase,
} from '../../../common/architecture/scripts/Script';
import LegacyNodeWatcherScript from '../../../common/architecture/scripts/nodeWatcher/LegacyNodeWatcherScript';
import WorkflowsImport from '../core/communityConsole/import';
import Workflows from '../core/communityConsole/workflows';
import WorkflowsImportCRTagsHandler from '../nodeWatcherHandlers/crTags.handler';
import WorkflowsThreadListActionBarHandler from '../nodeWatcherHandlers/threadListActionBar.handler';
export interface WorkflowsNodeWatcherDependencies {
workflows: Workflows;
workflowsImport: WorkflowsImport;
}
export default class WorkflowsNodeWatcherScript extends LegacyNodeWatcherScript<WorkflowsNodeWatcherDependencies> {
public page = ScriptPage.CommunityConsole;
public environment = ScriptEnvironment.ContentScript;
public runPhase = ScriptRunPhase.Main;
public handlers = new Map([
['workflowsImportCRTags', WorkflowsImportCRTagsHandler],
['workflowsThreadListActionBar', WorkflowsThreadListActionBarHandler],
]);
protected optionsFactory(): WorkflowsNodeWatcherDependencies {
const dependenciesProvider = DependenciesProviderSingleton.getInstance();
return {
workflows: dependenciesProvider.getDependency(WorkflowsDependency),
workflowsImport: dependenciesProvider.getDependency(
WorkflowsImportDependency,
),
};
}
}