import React from "react";
import PropTypes from "prop-types";
import "./ConstructionLayerInfo.scss";
import useTranslation from "../../utils/useTranslation";
const propTypes = {
  properties: PropTypes.object.isRequired,
  staticFilesUrl: PropTypes.string.isRequired
};
function ConstructionLayerInfo(_ref) {
  let {
    properties,
    staticFilesUrl
  } = _ref;
  const {
    t
  } = useTranslation();
  const config = properties.get("construction");
  const filename = "".concat(config.art, "_").concat(config.ort).replace(/[^A-Z,^0-9,-_]/gi, "");
  return /*#__PURE__*/React.createElement("div", {
    className: "wkp-construction-layer-info"
  }, /*#__PURE__*/React.createElement("img", {
    src: "".concat(staticFilesUrl, "/img/layers/construction/").concat(filename, ".png"),
    draggable: "false",
    alt: t("Kein Bildtext")
  }), t("".concat(properties.key, "-desc")));
}
ConstructionLayerInfo.propTypes = propTypes;
export default ConstructionLayerInfo;
//# sourceMappingURL=ConstructionLayerInfo.js.map