import{Settings as t}from"../common/common.js";import{i18n as o}from"../i18n/i18n.js";import{Runtime as i}from"../root/root.js";import{ViewManager as n,ActionRegistration as e}from"../ui/ui.js";const a={throttling:"Throttling",showThrottling:"Show Throttling",goOffline:"Go offline",device:"device",throttlingTag:"throttling",enableSlowGThrottling:"Enable slow 3G throttling",enableFastGThrottling:"Enable fast 3G throttling",goOnline:"Go online"},r=o.registerUIStrings("mobile_throttling/mobile_throttling-meta.ts",a),g=o.getLazilyComputedLocalizedString.bind(void 0,r);let l;async function s(){return l||(await i.Runtime.instance().loadModulePromise("mobile_throttling"),l=await import("./mobile_throttling.js")),l}n.registerViewExtension({location:"settings-view",id:"throttling-conditions",title:g(a.throttling),commandPrompt:g(a.showThrottling),order:35,loadView:async()=>(await s()).ThrottlingSettingsTab.ThrottlingSettingsTab.instance(),settings:["customNetworkConditions"]}),e.registerActionExtension({actionId:"network-conditions.network-offline",category:e.ActionCategory.NETWORK,title:g(a.goOffline),loadActionDelegate:async()=>(await s()).ThrottlingManager.ActionDelegate.instance(),tags:[g(a.device),g(a.throttlingTag)]}),e.registerActionExtension({actionId:"network-conditions.network-low-end-mobile",category:e.ActionCategory.NETWORK,title:g(a.enableSlowGThrottling),loadActionDelegate:async()=>(await s()).ThrottlingManager.ActionDelegate.instance(),tags:[g(a.device),g(a.throttlingTag)]}),e.registerActionExtension({actionId:"network-conditions.network-mid-tier-mobile",category:e.ActionCategory.NETWORK,title:g(a.enableFastGThrottling),loadActionDelegate:async()=>(await s()).ThrottlingManager.ActionDelegate.instance(),tags:[g(a.device),g(a.throttlingTag)]}),e.registerActionExtension({actionId:"network-conditions.network-online",category:e.ActionCategory.NETWORK,title:g(a.goOnline),loadActionDelegate:async()=>(await s()).ThrottlingManager.ActionDelegate.instance(),tags:[g(a.device),g(a.throttlingTag)]}),t.registerSettingExtension({settingName:"customNetworkConditions",settingType:t.SettingTypeObject.ARRAY,defaultValue:[]});export{a as UIStrings};
