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, {
            tandem: options.tandem.createTandem('toggleNode')
        });
        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;
//# sourceMappingURL=BooleanRoundToggleButton.js.map