package net.minecraft.server.packs.repository;

import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;

public interface PackSource {
    public static final PackSource DEFAULT = passThrough();
    public static final PackSource BUILT_IN = decorating("pack.source.builtin");
    public static final PackSource WORLD = decorating("pack.source.world");
    public static final PackSource SERVER = decorating("pack.source.server");
    
    Component decorate(final Component mr);
    
    default PackSource passThrough() {
        return mr -> mr;
    }
    
    default PackSource decorating(final String string) {
        final Component mr3 = new TranslatableComponent(string);
        final TranslatableComponent translatableComponent;
        final Object o;
        return mr2 -> {
            new TranslatableComponent("pack.nameAndSource", new Object[] { mr2, o });
            return translatableComponent;
        };
    }
}
