#pragma once
// resample_name — the display name a resample's new bank entry takes, so a repeated bake
// reads as one iteration chain in the browser rather than as N unrelated captures.
//
// The chain is legible in the NAME only; the machine-readable lineage is
// OriginRecord::parentSampleId, written at birth. This is presentation, and deliberately
// not parsed back into a lineage by anything.

#include <string>

namespace reasampler::model {

// "Kick" -> "Kick r2" -> "Kick r3". A name already carrying an " r<N>" tail increments it
// rather than stacking a second one; an empty name becomes "resample r2". A tail that is
// not a whole positive number (" r", " r0", " rx") is left alone and a fresh " r2"
// appended, because it was never one of ours.
std::string nextIterationName(const std::string& sourceName);

}  // namespace reasampler::model
