"use strict";

/**
 * index.js — re-exports all public symbols from the statusline source modules.
 * This matches the module.exports shape of the compiled evolv-statusline.js.
 */

const {
  stripAnsi,
  visWidth,
  padToWidth,
  formatTokens,
  shortenPath,
} = require("./helpers");

const {
  compBrandVersion,
  compBrandVersionModel,
  compModel,
  compModelLabeled,
  compStatus,
  compContextBar,
  compContextCombined,
  compTokensCtx,
  compTokensIo,
  compUsageTime,
  compDevRigor,
  compStyle,
  compProtection,
  compProjectType,
  compLearning,
  compCost,
  compCacheHit,
  compRateLimits,
  compLinesChanged,
  compLifecycle,
  compPlaceholder,
  compFeature,
  compPhase,
  compStage,
  compPhaseStage,
  compNextCmd,
  COMPONENT_REGISTRY,
} = require("./components");

const {
  COL_GAP,
  GRID_COLS,
  renderRowGrid,
  renderRowFlow,
  getGridCols,
  renderTable,
} = require("./grid-renderer");

const {
  DEFAULT_LAYOUT,
  loadConfig,
  collectConfigRows,
  renderConfigRows,
  collectDirRows,
  renderDirRows,
} = require("./layout-engine");

const {
  parseStdin,
  resolveSessionId,
  readBridgeFile,
  readEckVersion,
  readRegistryProject,
  readOutputStyle,
  readProtection,
  gitBranch,
  gitDirtyCount,
  gitToplevel,
  deduplicateDirs,
  writeBridge,
  writeSessionId,
  writeSessionFileStatus,
  countActiveSessionsStatus,
  resolveActiveFeatureStatus,
  pruneDeadSessionsStatus,
} = require("./data-gathering");

const {
  readLifecycleSteps,
  readLifecycleFeature,
  readLifecycleFeatureId,
  readParkedCount,
  readBacklogCount,
  readBestIncompleteFeature,
} = require("./lifecycle");

const { main } = require("./main");

module.exports = {
  // Helpers
  stripAnsi,
  visWidth,
  padToWidth,
  formatTokens,
  shortenPath,
  // Components
  compBrandVersion,
  compBrandVersionModel,
  compModel,
  compModelLabeled,
  compStatus,
  compContextBar,
  compContextCombined,
  compTokensCtx,
  compTokensIo,
  compLifecycle,
  compNextCmd,
  compFeature,
  compPhase,
  compStage,
  compPhaseStage,
  readParkedCount,
  readBacklogCount,
  readBestIncompleteFeature,
  compPlaceholder,
  compUsageTime,
  compDevRigor,
  compStyle,
  compProtection,
  compProjectType,
  compCost,
  compCacheHit,
  compRateLimits,
  compLearning,
  compLinesChanged,
  COMPONENT_REGISTRY,
  // Renderers
  renderRowGrid,
  renderRowFlow,
  renderTable,
  // Layout
  COL_GAP,
  GRID_COLS,
  getGridCols,
  DEFAULT_LAYOUT,
  loadConfig,
  collectConfigRows,
  renderConfigRows,
  collectDirRows,
  renderDirRows,
  // Data
  parseStdin,
  resolveSessionId,
  readBridgeFile,
  readEckVersion,
  readRegistryProject,
  readOutputStyle,
  readProtection,
  gitBranch,
  gitDirtyCount,
  gitToplevel,
  deduplicateDirs,
  writeBridge,
  writeSessionId,
  writeSessionFileStatus,
  countActiveSessionsStatus,
  resolveActiveFeatureStatus,
  pruneDeadSessionsStatus,
  readLifecycleSteps,
  readLifecycleFeature,
  readLifecycleFeatureId,
  // Main
  main,
};
