import { useEffect, useRef } from "react";
import { createPortal } from "react-dom";
const datePickerRoot = document.getElementById("date-picker-root");
export const DatePickerPortal = ({ children, }) => {
    const element = useRef(document.createElement("div"));
    useEffect(() => {
        datePickerRoot.appendChild(element.current);
        return () => {
            // eslint-disable-next-line react-hooks/exhaustive-deps
            datePickerRoot.removeChild(element.current);
        };
    }, []);
    return createPortal(children, element.current);
};
//# sourceMappingURL=date-picker-portal.js.map