import { dispatchMouseEvent } from './dispatch-event' ; export function dragIt ( dragStep , element ? , x = 0 , y = 0 ) { switch ( dragStep ) { case 'start' : dispatchMouseEvent ( element , 'mousedown' ) ; break ; case 'move' : dispatchMouseEvent ( document , 'mousemove' , x , y ) ; break ; case 'stop' : dispatchMouseEvent ( document , 'mouseup' ) ; break ; } }