export type AdminDashboardCardStatus = 'loading' | 'ready' | 'empty' | 'error' | 'pending-backend';

export interface AdminDashboardCardState<T> {
  status: AdminDashboardCardStatus;
  value: T | null;
}

export interface AdminDashboardMetrics {
  categoriesCount: number;
  productsCount: number;
}

export type AdminDashboardQuickActionId =
  | 'edit-project'
  | 'categories'
  | 'products'
  | 'static-pages'
  | 'transactions'
  | 'orders'
  | 'media-library'
  | 'users'
  | 'monitoring'
  | 'analytics'
  | 'preview-marketplace'
  | 'add-product'
  | 'create-category'
  | 'edit-homepage';

export interface AdminDashboardQuickAction {
  id: AdminDashboardQuickActionId;
  icon: string;
  labelKey: string;
  descriptionKey: string;
  route: string[];
  external?: boolean;
}

export type AdminDashboardActivityType = 'draft-saved' | 'published';

export interface AdminDashboardActivityEntry {
  id: string;
  type: AdminDashboardActivityType;
  timestamp: number;
}

/** Kept exactly as-is: AdminMonitoringPageComponent also reads AdminDashboardFacade.healthChecks() and depends on this boolean shape. */
export interface AdminDashboardHealthCheck {
  code: string;
  labelKey: string;
  healthy: boolean;
}

/**
 * healthy: green check. attention: amber, informational (e.g. a draft exists) - not a defect.
 * unhealthy: red, a real validation problem. unknown: this sprint has no data source for the
 * check yet (never fabricated) - shown honestly rather than guessed.
 */
export type AdminDashboardHealthStatus = 'healthy' | 'attention' | 'unhealthy' | 'unknown' | 'loading';

/** Richer status rows for the redesigned dashboard homepage (Sprint 2) - separate from AdminDashboardHealthCheck above so Monitoring's existing boolean-badge usage stays untouched. */
export interface AdminDashboardHomeHealthCheck {
  code: string;
  labelKey: string;
  status: AdminDashboardHealthStatus;
  /** Set for metric-style rows (e.g. product count) rendered as a number instead of a pass/fail statement. */
  displayValue?: string | null;
}

export interface AdminDashboardDraftField {
  key: string;
  labelKey: string;
}

export interface AdminDashboardShortcut {
  id: string;
  icon: string;
  labelKey: string;
  route: string[];
  comingSoon?: boolean;
}
