import '../../globals.js';
// Copyright 2016-2022, University of Colorado Boulder
/**
 * Property whose value must be true or false. Truthy/falsy values are invalid.
 *
 * @author Sam Reid (PhET Interactive Simulations)
 * @author Chris Malley (PixelZoom, Inc.)
 */
import optionize from '../../phet-core/js/optionize.js';
import BooleanIO from '../../tandem/js/types/BooleanIO.js';
import axon from './axon.js';
import Property from './Property.js';
export default class BooleanProperty extends Property {
    constructor(value, providedOptions) {
        // Fill in superclass options that are controlled by BooleanProperty.
        const options = optionize()({
            valueType: 'boolean',
            phetioValueType: BooleanIO
        }, providedOptions);
        super(value, options);
    }
    toggle() {
        this.value = !this.value;
    }
}
axon.register('BooleanProperty', BooleanProperty);
//# sourceMappingURL=BooleanProperty.js.map