"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.elementType = exports.name = exports["default"] = exports.StepTitle = void 0;

var _reactIntl = require("react-intl");

var _dummy2 = _interopRequireDefault(require("./_dummy"));

var _extendType = _interopRequireDefault(require("./_extendType"));

var _title = require("./title");

// Used to identify step split points and display only the elements of the step.
var StepTitle = function StepTitle() {
  return null;
};

exports.StepTitle = StepTitle;

var _default = (0, _extendType["default"])(_dummy2["default"], function (_ref) {
  var _ref$config = _ref.config,
      content = _ref$config.content,
      type = _ref$config.type,
      fillProps = _ref.fillProps;
  return function (props) {
    var _props$uiSchema;

    props.schema.additionalType = type;
    (_props$uiSchema = props.uiSchema) !== null && _props$uiSchema !== void 0 ? _props$uiSchema : props.uiSchema = {};
    props.uiSchema['ui:field'] = (fillProps === null || fillProps === void 0 ? void 0 : fillProps.disableSteps) ? _title.TitleField : StepTitle;
    props.uiSchema['ui:title'] = content;
  };
});

exports["default"] = _default;
var name = (0, _reactIntl.defineMessage)({
  id: "yxfPIz",
  defaultMessage: [{
    "type": 0,
    "value": "Vaiheen erotin ja otsikko"
  }]
});
exports.name = name;
var elementType = 'element';
exports.elementType = elementType;
//# sourceMappingURL=stepTitle.cjs.map