package p.studio.projects;

import p.studio.compiler.models.FrontendSpec;

import java.util.List;

public record ProjectLanguageTemplate(
        String languageId,
        List<StdlibOption> stdlibOptions,
        StdlibOption defaultStdlib,
        List<String> sourceRoots,
        String defaultSourceRoot) {

    public record StdlibOption(int version, FrontendSpec.StdlibType type) {
        @Override
        public String toString() {
            return switch (type) {
                case DEFAULT -> version + " (default)";
                case STABLE -> version + " (stable)";
                case EXPERIMENTAL -> version + " (experimental)";
            };
        }
    }
}
