import { jsx as _jsx } from "react/jsx-runtime";
import { useEffect, useRef } from "react";
import { Slot } from "@radix-ui/react-slot";
export const BaseLayout = (props)=>{
    const ref = useRef(null);
    const { asChild, ...rest } = props;
    useEffect(()=>{
        const boundingClientRect = ref.current?.getBoundingClientRect();
        if (boundingClientRect && boundingClientRect.height) {
            // console.log(boundingClientRect);
            props.onMeasure?.(boundingClientRect.height, boundingClientRect.width);
        }
    }, []);
    const Comp = asChild ? Slot : "div";
    return /*#__PURE__*/ _jsx(Comp, {
        ...rest,
        ref: ref
    });
};

//# sourceMappingURL=baseLayout.js.map