 import Foundation
 import AppKit
 
-final class MenuDelegate: NSObject, NSMenuDelegate, NSSharingServiceDelegate {
+final class MenuDelegate: NSObject {
     // MARK: Menu Outlets
     @IBOutlet weak var copyCommentMenuItem: NSMenuItem!
     @IBOutlet weak var openUrlMenuItem: NSMenuItem!

        guard message.messageType == .chat, let chat = message.chat else { return }
        configureMenu(chat)
    }

    // MARK: Utility
    private func resetMenu() {}
    private func configureMenu(_ chat: Chat) {}

    // MARK: - Context Menu Handlers
    @IBAction func copyComment(_ sender: AnyObject) {
        guard let chat = MessageContainer.sharedContainer[tableView.clickedRow].chat,

        guard let url = URL(string: userPageUrlString) else { return }
        NSWorkspace.shared.open(url)
    }
}

private extension MenuDelegate {
    func resetMenu() {}
    func configureMenu(_ chat: Chat) {}

    func copyStringToPasteBoard(_ string: String) -> Bool {
        let pasteBoard = NSPasteboard.general
        pasteBoard.clearContents()
        let result = pasteBoard.setString(string, forType: .string)
        log.debug("copied \(string) w/ result \(result)")
        return result
    }
}
