// Path: app/src/main/java/ultimategdbot/Strings.java
// public final class Strings {
// 
//     public static final String GENERAL = "GeneralStrings";
//     public static final String GD = "GDStrings";
// 
//     private Strings() {
//         throw new AssertionError();
//     }
// }
// 
// Path: app/src/main/java/ultimategdbot/database/GdLeaderboard.java
// @Value.Immutable
// @Criteria
// @Criteria.Repository(facets = { ReactorReadable.class, ReactorWritable.class })
// @JsonSerialize(as = ImmutableGdLeaderboard.class)
// @JsonDeserialize(as = ImmutableGdLeaderboard.class)
// public interface GdLeaderboard {
// 
//     @Criteria.Id
//     @JsonProperty("_id")
// 	long accountId();
// 	
// 	String name();
// 	
// 	int stars();
// 	
// 	int diamonds();
// 	
// 	int userCoins();
// 	
// 	int secretCoins();
// 	
// 	int demons();
// 	
// 	int creatorPoints();
// 	
// 	Instant lastRefreshed();
// }


import botrino.api.i18n.Translator;
import discord4j.core.object.entity.Guild;
import discord4j.core.spec.EmbedCreateSpec;
import reactor.util.annotation.Nullable;
import ultimategdbot.Strings;
import ultimategdbot.database.GdLeaderboard;
import java.util.List;
import java.util.Objects;
package ultimategdbot.util;



public final class Leaderboards {

    public static final int ENTRIES_PER_PAGE = 20;

    private Leaderboards() {
        throw new AssertionError();
    }

    public static EmbedCreateSpec embed(Translator tr, Guild guild, List<LeaderboardEntry> entryList,
                                        int page, @Nullable String highlighted, String emoji) {
        final var size = entryList.size();
        final var maxPage = (size - 1) / ENTRIES_PER_PAGE;
        final var offset = page * ENTRIES_PER_PAGE;
        final var subList = entryList.subList(offset, Math.min(offset + ENTRIES_PER_PAGE, size));
        var embed = EmbedCreateSpec.builder()
// Path: app/src/main/java/ultimategdbot/Strings.java
// public final class Strings {
// 
//     public static final String GENERAL = "GeneralStrings";
//     public static final String GD = "GDStrings";
// 
//     private Strings() {
//         throw new AssertionError();
//     }
// }
// 
// Path: app/src/main/java/ultimategdbot/database/GdLeaderboard.java
// @Value.Immutable
// @Criteria
// @Criteria.Repository(facets = { ReactorReadable.class, ReactorWritable.class })
// @JsonSerialize(as = ImmutableGdLeaderboard.class)
// @JsonDeserialize(as = ImmutableGdLeaderboard.class)
// public interface GdLeaderboard {
// 
//     @Criteria.Id
//     @JsonProperty("_id")
// 	long accountId();
// 	
// 	String name();
// 	
// 	int stars();
// 	
// 	int diamonds();
// 	
// 	int userCoins();
// 	
// 	int secretCoins();
// 	
// 	int demons();
// 	
// 	int creatorPoints();
// 	
// 	Instant lastRefreshed();
// }


// Path: app/src/main/java/ultimategdbot/util/Leaderboards.java
import botrino.api.i18n.Translator;
import discord4j.core.object.entity.Guild;
import discord4j.core.spec.EmbedCreateSpec;
import reactor.util.annotation.Nullable;
import ultimategdbot.Strings;
import ultimategdbot.database.GdLeaderboard;
import java.util.List;
import java.util.Objects;

package ultimategdbot.util;



public final class Leaderboards {

    public static final int ENTRIES_PER_PAGE = 20;

    private Leaderboards() {
        throw new AssertionError();
    }

    public static EmbedCreateSpec embed(Translator tr, Guild guild, List<LeaderboardEntry> entryList,
                                        int page, @Nullable String highlighted, String emoji) {
        final var size = entryList.size();
        final var maxPage = (size - 1) / ENTRIES_PER_PAGE;
        final var offset = page * ENTRIES_PER_PAGE;
        final var subList = entryList.subList(offset, Math.min(offset + ENTRIES_PER_PAGE, size));
        var embed = EmbedCreateSpec.builder()
                .title(tr.translate(Strings.GD, "lb_title", guild.getName()));