import { WarpMarkerBox } from "@opendaw/studio-boxes";
import { UUID } from "@opendaw/lib-std";
export var AudioContentHelpers;
(function (AudioContentHelpers) {
    AudioContentHelpers.addDefaultWarpMarkers = (boxGraph, playMode, durationInPPQN, durationInSeconds) => {
        WarpMarkerBox.create(boxGraph, UUID.generate(), box => {
            box.owner.refer(playMode.warpMarkers);
            box.position.setValue(0);
            box.seconds.setValue(0.0);
        });
        WarpMarkerBox.create(boxGraph, UUID.generate(), box => {
            box.owner.refer(playMode.warpMarkers);
            box.position.setValue(durationInPPQN);
            box.seconds.setValue(durationInSeconds);
        });
    };
    AudioContentHelpers.addWarpMarkers = (boxGraph, playMode, templates) => {
        templates.forEach(({ position, seconds }) => WarpMarkerBox.create(boxGraph, UUID.generate(), box => {
            box.owner.refer(playMode.warpMarkers);
            box.position.setValue(position);
            box.seconds.setValue(seconds);
        }));
    };
})(AudioContentHelpers || (AudioContentHelpers = {}));
