// navigation_provider.dart — 主导航当前视图（三端共享）
import 'package:flutter_riverpod/flutter_riverpod.dart';

/// 一级视图 + 账户子页。
/// desktop 侧栏暴露 6 个一级项（connect..settings）；mobile/tablet 取前 4 项，
/// contact/settings 在 mobile 走账户子页。plans/redeem 是 account 的下钻页。
enum NavView { connect, servers, stats, account, contact, settings, plans, redeem, devices }

/// 账户下钻子页（desktop 在内容区切换、顶栏带返回；mobile/tablet 走全屏 push）。
const Set<NavView> kAccountSubViews = {NavView.plans, NavView.redeem, NavView.devices};

/// 当前视图。
final navViewProvider = StateProvider<NavView>((ref) => NavView.connect);

/// mobile / tablet 的一级项顺序（底 Tab / 侧栏）。
const List<NavView> kPrimaryNav = [
  NavView.connect,
  NavView.servers,
  NavView.stats,
  NavView.account,
];

/// desktop 侧栏一级项顺序。
const List<NavView> kDesktopNav = [
  NavView.connect,
  NavView.servers,
  NavView.stats,
  NavView.account,
  NavView.contact,
  NavView.settings,
];
