import React from "react";
import PropTypes from "prop-types";
import Feature from "ol/Feature";
import { makeStyles } from "@mui/styles";
import useTranslation from "../../utils/useTranslation";
const useStyles = makeStyles(theme => ({
  title: {
    paddingBottom: theme.spacing(2),
    flex: "0 0"
  },
  km: {
    paddingLeft: theme.spacing(1)
  }
}));
function Line(_ref) {
  let {
    feature
  } = _ref;
  const {
    t
  } = useTranslation();
  const classes = useStyles();
  const {
    line_number: lineNumber,
    bp_von: bpStart,
    bp_bis: bpEnd,
    km_start: kmStart,
    km_end: kmEnd
  } = feature.getProperties();
  return /*#__PURE__*/React.createElement("div", {
    className: classes.title
  }, /*#__PURE__*/React.createElement("div", null, !!lineNumber && "".concat(t("Linie"), " ").concat(lineNumber, ", "), bpStart && bpEnd && "".concat(t("BPs"), " ").concat(bpStart, " - ").concat(bpEnd), (bpStart && !bpEnd || !bpStart && bpEnd) && "".concat(t("BP"), " ").concat(bpStart || bpEnd)), /*#__PURE__*/React.createElement("div", {
    className: classes.km
  }, "km ".concat(kmStart, " - ").concat(kmEnd)));
}
Line.propTypes = {
  feature: PropTypes.instanceOf(Feature).isRequired
};
export default Line;
//# sourceMappingURL=Line.js.map