"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "BaseLayout", {
    enumerable: true,
    get: function() {
        return BaseLayout;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = require("react");
const _reactslot = require("@radix-ui/react-slot");
const BaseLayout = (props)=>{
    const ref = (0, _react.useRef)(null);
    const { asChild, ...rest } = props;
    (0, _react.useEffect)(()=>{
        const boundingClientRect = ref.current?.getBoundingClientRect();
        if (boundingClientRect && boundingClientRect.height) {
            // console.log(boundingClientRect);
            props.onMeasure?.(boundingClientRect.height, boundingClientRect.width);
        }
    }, []);
    const Comp = asChild ? _reactslot.Slot : "div";
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(Comp, {
        ...rest,
        ref: ref
    });
};

//# sourceMappingURL=baseLayout.js.map