import React from "react";
import PropTypes from "prop-types";
import Feature from "ol/Feature";
import DeparturePopupContent from "./DeparturePopupContent";
function DeparturePopup(_ref) {
  let {
    feature,
    children
  } = _ref;
  const platform = feature.get("platform");
  const uic = parseFloat(feature.get("sbb_id"));
  return /*#__PURE__*/React.createElement(DeparturePopupContent, {
    uic: uic,
    platform: platform,
    showTitle: true
  }, children);
}
DeparturePopup.propTypes = {
  feature: PropTypes.instanceOf(Feature).isRequired,
  children: PropTypes.node
};
const composed = DeparturePopup;
composed.renderTitle = (feat, layer, t) => {
  const platform = feat.get("platform");
  if (platform) {
    return "".concat(feat.get("name"), " (").concat(t("abfahrtszeiten_kante"), " ").concat(platform, ")");
  }
  return feat.get("name");
};
export default composed;
//# sourceMappingURL=DeparturePopup.js.map