     private var scrollBarView: UIView?
     private var panGestureRecognizer: UIPanGestureRecognizer?
     private let contentOffsetKeyPath = #keyPath(UIScrollView.contentOffset)
+    private var fadeOutWorkItem: DispatchWorkItem?
+    private var lastPanTranslation: CGFloat = 0.0
 
     // MARK: - Lifecycle
     

    
    private struct Constants {
        static let rightOffset: CGFloat = 30.0
    }
    
    // MARK: - Public properties

    }
    
    // MARK: - Private
    
    private func scheduleFadeOut() {
        fadeOutWorkItem?.cancel()
        fadeOutWorkItem = DispatchWorkItem() {
            [weak self] in
            UIView.animate(withDuration: Constants.fadeOutAnimationDuration) {
                self?.scrollBarView?.alpha = 0.0
            }
        }
        DispatchQueue.main.asyncAfter(deadline: .now() + Constants.fadeOutAnimationDelay,
                                      execute: fadeOutWorkItem!)
    }
    
    private func removeOldScrollBar() {
        guard let oldScrollBarView = scrollBarView else { return }
