import { jsx as L } from "react/jsx-runtime";
import { DEFAULT_RASTER_LAYER_FORMAT as f, ENGINE_TYPE_P2D as c, DEFAULT_TILE_SIZE as m, ENGINE_TYPE_HARP as _ } from "../../../constants.js";
import R from "./Layer.js";
import { useMapContext as T } from "../../../MapContext.js";
import { isVectorBased as y } from "../../../../utils/rendering.js";
const E = (e, r) => (t, i, o, a) => {
  const s = t.platform?.getRasterTileService({
    resource: "blank",
    format: f,
    queryParams: {
      lang: a,
      // Increase size of road sign for pixel maps and high resolutions, otherwise the icons are too small
      ppi: e === c && r > 1 ? 200 : 100,
      features: "vehicle_restrictions:active_and_inactive"
    }
  }), n = new H.service.rasterTile.Provider(s, {
    engineType: e,
    tileSize: m
  }), l = new H.map.layer.TileLayer(n);
  return console.log("createRoadRestrictionLayer"), l;
}, b = (e) => {
  const { enableWebGL: r, baseLayer: t, devicePixelRatio: i } = T(), o = y(r, t) ? _ : c, a = E(o, i);
  return /* @__PURE__ */ L(R, { ...e, createLayer: a });
};
export {
  b as default
};
//# sourceMappingURL=RoadRestrictionLayer.js.map
