 
     private func moveUp(with duration: TimeInterval = ClapprAnimationDuration.mediaControlShow) {
         toggleContentInteraction(enabled: true)
-        topDistanceFromBottom.constant = openedYPosition
+        drawerTopConstraint.constant = openedYPosition
         refreshSuperviewLayout(with: duration)
     }
 
     private func moveDown(with duration: TimeInterval = ClapprAnimationDuration.mediaControlHide) {
         toggleContentInteraction(enabled: false)
-        topDistanceFromBottom.constant = closedYPosition
+        drawerTopConstraint.constant = hintPosition
         refreshSuperviewLayout(with: duration)
     }
 

        addGesture(UIPanGestureRecognizer(target: self, action: #selector(onDragView)))
    }

    private func initConstraint() {
        guard let superview = view.superview else { return }

        topDistanceFromBottom = view.topAnchor.constraint(equalTo: superview.bottomAnchor, constant: 0)
        specifiedHeightConstraint = view.heightAnchor.constraint(equalToConstant: height)
        maxHeightConstraint = view.heightAnchor.constraint(equalTo: superview.heightAnchor, multiplier: 0.5)
    }

    override open func render() {
        super.render()

        adjustSize()
        adjustPosition()
    }

    private func adjustSize() {
        view.translatesAutoresizingMaskIntoConstraints = false

        addWidthConstraint()
        addHeightConstraint()
        adjustHeightConstraint()
    }

    private func addWidthConstraint() {
        guard let superview = view.superview else { return }

        let widthConstraint = view.widthAnchor.constraint(equalTo: superview.widthAnchor, constant: 0)
        widthConstraint.isActive = true
    }

    private func addHeightConstraint() {
        guard let superview = view.superview else { return }
        specifiedHeightConstraint = view.heightAnchor.constraint(equalToConstant: height)
        maxHeightConstraint = view.heightAnchor.constraint(equalTo: superview.heightAnchor, multiplier: 0.5)
    }
    
    private func adjustHeightConstraint() {
        if height < maxHeight {
            maxHeightConstraint.isActive = false
            specifiedHeightConstraint.isActive = true
        } else {
            specifiedHeightConstraint.isActive = false
            maxHeightConstraint.isActive = true
        }
    }

    private func adjustPosition() {
        guard let superview = view.superview else { return }

        topDistanceFromBottom = view.topAnchor.constraint(equalTo: superview.bottomAnchor, constant: placeholder * -1)
        topDistanceFromBottom.isActive = true
    }

    override open func onDrawerShow() {

        guard let view = gesture.view else { return }

        let translation = gesture.translation(in: view)
        let newBottomDistance = drawerTopConstraint.constant + translation.y

        if canDrag(with: newBottomDistance) {
            drawerTopConstraint.constant = newBottomDistance

            calculateMediaControlAlpha(for: newBottomDistance)
        }
    }

    private func calculateMediaControlAlpha(for newBottomDistance: CGFloat) {
        let maxOpacity: CGFloat = 1.0
        let distanceFromBottom = abs(newBottomDistance)
        let portionShown = distanceFromBottom / actualHeight
        let mediaControlAlpha = maxOpacity - portionShown

        core?.trigger(InternalEvent.didDragDrawer.rawValue, userInfo: ["alpha": mediaControlAlpha])
    }

    private func handleGestureEnded(for newYCoordinate: CGFloat) {
        let halfway = overlayViewFrame.height - ((actualHeight + placeholder) * 0.5)
        let isHalfwayOpen = newYCoordinate <= halfway
        
        isHalfwayOpen ? showDrawerPlugin() : hideDrawerPlugin()
    }

    private func canDrag(with newBottomDistance: CGFloat) -> Bool {
        let canDragUp = abs(newBottomDistance) < actualHeight
        let canDragDown = abs(newBottomDistance) >= placeholder

        return canDragUp && canDragDown
    }
}
