import React from "react";
import { makeStyles } from "@mui/styles";
import PropTypes from "prop-types";
import { Layer } from "mobility-toolbox-js/ol";
import DvLegendLine from "../../config/ch.sbb.direktverbindungen/DvLegendLine/DvLegendLine";
const useStyles = makeStyles({
  legendItem: {
    display: "flex",
    alignItems: "center",
    gap: 10
  }
});
const propTypes = {
  t: PropTypes.func.isRequired,
  language: PropTypes.string.isRequired,
  properties: PropTypes.instanceOf(Layer).isRequired
};
const comps = {
  day: {
    de: /*#__PURE__*/React.createElement("p", null, "Diese Karte bildet alle Fernverkehrsverbindungen ab, welche den Tag durch direkt ab der Schweiz nach Europa verkehren."),
    fr: /*#__PURE__*/React.createElement("p", null, "Cette carte repr\xE9sente toutes les liaisons longue distance qui circulent toute la journ\xE9e directement de la Suisse vers l'Europe."),
    en: /*#__PURE__*/React.createElement("p", null, "This map shows all long-distance train services that run directly from Switzerland to Europe during the day."),
    it: /*#__PURE__*/React.createElement("p", null, "Questa mappa mostra tutti i collegamenti a lunga percorrenza che circulano direttamente tra la Svizzera e l'Europa durante il giorno.")
  },
  night: {
    de: /*#__PURE__*/React.createElement("p", null, "Diese Karte bildet alle Fernverkehrsverbindungen ab, welche \xFCber Nacht direkt ab der Schweiz nach Europa verkehren."),
    fr: /*#__PURE__*/React.createElement("p", null, "Cette carte repr\xE9sente toutes les relations de trafic longue distance qui circulent la nuit directement de la Suisse vers l'Europe."),
    en: /*#__PURE__*/React.createElement("p", null, "This map shows all long-distance train services run overnight directly from Switzerland to Europe."),
    it: /*#__PURE__*/React.createElement("p", null, "Questa mappa mostra tutti i servizi a lunga percorrenza che circulano durante la notte direttamente tra la Svizzera e l'Europa.")
  }
};
function DvLayerInfo(_ref) {
  let {
    t,
    language,
    properties
  } = _ref;
  const classes = useStyles();
  return /*#__PURE__*/React.createElement("div", null, comps[properties.get("routeType")][language], /*#__PURE__*/React.createElement("div", {
    className: classes.legendItem
  }, /*#__PURE__*/React.createElement(DvLegendLine, {
    color: properties.get("color")
  }), /*#__PURE__*/React.createElement("div", null, t(properties.key))));
}
DvLayerInfo.propTypes = propTypes;
export default /*#__PURE__*/React.memo(DvLayerInfo);
//# sourceMappingURL=DvLayerInfo.js.map