import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as o from"../../ui/legacy/legacy.js";const i={sensors:"Sensors",geolocation:"geolocation",timezones:"timezones",locale:"locale",locales:"locales",accelerometer:"accelerometer",deviceOrientation:"device orientation",locations:"Locations",touch:"Touch",devicebased:"Device-based",forceEnabled:"Force enabled",emulateIdleDetectorState:"Emulate Idle Detector state",noIdleEmulation:"No idle emulation",userActiveScreenUnlocked:"User active, screen unlocked",userActiveScreenLocked:"User active, screen locked",userIdleScreenUnlocked:"User idle, screen unlocked",userIdleScreenLocked:"User idle, screen locked",showSensors:"Show Sensors",showLocations:"Show Locations",cpuPressure:"CPU Pressure",noPressureEmulation:"No override",nominal:"Nominal",fair:"Fair",serious:"Serious",critical:"Critical"},n=t.i18n.registerUIStrings("panels/sensors/sensors-meta.ts",i),l=t.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let s;async function a(){return s||(s=await import("./sensors.js")),s}o.ViewManager.registerViewExtension({location:"drawer-view",commandPrompt:l(i.showSensors),title:l(i.sensors),id:"sensors",persistence:"closeable",order:100,loadView:async()=>new((await a()).SensorsView.SensorsView),tags:[l(i.geolocation),l(i.timezones),l(i.locale),l(i.locales),l(i.accelerometer),l(i.deviceOrientation)]}),o.ViewManager.registerViewExtension({location:"settings-view",id:"emulation-locations",commandPrompt:l(i.showLocations),title:l(i.locations),order:40,loadView:async()=>new((await a()).LocationsSettingsTab.LocationsSettingsTab),settings:["emulation.locations"],iconName:"location-on"}),e.Settings.registerSettingExtension({storageType:"Synced",settingName:"emulation.locations",settingType:"array",defaultValue:[{title:"Berlin",lat:52.520007,long:13.404954,timezoneId:"Europe/Berlin",locale:"de-DE"},{title:"London",lat:51.507351,long:-.127758,timezoneId:"Europe/London",locale:"en-GB"},{title:"Moscow",lat:55.755826,long:37.6173,timezoneId:"Europe/Moscow",locale:"ru-RU"},{title:"Mountain View",lat:37.386052,long:-122.083851,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Mumbai",lat:19.075984,long:72.877656,timezoneId:"Asia/Kolkata",locale:"mr-IN"},{title:"San Francisco",lat:37.774929,long:-122.419416,timezoneId:"America/Los_Angeles",locale:"en-US"},{title:"Shanghai",lat:31.230416,long:121.473701,timezoneId:"Asia/Shanghai",locale:"zh-Hans-CN"},{title:"São Paulo",lat:-23.55052,long:-46.633309,timezoneId:"America/Sao_Paulo",locale:"pt-BR"},{title:"Tokyo",lat:35.689487,long:139.691706,timezoneId:"Asia/Tokyo",locale:"ja-JP"}]}),e.Settings.registerSettingExtension({title:l(i.cpuPressure),reloadRequired:!0,settingName:"emulation.cpu-pressure",settingType:"enum",defaultValue:"none",options:[{value:"none",title:l(i.noPressureEmulation),text:l(i.noPressureEmulation)},{value:"nominal",title:l(i.nominal),text:l(i.nominal)},{value:"fair",title:l(i.fair),text:l(i.fair)},{value:"serious",title:l(i.serious),text:l(i.serious)},{value:"critical",title:l(i.critical),text:l(i.critical)}]}),e.Settings.registerSettingExtension({title:l(i.touch),reloadRequired:!0,settingName:"emulation.touch",settingType:"enum",defaultValue:"none",options:[{value:"none",title:l(i.devicebased),text:l(i.devicebased)},{value:"force",title:l(i.forceEnabled),text:l(i.forceEnabled)}]}),e.Settings.registerSettingExtension({title:l(i.emulateIdleDetectorState),settingName:"emulation.idle-detection",settingType:"enum",defaultValue:"none",options:[{value:"none",title:l(i.noIdleEmulation),text:l(i.noIdleEmulation)},{value:'{"isUserActive":true,"isScreenUnlocked":true}',title:l(i.userActiveScreenUnlocked),text:l(i.userActiveScreenUnlocked)},{value:'{"isUserActive":true,"isScreenUnlocked":false}',title:l(i.userActiveScreenLocked),text:l(i.userActiveScreenLocked)},{value:'{"isUserActive":false,"isScreenUnlocked":true}',title:l(i.userIdleScreenUnlocked),text:l(i.userIdleScreenUnlocked)},{value:'{"isUserActive":false,"isScreenUnlocked":false}',title:l(i.userIdleScreenLocked),text:l(i.userIdleScreenLocked)}]});
