package middleware

import (
	"game-driver/internal/common"
	"game-driver/leaf"
)

func PauseWait(ctrl *common.CtrlWait) leaf.HandlerFunc {
	return func(c *leaf.Context) {
		ctrl.Pause()
		defer ctrl.Resume()

		c.Next()
	}
}
