import '../../../globals.js';
import merge from '../../../phet-core/js/merge.js';
import { VBox, VoicingRichText } from '../../../scenery/js/imports.js';
import isLeftToRightProperty from '../i18n/isLeftToRightProperty.js';
import joist from '../joist.js';
import JoistStrings from '../JoistStrings.js';
import PreferencesDialog from './PreferencesDialog.js';
import PreferencesPanel from './PreferencesPanel.js';
import PreferencesType from './PreferencesType.js';
class OverviewPreferencesPanel extends PreferencesPanel {
    constructor(selectedTabProperty, tabVisibleProperty) {
        super(PreferencesType.OVERVIEW, selectedTabProperty, tabVisibleProperty);
        const introTextOptions = merge({}, PreferencesDialog.PANEL_SECTION_CONTENT_OPTIONS, {
            // using lineWrap instead of default maxWidth for content
            maxWidth: null,
            lineWrap: 600,
            maxHeight: 600,
            tagName: 'p'
        });
        const introParagraphsTexts = [
            // These string keys go through preferences.tabs.general because they used to
            // live in that tab. But now we cannot rename the string keys.
            new VoicingRichText(JoistStrings.preferences.tabs.general.accessibilityIntroStringProperty, introTextOptions),
            new VoicingRichText(JoistStrings.preferences.tabs.general.moreAccessibilityStringProperty, introTextOptions)
        ];
        const panelContent = new VBox({ spacing: 10, children: introParagraphsTexts });
        this.addChild(panelContent);
        const leftToRightListener = (isLTR) => {
            introParagraphsTexts.forEach(text => {
                const align = isLTR ? 'left' : 'right';
                text.align = align;
                panelContent.align = align;
            });
        };
        isLeftToRightProperty.link(leftToRightListener);
    }
}
joist.register('OverviewPreferencesPanel', OverviewPreferencesPanel);
export default OverviewPreferencesPanel;
//# sourceMappingURL=OverviewPreferencesPanel.js.map