import { Optional } from '@ephox/katamari';
import * as DraggingApis from '../../behaviour/dragging/DraggingApis';
import * as DraggingBranches from '../../behaviour/dragging/DraggingBranches';
import * as DragState from '../../dragging/common/DragState';
import * as Behaviour from './Behaviour';
const Dragging = Behaviour.createModes({
    branchKey: 'mode',
    branches: DraggingBranches,
    name: 'dragging',
    active: {
        events: (dragConfig, dragState) => {
            const dragger = dragConfig.dragger;
            return dragger.handlers(dragConfig, dragState);
        }
    },
    extra: {
        // Extra. Does not need component as input.
        snap: (sConfig) => ({
            sensor: sConfig.sensor,
            range: sConfig.range,
            output: sConfig.output,
            extra: Optional.from(sConfig.extra)
        })
    },
    state: DragState,
    apis: DraggingApis
});
export { Dragging };
//# sourceMappingURL=Dragging.js.map