import { ShowSignalSoundHelp, ShowAccessibilityAnnouncementHelp } from './commands.js';
import { localizeWithPath } from '../../../../nls.js';
import { registerAction2 } from '../../../../platform/actions/common/actions.js';
import { Extensions as Extensions$1 } from '../../../../platform/configuration/common/configurationRegistry.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
import { Extensions } from '../../../common/contributions.js';
import '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';
import { AccessibilitySignalLineDebuggerContribution } from './accessibilitySignalDebuggerContribution.js';
import { SignalLineFeatureContribution } from './accessibilitySignalLineFeatureContribution.js';
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(SignalLineFeatureContribution, 3 );
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(AccessibilitySignalLineDebuggerContribution, 3 );
const soundFeatureBase = {
    'type': 'string',
    'enum': ['auto', 'on', 'off'],
    'default': 'auto',
    'enumDescriptions': [
        ( localizeWithPath(
            'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
            'audioCues.enabled.auto',
            "Enable sound when a screen reader is attached."
        )),
        ( localizeWithPath(
            'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
            'audioCues.enabled.on',
            "Enable sound."
        )),
        ( localizeWithPath(
            'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
            'audioCues.enabled.off',
            "Disable sound."
        ))
    ],
    tags: ['accessibility'],
};
const markdownDeprecationMessage = ( localizeWithPath(
    'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
    'audioCues.enabled.deprecated',
    "This setting is deprecated. Use `signals` settings instead."
));
const soundDeprecatedFeatureBase = {
    ...soundFeatureBase,
    markdownDeprecationMessage
};
( Registry.as(Extensions$1.Configuration)).registerConfiguration({
    'properties': {
        'audioCues.enabled': {
            markdownDeprecationMessage: 'Deprecated. Use the specific setting for each audio cue instead (`audioCues.*`).',
            tags: ['accessibility']
        },
        'audioCues.volume': {
            markdownDeprecationMessage: 'Deprecated. Use `accessibility.signals.sounds.volume` instead.',
            tags: ['accessibility']
        },
        'audioCues.debouncePositionChanges': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.debouncePositionChanges',
                "Whether or not position changes should be debounced"
            )),
            'type': 'boolean',
            'default': false,
            tags: ['accessibility'],
            'markdownDeprecationMessage': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.debouncePositionChangesDeprecated',
                'This setting is deprecated, instead use the `signals.debouncePositionChanges` setting.'
            ))
        },
        'audioCues.lineHasBreakpoint': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.lineHasBreakpoint',
                "Plays a sound when the active line has a breakpoint."
            )),
            ...soundDeprecatedFeatureBase
        },
        'audioCues.lineHasInlineSuggestion': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.lineHasInlineSuggestion',
                "Plays a sound when the active line has an inline suggestion."
            )),
            ...soundDeprecatedFeatureBase
        },
        'audioCues.lineHasError': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.lineHasError',
                "Plays a sound when the active line has an error."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.lineHasFoldedArea': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.lineHasFoldedArea',
                "Plays a sound when the active line has a folded area that can be unfolded."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.lineHasWarning': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.lineHasWarning',
                "Plays a sound when the active line has a warning."
            )),
            ...soundDeprecatedFeatureBase,
            default: 'off',
        },
        'audioCues.onDebugBreak': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.onDebugBreak',
                "Plays a sound when the debugger stopped on a breakpoint."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.noInlayHints': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.noInlayHints',
                "Plays a sound when trying to read a line with inlay hints that has no inlay hints."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.taskCompleted': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.taskCompleted',
                "Plays a sound when a task is completed."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.taskFailed': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.taskFailed',
                "Plays a sound when a task fails (non-zero exit code)."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.terminalCommandFailed': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.terminalCommandFailed',
                "Plays a sound when a terminal command fails (non-zero exit code)."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.terminalQuickFix': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.terminalQuickFix',
                "Plays a sound when terminal Quick Fixes are available."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.terminalBell': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.terminalBell',
                "Plays a sound when the terminal bell is ringing."
            )),
            ...soundDeprecatedFeatureBase,
            default: 'on'
        },
        'audioCues.diffLineInserted': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.diffLineInserted',
                "Plays a sound when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.diffLineDeleted': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.diffLineDeleted',
                "Plays a sound when the focus moves to a deleted line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.diffLineModified': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.diffLineModified',
                "Plays a sound when the focus moves to a modified line in Accessible Diff Viewer mode or to the next/previous change."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.notebookCellCompleted': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.notebookCellCompleted',
                "Plays a sound when a notebook cell execution is successfully completed."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.notebookCellFailed': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.notebookCellFailed',
                "Plays a sound when a notebook cell execution fails."
            )),
            ...soundDeprecatedFeatureBase,
        },
        'audioCues.chatRequestSent': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.chatRequestSent',
                "Plays a sound when a chat request is made."
            )),
            ...soundDeprecatedFeatureBase,
            default: 'off'
        },
        'audioCues.chatResponsePending': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.chatResponsePending',
                "Plays a sound on loop while the response is pending."
            )),
            ...soundDeprecatedFeatureBase,
            default: 'auto'
        },
        'audioCues.chatResponseReceived': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.chatResponseReceived',
                "Plays a sound on loop while the response has been received."
            )),
            ...soundDeprecatedFeatureBase,
            default: 'off'
        },
        'audioCues.clear': {
            'description': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.clear',
                "Plays a sound when a feature is cleared (for example, the terminal, Debug Console, or Output channel). When this is disabled, an ARIA alert will announce 'Cleared'."
            )),
            ...soundDeprecatedFeatureBase,
            default: 'off'
        },
        'audioCues.save': {
            'markdownDescription': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.save',
                "Plays a sound when a file is saved. Also see {0}",
                '`#accessibility.alert.save#`'
            )),
            'type': 'string',
            'enum': ['userGesture', 'always', 'never'],
            'default': 'never',
            'enumDescriptions': [
                ( localizeWithPath(
                    'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                    'audioCues.save.userGesture',
                    "Plays the audio cue when a user explicitly saves a file."
                )),
                ( localizeWithPath(
                    'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                    'audioCues.save.always',
                    "Plays the audio cue whenever a file is saved, including auto save."
                )),
                ( localizeWithPath(
                    'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                    'audioCues.save.never',
                    "Never plays the audio cue."
                ))
            ],
            tags: ['accessibility'],
            markdownDeprecationMessage
        },
        'audioCues.format': {
            'markdownDescription': ( localizeWithPath(
                'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                'audioCues.format',
                "Plays a sound when a file or notebook is formatted. Also see {0}",
                '`#accessibility.alert.format#`'
            )),
            'type': 'string',
            'enum': ['userGesture', 'always', 'never'],
            'default': 'never',
            'enumDescriptions': [
                ( localizeWithPath(
                    'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                    'audioCues.format.userGesture',
                    "Plays the audio cue when a user explicitly formats a file."
                )),
                ( localizeWithPath(
                    'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                    'audioCues.format.always',
                    "Plays the audio cue whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."
                )),
                ( localizeWithPath(
                    'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution',
                    'audioCues.format.never',
                    "Never plays the audio cue."
                ))
            ],
            tags: ['accessibility'],
            markdownDeprecationMessage
        },
    },
});
registerAction2(ShowSignalSoundHelp);
registerAction2(ShowAccessibilityAnnouncementHelp);
export { soundFeatureBase };
