"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLegendAction = useLegendAction;
const react_1 = require("react");
function useLegendAction() {
    const ref = (0, react_1.useRef)(null);
    const onClose = () => {
        if (ref.current) {
            requestAnimationFrame(() => ref?.current?.focus?.());
        }
    };
    return [ref, onClose];
}
//# sourceMappingURL=use_legend_action.js.map