import { UUID } from "@opendaw/lib-std";
import { ValueEventCollectionBox } from "@opendaw/studio-boxes";
export const migrateTimelineBox = (boxGraph, timelineBox) => {
    if (timelineBox.tempoTrack.events.isEmpty()) {
        console.debug("Migrate 'TimelineBox' to have a ValueEventCollectionBox for tempo events");
        boxGraph.beginTransaction();
        const box = ValueEventCollectionBox.create(boxGraph, UUID.generate());
        timelineBox.tempoTrack.events.refer(box.owners);
        boxGraph.endTransaction();
    }
};
