import { b as FlowGraphExecutionBlockWithOutSignal } from './KHR_interactivity-VqtS29i9.esm.js';
import { R as RichTypeAny } from './declarationMapper-CZ6AxirO.esm.js';
import { f as RegisterClass } from './index-Cl9U4nB-.esm.js';
import './objectModelMapping-ghOGfUOh.esm.js';

/**
 * @experimental
 * A block that stops an Audio V2 sound.
 */
class FlowGraphStopSoundBlock extends FlowGraphExecutionBlockWithOutSignal {
    /**
     * Constructs a new FlowGraphStopSoundBlock.
     * @param config - optional configuration for the block
     */
    constructor(config) {
        super(config);
        this.sound = this.registerDataInput("sound", RichTypeAny);
    }
    /**
     * @internal
     */
    _execute(context, _callingSignal) {
        const soundValue = this.sound.getValue(context);
        if (!soundValue) {
            this._reportError(context, "No sound provided");
            this.out._activateSignal(context);
            return;
        }
        soundValue.stop();
        this.out._activateSignal(context);
    }
    /**
     * @returns class name of the block.
     */
    getClassName() {
        return "FlowGraphStopSoundBlock" /* FlowGraphBlockNames.AudioStopSound */;
    }
}
RegisterClass("FlowGraphStopSoundBlock" /* FlowGraphBlockNames.AudioStopSound */, FlowGraphStopSoundBlock);

export { FlowGraphStopSoundBlock };
//# sourceMappingURL=flowGraphStopSoundBlock-adLUmgoy.esm.js.map
