import '../../globals.js';
// Copyright 2024, University of Colorado Boulder
/**
 * SoundDragListener extends DragListener to integrate PhET-specific sounds for grab and release.
 *
 * For grab and release sounds, responsibilities include:
 * - provide default sound files
 * - create SoundClips and register them with soundManager
 * - dispose of SoundClips and deregister them with soundManager
 *
 * @author Agustín Vallejo
 * @author Michael Kauzmann
 * @author Chris Malley (PixelZoom, Inc.)
 * @author Jesse Greenberg
 */
import { optionize3 } from '../../phet-core/js/optionize.js';
import { DragListener } from '../../scenery/js/imports.js';
import sceneryPhet from './sceneryPhet.js';
import SoundRichDragListener from './SoundRichDragListener.js';
export default class SoundDragListener extends DragListener {
    constructor(providedOptions) {
        // Get default sounds from SoundRichDragListener.
        const options = optionize3()({}, SoundRichDragListener.DEFAULT_SOUND_OPTIONS, providedOptions);
        super(options);
        // Unlink is not necessary because the link is removed when this DragListener is disposed.
        SoundRichDragListener.linkToDragEvents(this, options.grabSoundPlayer, options.releaseSoundPlayer);
    }
}
sceneryPhet.register('SoundDragListener', SoundDragListener);
//# sourceMappingURL=SoundDragListener.js.map