"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FadePopup = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const styles_1 = require("./styles");
const useLogic_1 = require("./useLogic");
const FadePopup = ({ children, isOpen }) => {
    const { handleAnimationEnd, shouldRender, topPosition } = (0, useLogic_1.useLogic)({
        isOpen,
    });
    if (!shouldRender) {
        return null;
    }
    return ((0, jsx_runtime_1.jsx)(styles_1.PopupContainer, { "$topPosition": topPosition, "$isOpen": isOpen, onAnimationEnd: handleAnimationEnd, children: children }));
};
exports.FadePopup = FadePopup;
