 import SnapKit
 import IGListKit
 
+protocol IssueCommentReactionCellDelegate {
+    func didSelect(cell: IssueCommentReactionCell, reaction: ReactionType)
+}
+
 final class IssueCommentReactionCell: UICollectionViewCell,
 IGListBindable,
 UICollectionViewDataSource,

    func onAddButton() {
        addButton.becomeFirstResponder()

        let menu = UIMenuController.shared
        let reactions: [ReactionType] = [
            .thumbsUp,
            .thumbsDown,
            .laugh,
            .hooray,
            .confused,
            .heart,
        ]

        menu.menuItems = reactions.map {
            UIMenuItem(title: $0.rawValue, action: #selector(IssueCommentReactionCell.empty(item:)))
        }
        menu.setTargetRect(addButton.bounds, in: addButton)
        menu.setMenuVisible(true, animated: true)
    }

    override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {
        switch action {
        case #selector(IssueCommentReactionCell.empty(item:)): return true
        default: return false
        }
    }

    func empty(item: Any) {
        print("selected")
    }

    // MARK: IGListBindable


    static let reuse = "cell"

    public var delegate: IssueCommentReactionCellDelegate? = nil

    private let addButton = ResponderButton()
    private let collectionView: UICollectionView = {
        let layout = UICollectionViewFlowLayout()
        layout.scrollDirection = .horizontal
        layout.minimumInteritemSpacing = Styles.Sizes.columnSpacing / 2.0
