|
| 1 | +import type { DashboardDisplaySettings } from "../dashboard-settings.js"; |
| 2 | + |
| 3 | +export async function configureDashboardSettingsEntry( |
| 4 | + currentSettings: DashboardDisplaySettings | undefined, |
| 5 | + deps: { |
| 6 | + configureDashboardSettingsController: ( |
| 7 | + currentSettings: DashboardDisplaySettings | undefined, |
| 8 | + deps: { |
| 9 | + loadDashboardDisplaySettings: () => Promise<DashboardDisplaySettings>; |
| 10 | + promptSettings: ( |
| 11 | + settings: DashboardDisplaySettings, |
| 12 | + ) => Promise<DashboardDisplaySettings | null>; |
| 13 | + settingsEqual: ( |
| 14 | + left: DashboardDisplaySettings, |
| 15 | + right: DashboardDisplaySettings, |
| 16 | + ) => boolean; |
| 17 | + persistSelection: ( |
| 18 | + selected: DashboardDisplaySettings, |
| 19 | + ) => Promise<DashboardDisplaySettings>; |
| 20 | + applyUiThemeFromDashboardSettings: ( |
| 21 | + settings: DashboardDisplaySettings, |
| 22 | + ) => void; |
| 23 | + isInteractive: () => boolean; |
| 24 | + getDashboardSettingsPath: () => string; |
| 25 | + writeLine: (message: string) => void; |
| 26 | + }, |
| 27 | + ) => Promise<DashboardDisplaySettings>; |
| 28 | + loadDashboardDisplaySettings: () => Promise<DashboardDisplaySettings>; |
| 29 | + promptSettings: ( |
| 30 | + settings: DashboardDisplaySettings, |
| 31 | + ) => Promise<DashboardDisplaySettings | null>; |
| 32 | + settingsEqual: ( |
| 33 | + left: DashboardDisplaySettings, |
| 34 | + right: DashboardDisplaySettings, |
| 35 | + ) => boolean; |
| 36 | + persistSelection: ( |
| 37 | + selected: DashboardDisplaySettings, |
| 38 | + ) => Promise<DashboardDisplaySettings>; |
| 39 | + applyUiThemeFromDashboardSettings: ( |
| 40 | + settings: DashboardDisplaySettings, |
| 41 | + ) => void; |
| 42 | + isInteractive: () => boolean; |
| 43 | + getDashboardSettingsPath: () => string; |
| 44 | + writeLine: (message: string) => void; |
| 45 | + }, |
| 46 | +): Promise<DashboardDisplaySettings> { |
| 47 | + return deps.configureDashboardSettingsController(currentSettings, { |
| 48 | + loadDashboardDisplaySettings: deps.loadDashboardDisplaySettings, |
| 49 | + promptSettings: deps.promptSettings, |
| 50 | + settingsEqual: deps.settingsEqual, |
| 51 | + persistSelection: deps.persistSelection, |
| 52 | + applyUiThemeFromDashboardSettings: deps.applyUiThemeFromDashboardSettings, |
| 53 | + isInteractive: deps.isInteractive, |
| 54 | + getDashboardSettingsPath: deps.getDashboardSettingsPath, |
| 55 | + writeLine: deps.writeLine, |
| 56 | + }); |
| 57 | +} |
0 commit comments