import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import { connect } from '../../redux/store';
import { compose, withProps } from 'recompose';
import { PageTitle as CommonPageTitle, selectCurrentKapp } from '@kineticdata/bundle-common';
export var mapStateToProps = function mapStateToProps(state) {
  return {
    space: state.app.space,
    kapp: selectCurrentKapp(state)
  };
};
export var PageTitle = compose(connect(mapStateToProps), withProps(function (_ref) {
  var _ref$parts = _ref.parts,
      parts = _ref$parts === void 0 ? [] : _ref$parts,
      props = _objectWithoutProperties(_ref, ["parts"]);

  return {
    parts: parts.concat([[props.kapp && props.kapp.name, props.settings && 'Settings'].filter(Boolean).join(' '), props.space && props.space.name])
  };
}))(CommonPageTitle);