"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useItemAngle = void 0;
const sdk_1 = require("@cntrl-site/sdk");
const useKeyframeValue_1 = require("../common/useKeyframeValue");
const useItemAngle = (item, sectionId) => {
    const angle = (0, useKeyframeValue_1.useKeyframeValue)(item, sdk_1.KeyframeType.Rotation, (item, layoutId) => layoutId ? item.area[layoutId].angle : undefined, (animator, scroll, value) => value !== undefined ? animator.getRotation({ angle: value }, scroll).angle : undefined, sectionId);
    return angle;
};
exports.useItemAngle = useItemAngle;
