import { jsx as _jsx } from "react/jsx-runtime";
import isBrowser from '../isBrowser';
import { useEventHandler, EventHandler } from './event-handler';
export function useWindowEventHandler(eventName, listener, options) {
    if (!isBrowser) {
        return;
    }
    return useEventHandler(window, eventName, listener, options);
}
export function WindowEventHandler(_a) {
    var eventName = _a.eventName, listener = _a.listener, options = _a.options;
    if (!isBrowser) {
        return null;
    }
    return (_jsx(EventHandler, { target: window, eventName: eventName, listener: listener, options: options }, void 0));
}
export default WindowEventHandler;
