import _ from 'lodash';
import '../../globals.js';
// Copyright 2020-2023, University of Colorado Boulder
/**
 * Model for the home screen.
 *
 * @author Michael Kauzmann (PhET Interactive Simulations)
 * @author Sam Reid (PhET Interactive Simulations)
 * @author Chris Klusendorf (PhET Interactive Simulations)
 */
import Property from '../../axon/js/Property.js';
import joist from './joist.js';
import Screen from './Screen.js';
class HomeScreenModel {
    /**
     * @param screenProperty - the screen that is displayed to the user in the main area above the
     *                                           - navigation bar
     * @param simScreens
     * @param tandem
     */
    constructor(screenProperty, simScreens, activeSimScreensProperty, tandem) {
        this.simScreens = simScreens;
        this.screenProperty = screenProperty;
        this.activeSimScreensProperty = activeSimScreensProperty;
        this.selectedScreenProperty = new Property(simScreens[0], {
            validValues: simScreens,
            phetioValueType: Screen.ScreenIO,
            tandem: tandem.createTandem('selectedScreenProperty'),
            phetioFeatured: true
        });
        // the correct screen icon is selected when returning to the home screen
        this.screenProperty.link(screen => {
            if (_.includes(simScreens, screen)) {
                this.selectedScreenProperty.value = screen;
            }
        });
    }
    reset() { }
}
joist.register('HomeScreenModel', HomeScreenModel);
export default HomeScreenModel;
//# sourceMappingURL=HomeScreenModel.js.map