import { Fun } from '@ephox/katamari';
import * as AlloyEvents from '../../api/events/AlloyEvents';
import * as InvalidateApis from './InvalidateApis';
const events = (invalidConfig, invalidState) => invalidConfig.validator.map((validatorInfo) => AlloyEvents.derive([
    AlloyEvents.run(validatorInfo.onEvent, (component) => {
        InvalidateApis.run(component, invalidConfig, invalidState).get(Fun.identity);
    })
].concat(validatorInfo.validateOnLoad ? [
    AlloyEvents.runOnAttached((component) => {
        InvalidateApis.run(component, invalidConfig, invalidState).get(Fun.noop);
    })
] : []))).getOr({});
export { events };
//# sourceMappingURL=ActiveInvalidate.js.map