"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeBlurListener = makeBlurListener;
exports.listenBlur = listenBlur;
function makeBlurListener(listener) {
    return (component) => {
        return listenBlur(component, listener);
    };
}
function listenBlur(component, listener) {
    const { $element } = component;
    const blurListener = (_event) => {
        const { relatedTarget } = _event;
        listener && listener({ relatedTarget }, _event);
    };
    $element.addEventListener('blur', blurListener);
    return () => {
        $element.removeEventListener('blur', blurListener);
    };
}
//# sourceMappingURL=blur.js.map