1import { ConfigPlugin, Mod, ModPlatform } from '../Plugin.types';
2import { withMod } from './withMod';
3
4/**
5 * Mods that don't modify any data, all unresolved functionality is performed inside a dangerous mod.
6 * All dangerous mods run first before other mods.
7 *
8 * @param config
9 * @param platform
10 * @param action
11 */
12export const withDangerousMod: ConfigPlugin<[ModPlatform, Mod<unknown>]> = (
13  config,
14  [platform, action]
15) => {
16  return withMod(config, {
17    platform,
18    mod: 'dangerous',
19    action,
20  });
21};
22