from __future__ import annotations import flet as ft from app.services.settings_registry import SettingsRegistry from app.theme import card def build_settings_screen(page: ft.Page, registry: SettingsRegistry) -> ft.Control: body = ft.Column(spacing=14, scroll=ft.ScrollMode.AUTO, expand=True) sections = registry.sections() body.controls = [ ft.Text("Настройки", size=22, weight=ft.FontWeight.W_600), card( ft.Column( [ ft.Text("Динамические разделы", weight=ft.FontWeight.W_600), *[ ft.Text(f"{item.title}: доступно из соответствующего экрана") for item in sections ], ], spacing=8, ) ), card( ft.Column( [ ft.Text("Приватность", weight=ft.FontWeight.W_600), ft.Text( "Management/debug API выключены. Секреты не выводятся в логи.", color=ft.Colors.OUTLINE, ), ], spacing=8, ) ), ] return body