package p.studio.workspaces.assets.tiled;

import java.util.Objects;

public record TiledTilesetReference(int firstGid, String source) {
    public TiledTilesetReference {
        source = Objects.requireNonNull(source, "source").trim();
        if (firstGid <= 0) {
            throw new IllegalArgumentException("firstGid must be positive");
        }
        if (source.isBlank()) {
            throw new IllegalArgumentException("source must not be blank");
        }
    }
}
