package p.studio.workspaces.assets.tiled;

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

public record TiledObjectLayer(
        int id,
        String name,
        List<TiledObjectData> objects,
        List<TiledProperty> properties) {

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