 
     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() {

open class BottomDrawerPlugin: DrawerPlugin {
    private var maxHeight: CGFloat {
        overlayViewFrame.height/2
    }

    open var desiredHeight: CGFloat {
        maxHeight
    }

    override open var position: DrawerPlugin.Position {
        .bottom
    }
    
    private var hintPosition: CGFloat {
        placeholder * -1
    }

    private var actualHeight: CGFloat {
        min(desiredHeight, maxHeight)
    }
    
    private var openedYPosition: CGFloat {
        actualHeight * -1
    }

    private var drawerTopConstraint: NSLayoutConstraint!
    private var maxHeightConstraint: NSLayoutConstraint!
    private var desiredHeightConstraint: NSLayoutConstraint!

    required public init(context: UIObject) {
        super.init(context: context)
        addGestures()
        bindEvents()
    }
    
