import * as SystemEvents from './SystemEvents';
const emit = (component, event) => {
    dispatchWith(component, component.element, event, {});
};
const emitWith = (component, event, properties) => {
    dispatchWith(component, component.element, event, properties);
};
const emitExecute = (component) => {
    emit(component, SystemEvents.execute());
};
const dispatch = (component, target, event) => {
    dispatchWith(component, target, event, {});
};
const dispatchWith = (component, target, event, properties) => {
    const data = {
        target,
        ...properties
    };
    component.getSystem().triggerEvent(event, target, data);
};
const dispatchEvent = (component, target, event, simulatedEvent) => {
    component.getSystem().triggerEvent(event, target, simulatedEvent.event);
};
const dispatchFocus = (component, target) => {
    component.getSystem().triggerFocus(target, component.element);
};
export { emit, emitWith, emitExecute, dispatch, dispatchWith, dispatchEvent, dispatchFocus };
//# sourceMappingURL=AlloyTriggers.js.map