"use babel";
// @flow

import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import DiagnosticsPanel from "../Layouts/DiagnosticsPanel";
import store from "../../../GlobalSystem/Store";
import { StyleRoot } from "radium";

export var diagnosticsPanel = document.createElement("div");
export var diagnosticsPanelPanel = atom.workspace.addBottomPanel({
  item: diagnosticsPanel,
  visible: false,
  priority: 60
});

export function renderDiagnosticsPanel(toolId: string, toolName: string): void {
  ReactDOM.render(
    <Provider store={store}>
      <StyleRoot>
        <DiagnosticsPanel
          onClose={() => diagnosticsPanelPanel.hide()}
          toolId={toolId}
          toolName={toolName}
        />
      </StyleRoot>
    </Provider>,
    diagnosticsPanel
  );
}

'use babel';
// @flow

import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import DiagnosticsPanel from '../Layouts/DiagnosticsPanel';
import store from '../../../GlobalSystem/Store';
import { StyleRoot } from 'radium';

export var diagnosticsPanel = document.createElement('div');
export var diagnosticsPanelPanel = atom.workspace.addBottomPanel({
  item: diagnosticsPanel,
  visible: false,
  priority: 60,
});

export function renderDiagnosticsPanel(toolId: string, toolName: string): void {
  ReactDOM.render(
    <Provider store={store}>
      <StyleRoot className="native-key-bindings" tabIndex="-1">
        <DiagnosticsPanel
          onClose={() => diagnosticsPanelPanel.hide()}
          toolId={toolId}
          toolName={toolName}
        />
      </StyleRoot>
    </Provider>,
    diagnosticsPanel,
  );
}

Allow copy / paste of diagnostics (#51)