import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["content", "type"];
import { defineMessage } from 'react-intl';
import extendType from './_extendType';
import _dummy from './_dummy';
import { Typography } from '@material-ui/core';
import { jsx as _jsx } from "react/jsx-runtime";
export var SubtitleField = function SubtitleField(_ref) {
  var _uiSchema$uiOptions, _uiSchema$uiOptions$e;

  var uiSchema = _ref.uiSchema;
  var content = uiSchema === null || uiSchema === void 0 ? void 0 : (_uiSchema$uiOptions = uiSchema['ui:options']) === null || _uiSchema$uiOptions === void 0 ? void 0 : (_uiSchema$uiOptions$e = _uiSchema$uiOptions.element) === null || _uiSchema$uiOptions$e === void 0 ? void 0 : _uiSchema$uiOptions$e.content;
  return /*#__PURE__*/_jsx(Typography, {
    component: "p",
    variant: "subtitle1",
    children: content
  });
};
export default extendType(_dummy, function (_ref2) {
  var _ref2$config = _ref2.config,
      content = _ref2$config.content,
      type = _ref2$config.type,
      other = _objectWithoutProperties(_ref2$config, _excluded);

  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'] = SubtitleField;
    props.uiSchema['ui:should-update'] = content;
  };
});
export var name = defineMessage({
  id: "c/m7ge",
  defaultMessage: [{
    "type": 0,
    "value": "Väliotsikko"
  }]
});
export var elementType = 'element';
//# sourceMappingURL=subtitle.js.map