 {$, View, TextEditorView} = require 'atom-space-pen-views'
+fs = require 'fs'
 
 defaultHost = "localhost"
+defaultPort = ""
 
 module.exports =
   class NReplConnectionView extends View

      @panel.show()
      @hostEditor.focus()

    onConfirm: ->
      @confirmCallback? port: parseInt(@portEditor.getText()), host: @hostEditor.getText() || defaultHost
      @panel?.hide()

    onCancel: ->

          @subview "hostEditor", new TextEditorView(mini: true, placeholderText: defaultHost, attributes: tabindex: 1)
        @div class: "block", =>
          @label "Port"
          @subview "portEditor", new TextEditorView(mini: true, placeholderText: defaultPort, attributes: tabindex: 2)

    # * `confirmCallback` The {Function} execute on confirm. An {Object} will
    #   be passed to callback function with following keys:
