"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listenFocusIn = exports.makeFocusInListener = void 0;
function makeFocusInListener(listener) {
    return (component) => {
        return listenFocusIn(component, listener);
    };
}
exports.makeFocusInListener = makeFocusInListener;
function listenFocusIn(component, listener) {
    const { $element } = component;
    const focusListener = (_event) => {
        const { relatedTarget } = _event;
        listener({ relatedTarget }, _event);
    };
    $element.addEventListener('focusin', focusListener);
    return () => {
        $element.removeEventListener('focusin', focusListener);
    };
}
exports.listenFocusIn = listenFocusIn;
//# sourceMappingURL=focusin.js.map