package p.studio.workspaces.assets.tiled;

import java.util.List;
import java.util.Objects;

public record TiledTileLayer(
        int id,
        String name,
        int width,
        int height,
        List<Long> gids,
        List<TiledProperty> properties) {

    public TiledTileLayer {
        name = Objects.requireNonNullElse(name, "").trim();
        gids = List.copyOf(Objects.requireNonNull(gids, "gids"));
        properties = List.copyOf(Objects.requireNonNull(properties, "properties"));
    }
}
