package p.studio.projects;

import java.nio.file.Path;
import java.util.Objects;

public final class ProjectStudioPaths {
    private static final String STUDIO_DIR = ".studio";
    private static final String ACTIVITIES_FILE = "activities.json";

    private ProjectStudioPaths() {
    }

    public static Path studioRoot(ProjectReference projectReference) {
        return Objects.requireNonNull(projectReference, "projectReference")
                .rootPath()
                .resolve(STUDIO_DIR)
                .toAbsolutePath()
                .normalize();
    }

    public static Path activitiesPath(ProjectReference projectReference) {
        return studioRoot(projectReference)
                .resolve(ACTIVITIES_FILE)
                .toAbsolutePath()
                .normalize();
    }
}
