import '../../tandem/js/PhetioIDUtils.js';
import '../../globals.js';
// Copyright 2023-2024, University of Colorado Boulder
/**
 * DerivedStringProperty is typically used for strings that are derived from LocalizedStringProperty
 * (translatable strings, generated from the {{REPO}}-strings_en.json file via 'grunt modulify') and/or other instances
 * of DerivedStringProperty. Using this class ensures that code follows PhET-iO instrumentation standards,
 * and makes occurrences of this type of string Property easier to identify.
 *
 * Responsibilities include:
 *  - ensures that the derivation returns a string
 *  - adds proper PhET-iO metadata, with defaults that have been specified by PhET-iO design, which can be
 *    overridden where appropriate (e.g. phetioFeatured) and are not part of the public API where they should
 *    not be overridable (e.g. phetioValueType)
 *
 * Note that you can also use DerivedStringProperty for model/logic strings that are not translated. But you'll
 * need to consider whether you want to override the default of phetioFeatured: true, which was chosen as the default
 * for translated strings.
 *
 * See https://github.com/phetsims/phet-io/issues/1943
 *
 * @author Chris Malley (PixelZoom, Inc.)
 */
import DerivedProperty from './DerivedProperty.js';
import optionize from '../../phet-core/js/optionize.js';
import StringIO from '../../tandem/js/types/StringIO.js';
import axon from './axon.js';
export default class DerivedStringProperty extends DerivedProperty {
    constructor(dependencies, derivation, providedOptions) {
        const options = optionize()({
            phetioFeatured: true, // featured by default, see https://github.com/phetsims/phet-io/issues/1943
            phetioValueType: StringIO,
            tandemNameSuffix: 'StringProperty' // Change only with caution
        }, providedOptions);
        super(dependencies, derivation, options);
    }
}
axon.register('DerivedStringProperty', DerivedStringProperty);
//# sourceMappingURL=DerivedStringProperty.js.map