import * as Core from "@intelligentgraphics/ig.gfx.core";
/** Class for placing items to the right of another item */
var RightOfItemPlacement = /** @class */ (function () {
    /**
     * The constructor.
     * @param id
     * @param other
     */
    function RightOfItemPlacement(id, other) {
        this.componentId = id;
        this.otherId = other;
    }
    RightOfItemPlacement.prototype.getTransformation = function () {
        var elementTransformation = Core.getWorldTransformation(this.otherId);
        var points = Core.State.API.GetAbstractBounds(this.otherId).getPoints();
        elementTransformation.position = Core.Vector.Add3(Core.State.API.GetPosition(this.otherId), Core.Vector.Sub3(points[4], points[0]));
        if (Core.Category.hasCategory(this.componentId, Core.Category.Floating)) {
            elementTransformation.position.y = 0;
        }
        return elementTransformation;
    };
    return RightOfItemPlacement;
}());
export default RightOfItemPlacement;
