import { f as RichTypeNumber, R as RichTypeAny } from './declarationMapper-CZ6AxirO.esm.js';
import { f as RegisterClass } from './index-Cl9U4nB-.esm.js';
import { F as FlowGraphCachedOperationBlock } from './flowGraphCachedOperationBlock-CXT0nB7S.esm.js';
import './KHR_interactivity-VqtS29i9.esm.js';
import './objectModelMapping-ghOGfUOh.esm.js';

/**
 * @experimental
 * A data block that reads the current volume of an Audio V2 sound.
 */
class FlowGraphGetSoundVolumeBlock extends FlowGraphCachedOperationBlock {
    /**
     * Constructs a new FlowGraphGetSoundVolumeBlock.
     * @param config - optional configuration for the block
     */
    constructor(config) {
        super(RichTypeNumber, config);
        this.sound = this.registerDataInput("sound", RichTypeAny);
    }
    /**
     * @internal
     */
    _doOperation(context) {
        const soundValue = this.sound.getValue(context);
        if (!soundValue) {
            return undefined;
        }
        return soundValue.volume;
    }
    /**
     * @returns class name of the block.
     */
    getClassName() {
        return "FlowGraphGetSoundVolumeBlock" /* FlowGraphBlockNames.AudioGetVolume */;
    }
}
RegisterClass("FlowGraphGetSoundVolumeBlock" /* FlowGraphBlockNames.AudioGetVolume */, FlowGraphGetSoundVolumeBlock);

export { FlowGraphGetSoundVolumeBlock };
//# sourceMappingURL=flowGraphGetSoundVolumeBlock-DJNVnRUZ.esm.js.map
