import*as Host from"../host/host.js";import*as i18n from"../i18n/i18n.js";import*as Snippets from"../snippets/snippets.js";import*as UI from"../ui/ui.js";import{Plugin}from"./Plugin.js";const UIStrings={enter:"\u2318+Enter",ctrlenter:"Ctrl+Enter"},str_=i18n.i18n.registerUIStrings("sources/SnippetsPlugin.js",UIStrings),i18nString=i18n.i18n.getLocalizedString.bind(void 0,str_);export class SnippetsPlugin extends Plugin{constructor(t,i){super(),this._textEditor=t,this._uiSourceCode=i}static accepts(t){return Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(t)}async rightToolbarItems(){const t=UI.Toolbar.Toolbar.createActionButtonForId("debugger.run-snippet");return t.setText(Host.Platform.isMac()?i18nString(UIStrings.enter):i18nString(UIStrings.ctrlenter)),[t]}}