import TrafimageMapboxLayer from "../../layers/TrafimageMapboxLayer";
import RailplusLayer from "../../layers/RailplusLayer";
import { FORCE_EXPORT_PROPERTY } from "../../utils/constants";
export const MD_RAILPLUS_FILTER = "railplus.filter";
export const getRailplusLayers = () => {
  const netzkarteRailplus = new TrafimageMapboxLayer({
    name: "ch.railplus.mitglieder.data",
    visible: true,
    zIndex: -1,
    style: "basemap_bright_ch.railplus.meterspurbahnen",
    properties: {
      hideInLegend: true,
      isBaseLayer: true
    },
    mapOptions: {
      preserveDrawingBuffer: true
    }
  });
  const railplusMeterspurbahnen = new RailplusLayer({
    name: "ch.railplus.mitglieder.meterspur",
    visible: true,
    mapboxLayer: netzkarteRailplus,
    styleLayersFilter: _ref => {
      let {
        metadata
      } = _ref;
      return /^line$/.test(metadata === null || metadata === void 0 ? void 0 : metadata[MD_RAILPLUS_FILTER]);
    },
    properties: {
      isQueryable: true,
      popupComponent: "RailplusPopup",
      hideInLegend: true,
      useOverlay: true
    }
  });
  const railplusMeterspurbahnenPrint = new RailplusLayer({
    name: "ch.railplus.mitglieder.meterspur.print",
    visible: false,
    mapboxLayer: netzkarteRailplus,
    styleLayersFilter: _ref2 => {
      let {
        metadata
      } = _ref2;
      return /^(print|logos)$/.test(metadata === null || metadata === void 0 ? void 0 : metadata[MD_RAILPLUS_FILTER]);
    },
    properties: {
      hideInLegend: true,
      [FORCE_EXPORT_PROPERTY]: true
    }
  });
  const railplusMeterspurbahnenFlags = new RailplusLayer({
    name: "ch.railplus.mitglieder.meterspur.flags",
    visible: true,
    mapboxLayer: netzkarteRailplus,
    styleLayersFilter: _ref3 => {
      let {
        metadata
      } = _ref3;
      return /^flag$/.test(metadata === null || metadata === void 0 ? void 0 : metadata[MD_RAILPLUS_FILTER]);
    },
    properties: {
      hideInLegend: true,
      [FORCE_EXPORT_PROPERTY]: false
    }
  });
  return [netzkarteRailplus, railplusMeterspurbahnen, railplusMeterspurbahnenPrint, railplusMeterspurbahnenFlags];
};
//# sourceMappingURL=index.js.map