'use babel'

export default function ({id, config, lineText, prefix}) {
  const regex = /^import .* from '(.*)'/gi
  const match = regex.exec(lineText)
  if (!match || !match[1]) return
  const parts = match[1].split('/')
  const last = parts[parts.length - 1]

  return [{
    snippet: last,
    displayText: last,
    type: 'value',
    description: `Import ${last}`
  }]
}

@@ -253,16 +253,102 @@
 gth - 1%5D
+%0A  const remove = last.replace(/%5E%5BA-z%5D+/, '')%0A  const final = last.replace(remove, '')
 %0A%0A  retu
@@ -366,20 +366,21 @@
 nippet: 
-last
+final
 ,%0A    di
@@ -390,20 +390,21 @@
 ayText: 
-last
+final
 ,%0A    ty
@@ -443,20 +443,21 @@
 mport $%7B
-last
+final
 %7D%60%0A  %7D%5D%0A

improve import variable snippet