"use strict";

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

var _styles = require("@material-ui/core/styles");

var _jsxRuntime = require("react/jsx-runtime");

var useStyles = (0, _styles.makeStyles)({
  image: {
    maxWidth: '20%',
    maxHeight: '100px',
    width: 'inherit',
    height: 'inherit',
    "float": 'right'
  }
});

function Image(logoUrl, alt) {
  var classes = useStyles();
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
    src: logoUrl,
    alt: alt ? alt : 'Logo',
    className: classes.image
  });
}

var _default = function _default(config) {
  return function (props) {
    var _props$schema, _props$schema$title;

    (_props$schema$title = (_props$schema = props.schema).title) !== null && _props$schema$title !== void 0 ? _props$schema$title : _props$schema.title = config.useLabel ? config.label : config.logo ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      style: {
        overflow: 'hidden'
      },
      children: [Image(config.logo, config.logoAlt), config.title]
    }) : config.title;
  };
};

exports["default"] = _default;
//# sourceMappingURL=fieldTitleSupport.cjs.map