import React from 'react';
import { isString, isPlainObject } from '@pisell/utils';
import "./ReadPretty.less";
var JsonReadPretty = function JsonReadPretty(props) {
  if (isString(props.value)) {
    return /*#__PURE__*/React.createElement("pre", {
      className: "pisell-json-read-pretty"
    }, props.value);
  } else if (isPlainObject(props.value)) {
    return /*#__PURE__*/React.createElement("pre", null, JSON.stringify(props.value, null, 2));
  }
  return null;
};
export default JsonReadPretty;