import { d as RichTypeNumber, R as RichTypeAny } from './declarationMapper-CyxdrUFP.esm.js';
import { F as FlowGraphCachedOperationBlock } from './flowGraphCachedOperationBlock-BYuTMQ0T.esm.js';
import { R as RegisterClass } from './index-BvJBnIUK.esm.js';
import './KHR_interactivity-BGk_Crki.esm.js';
import './objectModelMapping-BtiDAwYm.esm.js';

/** This file must only contain pure code and pure imports */
/**
 * @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 */;
    }
}
let _Registered = false;
/**
 * Register side effects for flowGraphGetSoundVolumeBlock.
 * Safe to call multiple times; only the first call has an effect.
 */
function RegisterFlowGraphGetSoundVolumeBlock() {
    if (_Registered) {
        return;
    }
    _Registered = true;
    RegisterClass("FlowGraphGetSoundVolumeBlock" /* FlowGraphBlockNames.AudioGetVolume */, FlowGraphGetSoundVolumeBlock);
}

/**
 * Re-exports pure implementation and applies runtime side effects.
 * Import flowGraphGetSoundVolumeBlock.pure for tree-shakeable, side-effect-free usage.
 */
RegisterFlowGraphGetSoundVolumeBlock();

export { FlowGraphGetSoundVolumeBlock, RegisterFlowGraphGetSoundVolumeBlock };
//# sourceMappingURL=flowGraphGetSoundVolumeBlock-Cat6t251.esm.js.map
