import { __values } from "tslib";
export var getPosition = function (api, rootIds) {
    var e_1, _a;
    var startPositions = 0;
    var endPositions = 0;
    try {
        for (var rootIds_1 = __values(rootIds), rootIds_1_1 = rootIds_1.next(); !rootIds_1_1.done; rootIds_1_1 = rootIds_1.next()) {
            var rootId = rootIds_1_1.value;
            var animationPosition = api.GetComponentData(rootId).animationPosition;
            if (animationPosition === "End") {
                endPositions++;
            }
            else {
                startPositions++;
            }
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (rootIds_1_1 && !rootIds_1_1.done && (_a = rootIds_1.return)) _a.call(rootIds_1);
        }
        finally { if (e_1) throw e_1.error; }
    }
    if (endPositions === 0) {
        return "start";
    }
    if (startPositions === 0) {
        return "end";
    }
    return "mixed";
};
