text: 'use strict';Object.defineProperty(exports,"__esModule",{value:true});exports.default=JsonLinkInline;var _react=require('react');var _react2=_interopRequireDefault(_react);var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);var _classnames=require('classnames');var _classnames2=_interopRequireDefault(_classnames);var _index=require('./index');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function JsonLinkInline(props){var _this=this;// return a js object
  var normalizeJson=function normalizeJson(json){return typeof json==='string'?JSON.parse(json):json;};return _react2.default.createElement('div',{className:'results--json json-link-inline'},_react2.default.createElement('div',{className:'json-link-inline--desc'},props.description),_react2.default.createElement('div',{className:'json-link-inline--spacer'}),_react2.default.createElement('a',{onClick:function onClick(e){e.preventDefault();props.onShow.call(_this,e);},className:'base--a json-link-inline--link',rel:'noopener noreferrer',href:null},_react2.default.createElement('span',{className:'json-link-inline--span'},props.children||'JSON'),_react2.default.createElement('span',{className:'json-link-inline--icon-1'},_react2.default.createElement(_index.Icon,{type:'link-out',size:'small',fill:_index.Colors.blue_50})),_react2.default.createElement('span',{className:(0,_classnames2.default)('json-link-inline--icon-2',{'json-link-inline--icon-2_show':props.showJson})},_react2.default.createElement(_index.Icon,{type:'right',size:'small',fill:_index.Colors.blue_50}))),_react2.default.createElement('div',{className:(0,_classnames2.default)('json-link-inline--overlay',{'json-link-inline--overlay_show':props.showJson})},_react2.default.createElement(_index.Code,{language:'json',lineNumbers:props.lineNumbers},JSON.stringify(normalizeJson(props.json),null,1)),_react2.default.createElement('button',{className:'json-link-inline--button',onClick:function onClick(e){props.onExit.call(_this,e);}},_react2.default.createElement(_index.Icon,{type:'close',fill:'#333'}))));}JsonLinkInline.propTypes={json:_propTypes2.default.oneOfType([_propTypes2.default.string,_propTypes2.default.object]).isRequired,children:_propTypes2.default.oneOfType([_propTypes2.default.element,_propTypes2.default.arrayOf(_propTypes2.default.element),_propTypes2.default.string]),showJson:_propTypes2.default.bool,onExit:_propTypes2.default.func,onShow:_propTypes2.default.func,// eslint-disable-line
  description:_propTypes2.default.element,lineNumbers:_propTypes2.default.bool};JsonLinkInline.defaultProps={showJson:false,children:'JSON',description:_react2.default.createElement('div',null),onExit:function onExit(){},onShow:function onShow(){},lineNumbers:false};module.exports=exports['default'];
  //# sourceMappingURL=JsonLinkInline.js.map
  