// Copyright 2024, University of Colorado Boulder
/**
 * FaucetControlsKeyboardHelpSection is the keyboard-help section that describes how to interact with FaucetNode.
 * See https://github.com/phetsims/scenery-phet/issues/839 for design history.
 *
 * @author Chris Malley (PixelZoom, Inc.)
 */
import { string_scenery_phet_keyboardHelpDialog_faucetControls_faucetControls_StringProperty } from '../../strings/keyboardHelpDialog/faucetControls/faucetControls.js';
import { string_scenery_phet_keyboardHelpDialog_faucetControls_adjustFaucetFlow_StringProperty } from '../../strings/keyboardHelpDialog/faucetControls/adjustFaucetFlow.js';
import { string_scenery_phet_keyboardHelpDialog_faucetControls_adjustInSmallerSteps_StringProperty } from '../../strings/keyboardHelpDialog/faucetControls/adjustInSmallerSteps.js';
import { string_scenery_phet_keyboardHelpDialog_faucetControls_adjustInLargerSteps_StringProperty } from '../../strings/keyboardHelpDialog/faucetControls/adjustInLargerSteps.js';
import { string_scenery_phet_keyboardHelpDialog_faucetControls_openFaucetFully_StringProperty } from '../../strings/keyboardHelpDialog/faucetControls/openFaucetFully.js';
import { string_scenery_phet_keyboardHelpDialog_faucetControls_openFaucetBriefly_StringProperty } from '../../strings/keyboardHelpDialog/faucetControls/openFaucetBriefly.js';
import '../../../../globals.js';
import optionize from '../../../../phet-core/js/optionize.js';
import FaucetNode from '../../FaucetNode.js';
import sceneryPhet from '../../sceneryPhet.js';
import ArrowKeyNode from '../ArrowKeyNode.js';
import TextKeyNode from '../TextKeyNode.js';
import KeyboardHelpIconFactory from './KeyboardHelpIconFactory.js';
import KeyboardHelpSection from './KeyboardHelpSection.js';
import KeyboardHelpSectionRow from './KeyboardHelpSectionRow.js';
const headingStringProperty = string_scenery_phet_keyboardHelpDialog_faucetControls_faucetControls_StringProperty;
const adjustFaucetFlowStringProperty = string_scenery_phet_keyboardHelpDialog_faucetControls_adjustFaucetFlow_StringProperty;
const adjustInSmallerStepsStringProperty = string_scenery_phet_keyboardHelpDialog_faucetControls_adjustInSmallerSteps_StringProperty;
const adjustInLargerStepsStringProperty = string_scenery_phet_keyboardHelpDialog_faucetControls_adjustInLargerSteps_StringProperty;
const openFaucetFullyStringProperty = string_scenery_phet_keyboardHelpDialog_faucetControls_openFaucetFully_StringProperty;
const openFaucetBrieflyStringProperty = string_scenery_phet_keyboardHelpDialog_faucetControls_openFaucetBriefly_StringProperty;
export default class FaucetControlsKeyboardHelpSection extends KeyboardHelpSection {
    constructor(providedOptions) {
        const options = optionize()({
            // SelfOptions
            tapToDispenseEnabled: false
        }, providedOptions);
        const leftRightArrowKeysIcon = KeyboardHelpIconFactory.iconRow([new ArrowKeyNode('left'), new ArrowKeyNode('right')]);
        // Adjust faucet flow [<] [>]
        const adjustFaucetFlowRow = KeyboardHelpSectionRow.labelWithIcon(adjustFaucetFlowStringProperty, leftRightArrowKeysIcon);
        // Adjust in smaller steps [Shift] + [<] [>]
        const adjustInSmallerStepsRow = KeyboardHelpSectionRow.labelWithIcon(adjustInSmallerStepsStringProperty, KeyboardHelpIconFactory.shiftPlusIcon(leftRightArrowKeysIcon));
        // Adjust in larger steps [Pg Up] [Pg Down]
        const adjustInLargerStepsRow = KeyboardHelpSectionRow.labelWithIcon(adjustInLargerStepsStringProperty, KeyboardHelpIconFactory.pageUpPageDownRowIcon());
        // Close faucet [Home] or [0]
        const closeFaucetRow = KeyboardHelpSectionRow.fromHotkeyData(FaucetNode.CLOSE_FAUCET_HOTKEY_DATA);
        // Open faucet fully [End]
        const openFaucetFullyRow = KeyboardHelpSectionRow.labelWithIcon(openFaucetFullyStringProperty, TextKeyNode.end());
        const content = [
            adjustFaucetFlowRow,
            adjustInSmallerStepsRow,
            adjustInLargerStepsRow,
            closeFaucetRow,
            openFaucetFullyRow
        ];
        // Open faucet briefly [Space] or [Enter]
        if (options.tapToDispenseEnabled) {
            const openFaucetBrieflyRow = KeyboardHelpSectionRow.labelWithIcon(openFaucetBrieflyStringProperty, KeyboardHelpIconFactory.iconOrIcon(TextKeyNode.space(), TextKeyNode.enter()));
            content.push(openFaucetBrieflyRow);
        }
        super(headingStringProperty, content, options);
    }
}
sceneryPhet.register('FaucetControlsKeyboardHelpSection', FaucetControlsKeyboardHelpSection);
