// Copyright 2013-2025, University of Colorado Boulder
/**
 * This toggle button uses a boolean Property and a trueNode and falseNode to display its content.
 *
 * @author Sam Reid
 */
import '../../../globals.js';
import optionize from '../../../phet-core/js/optionize.js';
import Tandem from '../../../tandem/js/Tandem.js';
import BooleanToggleNode from '../BooleanToggleNode.js';
import sun from '../sun.js';
import RoundToggleButton from './RoundToggleButton.js';
class BooleanRoundToggleButton extends RoundToggleButton {
    /**
     * @param booleanProperty
     * @param trueNode - shown when booleanProperty is true
     * @param falseNode - shown when booleanProperty is false
     * @param [providedOptions]
     */
    constructor(booleanProperty, trueNode, falseNode, providedOptions) {
        const options = optionize()({
            content: null,
            tandem: Tandem.REQUIRED
        }, providedOptions);
        const toggleNode = new BooleanToggleNode(booleanProperty, trueNode, falseNode);
        options.content = toggleNode;
        super(booleanProperty, false, true, options);
        this.disposeBooleanRoundToggleButton = function () {
            toggleNode.dispose();
        };
    }
    dispose() {
        this.disposeBooleanRoundToggleButton();
        super.dispose();
    }
}
sun.register('BooleanRoundToggleButton', BooleanRoundToggleButton);
export default BooleanRoundToggleButton;
