   @objc private func gestureHandler(_ panGestureRecognizer: UIPanGestureRecognizer) {
     let location = panGestureRecognizer.location(in: firstView)
 
-    if slideDirection == .left || slideDirection == .right {
+    switch slideDirection {
+    case .left, .right:
       guard (bounds.minX...bounds.maxX ~= location.x) else { return }
       updateMask(location: location.x)
-    } else {
+    case .top, .bottom:
       guard (bounds.minY...bounds.maxY ~= location.y) else { return }
       updateMask(location: location.y)
     }

  case bottom
}

public struct SlidableImageBorder {
  var borderWidth: CGFloat
  var borderColor: UIColor

    }
    mask.path = maskRectPath.cgPath
    secondView.layer.mask = mask
    switch slideDirection {
    case .left, .right:
      sliderCircle.center.x = maskLocation
    case .top, .bottom:
      sliderCircle.center.y = maskLocation
    }
  }
