"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useOuterAndInnerDimensions = useOuterAndInnerDimensions;
const react_1 = require("react");
function useOuterAndInnerDimensions() {
    const [outerDimensions, setOuterDimensions] = (0, react_1.useState)({
        width: 0,
        height: 0,
    });
    const [innerDimensions, setInnerDimensions] = (0, react_1.useState)({
        width: 0,
        height: 0,
    });
    const onOuterLayout = (0, react_1.useCallback)((event) => {
        const { width, height } = event.nativeEvent.layout;
        setOuterDimensions({ width, height });
    }, []);
    const onInnerLayout = (0, react_1.useCallback)((event) => {
        const { width, height } = event.nativeEvent.layout;
        setInnerDimensions({ width, height });
    }, []);
    return {
        outerWidth: outerDimensions.width,
        outerHeight: outerDimensions.height,
        innerWidth: innerDimensions.width,
        innerHeight: innerDimensions.height,
        onOuterLayout,
        onInnerLayout,
    };
}
//# sourceMappingURL=useOuterAndInnerDimensions.js.map