 
 import Cocoa
 
-class WorkspaceToolButton: NSView {
+class WorkspaceToolButton: NSView, NSDraggingSource, NSPasteboardItemDataProvider {
+
+  static fileprivate let toolUti = "com.qvacua.vimr.tool"
   
   static fileprivate let titlePadding = CGSize(width: 8, height: 2)
 

  }

  override func mouseDown(with event: NSEvent) {
    self.tool?.toggle()
  }

  override func mouseEntered(with _: NSEvent) {


    self.dehighlight()
  }

  @objc(draggingSession:sourceOperationMaskForDraggingContext:)
  func draggingSession(_ session: NSDraggingSession, sourceOperationMaskFor ctx: NSDraggingContext) -> NSDragOperation {
    return .generic
  }

  // https://www.raywenderlich.com/136272/drag-and-drop-tutorial-for-macos
  fileprivate func snapshot() -> NSImage {
    let pdfData = self.dataWithPDF(inside: self.bounds)
    let image = NSImage(data: pdfData)
    return image ?? NSImage()
  }
}

// MARK: - NSPasteboardItemDataProvider
extension WorkspaceToolButton {

  func pasteboard(_ pasteboard: NSPasteboard?, item: NSPasteboardItem, provideDataForType type: String) {
    // FIXME
  }
}
