import type { Translations } from './zh';

export const en: Translations = {
  nav: {
    label: 'Navigation',
    overview: 'Overview',
    projects: 'Projects',
    tasks: 'Task Board',
    events: 'Event Log',
    meetings: 'Meetings',
    analytics: 'Analytics',
    agents: 'Agents',
    reports: 'Reports',
    briefings: 'Briefings',
    settings: 'Settings',
  },
  status: {
    connected: 'Connected',
    disconnected: 'Disconnected',
  },
  common: {
    loading: 'Loading...',
    save: 'Save',
    cancel: 'Cancel',
    delete: 'Delete',
    confirm: 'Confirm',
    create: 'Create',
    add: 'Add',
    edit: 'Edit',
    back: 'Back',
    noData: 'No data',
    loadFailed: (msg: string) => `Load failed: ${msg}`,
    submitting: 'Submitting...',
    deleting: 'Deleting...',
    creating: 'Creating...',
    adding: 'Adding...',
    saving: 'Saving...',
    confirm_delete: 'Confirm Delete',
    demo: '(Demo)',
  },
  agentStatus: {
    busy: 'Working',
    waiting: 'Waiting',
    offline: 'Offline',
    waitingLong: 'Waiting',
  },
  teamStatus: {
    active: 'Active',
    completed: 'Completed',
    archived: 'Archived',
  },
  dashboard: {
    title: 'Overview',
    projectCount: 'Projects',
    projectCountDesc: 'Total projects created',
    agentCount: 'Agents',
    agentCountDesc: 'Agents across all projects',
    agentCountHookDesc: (count: number) => `Includes ${count} auto-captured agents`,
    activeTasks: 'Active Tasks',
    activeTasksDesc: 'Tasks currently in progress',
    completedTasks: 'Completed',
    completedTasksDesc: 'Total tasks completed',
    pendingDecisions: 'Pending Decisions',
    noPendingItems: 'No pending items',
    systemHealth: 'System Health',
    apiStatus: 'API Status',
    apiOnline: 'Online',
    apiOffline: 'Offline',
    wsConnection: 'WebSocket',
    wsConnected: 'Connected',
    wsDisconnected: 'Disconnected',
    teamCount: 'Teams',
    lastActivity: 'Last Activity',
    noActivity: 'None',
    teamOverview: 'Team Overview',
    activeProjects: 'Active Projects',
    allProjects: 'All Projects',
    noProjects: 'No projects yet. Create one to get started.',
    quickActions: 'Quick Actions',
    viewTaskWall: 'Task Wall',
    viewAnalytics: 'Analytics',
    systemSettings: 'Settings',
    recentActivity: 'Recent Activity',
    noActivityRecords: 'No recent activity',
    viewAllEvents: 'View All Events',
    taskProgress: (completed: number, total: number) => `${completed}/${total} tasks done`,
    agentsWorking: (count: number) => `${count} agent${count > 1 ? 's' : ''} working`,
    noAgentActivity: 'No agent activity',
    viewDetails: 'View Details',
    loadFailed: (msg: string) => `Load failed: ${msg}`,
    teamEvent: 'Team Event',
    meetingEvent: 'Meeting Event',
  },
  tasks: {
    title: 'Project Task Wall',
    selectProject: 'Select Project',
    executeTask: 'Execute Task',
    totalTasks: (count: number) => `${count} tasks total`,
    avgScore: (score: string) => `Avg score ${score}`,
    completed: (count: number) => `Completed: ${count}`,
    completedSection: 'Completed',
    noTasks: 'No tasks',
    selectProjectHint: 'Select a project to view tasks',
    loadFailed: (msg: string) => `Load tasks failed: ${msg}`,
    targetTeam: 'Target Team',
    selectTeam: 'Select Team',
    taskTitle: 'Task Title',
    taskTitlePlaceholder: 'Enter task title',
    taskDesc: 'Task Description',
    taskDescPlaceholder: 'Enter task description (optional)',
    submit: 'Submit',
    horizonShort: 'Short Term',
    horizonMid: 'Mid Term',
    horizonLong: 'Long Term',
  },
  projects: {
    title: 'Project Management',
    createProject: 'Create Project',
    projectList: 'Project List',
    noProjects: 'No projects yet. Click the button above to create the first one.',
    colName: 'Name',
    colDesc: 'Description',
    colStatus: 'Status',
    colCreatedAt: 'Created At',
    colActions: 'Actions',
    viewDetail: 'Detail',
    deleteProject: 'Delete',
    confirmDelete: 'Confirm Delete',
    confirmDeleteDesc: (name: string) => `Are you sure to delete project "${name}"? This cannot be undone.`,
    createTitle: 'Create Project',
    createDesc: 'Create a new AI Agent project',
    projectName: 'Project Name',
    projectNamePlaceholder: 'Enter project name',
    projectDesc: 'Project Description',
    projectDescPlaceholder: 'Enter project description (optional)',
    rootPath: 'Root Path',
    rootPathPlaceholder: 'Project root directory path (optional)',
    loadFailed: (msg: string) => `Load failed: ${msg}`,
    statusActive: 'Active',
    statusInactive: 'Inactive',
    expandActiveTeams: (n: number) => `${n} active team${n !== 1 ? 's' : ''}`,
    expandPendingTasks: (n: number) => `${n} pending task${n !== 1 ? 's' : ''}`,
    expandTopTasks: 'Pending Tasks',
    expandLastUpdated: 'Updated',
    colTaskCount: 'Tasks',
  },
  teams: {
    title: 'Project Management',
    createTeam: 'Create Project',
    teamList: 'Project List',
    noTeams: 'No projects yet. Click the button above to create the first one.',
    colName: 'Name',
    colMode: 'Mode',
    colAgentCount: 'Agents',
    colTaskCount: 'Tasks',
    colCreatedAt: 'Created At',
    colActions: 'Actions',
    viewDetail: 'Detail',
    deleteTeam: 'Delete',
    loadFailed: (msg: string) => `Load failed: ${msg}`,
    confirmDelete: 'Confirm Delete',
    confirmDeleteDesc: (name: string) => `Are you sure to delete project "${name}"? This cannot be undone.`,
    createTitle: 'Create Project',
    createDesc: 'Create a new AI Agent project',
    teamName: 'Project Name',
    teamNamePlaceholder: 'Enter project name',
    modeLabel: 'Mode',
    modeCoordinate: 'coordinate',
    modeBroadcast: 'broadcast',
    creating: 'Creating...',
    deleting: 'Deleting...',
  },
  teamDetail: {
    backToList: 'Back to Projects',
    loadFailed: (name: string) => `Load failed: ${name}`,
    notFound: 'Project not found',
    colProjectId: 'Project ID',
    colMode: 'Mode',
    colAgentCount: 'Agents',
    colCreatedAt: 'Created At',
    agentList: 'Agent List',
    addAgent: 'Add Agent',
    noAgents: 'No agents yet. Click the button above to add one.',
    colName: 'Name',
    colRole: 'Role',
    colModel: 'Model',
    colStatus: 'Status',
    colActions: 'Actions',
    autoCaptured: 'Auto-captured',
    deleteAgent: 'Delete',
    taskHistory: 'Task History',
    startMeeting: 'Start Meeting',
    runTask: 'Run Task',
    noTasks: 'No tasks yet',
    colTaskTitle: 'Task Title',
    colTaskStatus: 'Status',
    colTaskCreatedAt: 'Created At',
    activityTracking: 'Activity Tracking',
    recentCount: 'Last 100',
    noActivities: 'No activities yet',
    colTime: 'Time',
    colTool: 'Tool',
    colInputSummary: 'Input Summary',
    colDuration: 'Duration',
    colStatusIcon: 'Status',
    addAgentDialog: 'Add Agent',
    addAgentDesc: (name: string) => `Add a new agent to project "${name}"`,
    agentNameLabel: 'Agent Name',
    agentNamePlaceholder: 'Enter agent name',
    agentRoleLabel: 'Role',
    agentRolePlaceholder: 'e.g. researcher, coder, reviewer',
    agentPromptLabel: 'System Prompt',
    agentPromptPlaceholder: 'Enter system prompt (optional)',
    agentModelLabel: 'Model',
    adding: 'Adding...',
    add: 'Add',
    confirmDeleteAgent: 'Confirm Delete',
    confirmDeleteAgentDesc: (name: string) => `Are you sure to delete agent "${name}"? This cannot be undone.`,
    cancel: 'Cancel',
    deleting: 'Deleting...',
    runTaskDialog: 'Run New Task',
    runTaskDesc: (name: string) => `Create and run a new task for project "${name}"`,
    taskTitleLabel: 'Task Title',
    taskTitlePlaceholder: 'Enter task title',
    taskDescLabel: 'Task Description',
    taskDescPlaceholder: 'Describe the task in detail',
    running: 'Running...',
    run: 'Run',
    meetingDialog: 'Start Meeting',
    meetingDesc: (name: string) => `Start an agent meeting for project "${name}"`,
    meetingTopicLabel: 'Meeting Topic',
    meetingTopicPlaceholder: 'Enter discussion topic',
    meetingParticipants: (names: string) => `Participants: ${names}`,
    noParticipants: 'No agents',
    meetingCreating: 'Creating...',
    meetingCreate: 'Start Meeting',
    agentStatusOnline: 'Online',
    agentStatusBusy: 'Working',
    agentStatusWaiting: 'Waiting',
    agentStatusError: 'Error',
    agentStatusOffline: 'Offline',
    taskStatusCompleted: 'Completed',
    taskStatusRunning: 'Running',
    taskStatusFailed: 'Failed',
    taskStatusPending: 'Pending',
  },
  projectDetail: {
    backToList: 'Back to Projects',
    projectNotFound: 'Project not found',
    description: 'Description',
    activeTeams: 'Active Teams',
    historyTeams: 'Past Teams',
    createdAt: 'Created At',
    teamsUnit: '',
    noActiveTeams: 'No active teams. Use team_create via MCP to start.',
    historyTeamsTitle: (count: number) => `Past Teams (${count})`,
    noDetailRecord: 'No details',
    addAgent: 'Agent',
    runTask: 'Task',
    startMeeting: 'Meeting',
    noMembers: 'No team members',
    noMembersHint: 'Click "+ Agent" above to add members',
    memberCount: (count: number) => `${count} members`,
    agentRole: 'Role:',
    agentTask: 'Task:',
    agentPending: 'Unassigned',
    agentNoActivity: 'No activity',
    activityTracking: 'Activity Tracking',
    noActivityHint: 'No activities yet (will show when agents start working)',
    colTime: 'Time',
    colAgent: 'Agent',
    colTool: 'Tool',
    colSummary: 'Summary',
    colDuration: 'Duration',
    colStatus: 'Status',
    decisionTimeline: 'Decision Timeline',
    noDecisions: 'No decisions yet (will show when team starts working)',
    agentName: 'Name',
    agentModel: 'Model',
    agentSession: 'Session',
    agentCurrentTask: 'Current Task',
    noActiveSession: 'No active session',
    addAgentDialog: 'Add Agent',
    agentNameLabel: 'Name',
    agentRoleLabel: 'Role',
    confirmDeleteAgent: 'Confirm Delete',
    confirmDeleteAgentDesc: (name: string) => `Are you sure to delete agent "${name}"?`,
    createTask: 'Create Task',
    taskTitleLabel: 'Title',
    taskDescLabel: 'Description',
    startMeetingDialog: 'Start Meeting',
    meetingTopicLabel: 'Topic',
    initiate: 'Start',
    deptQA: 'QA',
    deptFrontend: 'Frontend',
    deptBackend: 'Backend',
    deptEng: 'Engineering',
    deptRD: 'R&D',
    deptOps: 'Operations',
    deptOther: 'Others',
    decisionLabelAgentCreated: (name: string) => `Agent Created: ${name}`,
    decisionLabelTaskAssigned: (title: string) => `Task Assigned: ${title}`,
    decisionLabelMeeting: (topic: string) => `Meeting: ${topic}`,
    decisionLabelTeamCreated: (name: string) => `Team Created: ${name}`,
    decisionDetailRole: (role: string) => `Role: ${role}`,
    decisionDetailAssignedTo: (to: string) => `Assigned to: ${to}`,
    decisionDetailParticipants: (list: string) => `Participants: ${list}`,
  },
  events: {
    title: 'Event Log',
    allTypes: 'All Types',
    filterBySource: 'Filter by source...',
    colTime: 'Time',
    colType: 'Type',
    colSource: 'Source',
    colSummary: 'Summary',
    noEvents: 'No events',
    loadFailed: (msg: string) => `Load events failed: ${msg}`,
    limit50: '50',
    limit100: '100',
    limit200: '200',
  },
  meetings: {
    title: 'Meetings',
    all: (count: number) => `All (${count})`,
    active: (count: number) => `Active (${count})`,
    concluded: (count: number) => `Concluded (${count})`,
    createMeeting: 'Create Meeting',
    noMeetings: 'No meetings',
    noActiveMeetings: 'No active meetings',
    noConcludedMeetings: 'No concluded meetings',
    activeSection: (count: number) => `Active Meetings (${count})`,
    concludedSection: (count: number) => `Concluded Meetings (${count})`,
    createTitle: 'Create New Meeting',
    createDesc: 'Create a new discussion meeting for the team',
    selectTeam: 'Select Team',
    selectTeamPlaceholder: 'Select team...',
    topicLabel: 'Meeting Topic',
    topicPlaceholder: 'Enter meeting topic...',
    agendaLabel: 'Agenda',
    agendaOptional: '(optional)',
    agendaPlaceholder: 'Enter meeting agenda...',
    statusActive: 'Active',
    statusConcluded: 'Concluded',
    durationJustStarted: 'Just started',
    durationHoursMinutes: (h: number, m: number) => `${h}h ${m}m`,
    durationMinutes: (m: number) => `${m}m`,
    participantsCount: (n: number) => `${n} participant${n > 1 ? 's' : ''}`,
    agendaPrefix: 'Agenda',
  },
  meetingDetail: {
    back: 'Back',
    backToList: 'Back to Meetings',
    notFound: 'Meeting not found',
    loadFailed: (msg: string) => `Load failed: ${msg}`,
    statusActive: 'Active',
    statusEnded: 'Ended',
    participants: (count: number) => `${count} participant${count > 1 ? 's' : ''}`,
    discussion: 'Discussion',
    noMessages: 'No messages yet',
    round: (n: number) => `Round ${n}`,
  },
  analytics: {
    title: 'Analytics',
    allTeams: 'All Teams',
    selectTeam: 'Select Team',
    noTeamData: 'No team data',
    totalActivities: 'Total Activities',
    activeAgents: 'Active Agents',
    topTool: 'Top Tool',
    toolDistribution: 'Tool Usage',
    noToolData: 'No tool usage data',
    agentRanking: 'Agent Activity Ranking',
    noAgentData: 'No agent activity data',
    activityTimeline: 'Activity Timeline (Last 24h)',
    noTimelineData: 'No timeline data',
    efficiencyMetrics: 'Efficiency Metrics',
    taskCompletionRate: 'Task Completion Rate',
    avgCompletionTime: 'Avg Completion Time',
    avgToolsPerTask: 'Avg Tools / Task',
    topAgents: 'Top Efficient Agents',
    noEfficiencyData: 'No efficiency data',
    colAgent: 'Agent',
    colActivityCount: 'Activities',
    colToolTypes: 'Tool Types',
    colLastActive: 'Last Active',
    colActiveTime: 'Active Time',
    colEfficiency: 'Efficiency (ops/h)',
    timeMinutes: (m: number) => `${m}m`,
    timeHours: (h: number) => `${h}h`,
    timeJustNow: 'Just now',
    timeMinutesAgo: (m: number) => `${m}m ago`,
    timeHoursAgo: (h: number) => `${h}h ago`,
    timeDaysAgo: (d: number) => `${d}d ago`,
    timeMonthsAgo: (m: number) => `${m}mo ago`,
    timeYearsAgo: (y: number) => `${y}y ago`,
    timeTooltip: (hour: string | number, count: number) => `${hour}:00 - ${count} activities`,
  },
  settings: {
    tabGeneral: 'General',
    tabInfra: 'Infrastructure',
    tabTeam: 'Team Config',
    tabWake: 'Wake Settings',
    tabAbout: 'About',
    wakeTitle: 'Wake Settings',
    wakeDesc: 'Configure scheduled wake behavior for the Leader Agent',
    wakeInterval: 'Wake Interval',
    wakeIntervalOff: 'Off',
    wakeInterval10m: '10 minutes',
    wakeInterval30m: '30 minutes',
    wakeInterval1h: '1 hour',
    wakePrompt: 'Wake Prompt Template',
    wakePromptPlaceholder: 'Enter wake prompt...',
    wakeAutonomy: 'Autonomy Level',
    wakeAutonomyFull: 'Fully Autonomous',
    wakeAutonomyConsult: 'Consult on Important Items',
    wakeAutonomyReadonly: 'Check Only, No Execute',
    wakeSave: 'Save Wake Settings',
    wakeSavedMsg: 'Wake settings saved',
    generalTitle: 'General Settings',
    generalDesc: 'Configure project info and interface preferences',
    projectName: 'Project Name',
    projectNamePlaceholder: 'Enter project name',
    projectDesc: 'Project Description',
    projectDescPlaceholder: 'Enter project description',
    defaultModel: 'Default LLM Model',
    interfaceLang: 'Interface Language / 界面语言',
    langSwitchHint: 'Switch language, takes effect immediately',
    darkMode: 'Dark Mode',
    darkModeHint: 'Toggle dark/light theme',
    saveDemo: 'Save (Demo)',
    storageTitle: 'Storage Config',
    storageDesc: 'Database and cache backend settings',
    storageBackend: 'Storage Backend',
    dbUrl: 'Database URL',
    dbUrlHintSqlite: 'SQLite database file path',
    dbUrlHintPg: 'PostgreSQL connection string',
    cacheBackend: 'Cache Backend',
    cacheMemory: 'In-memory',
    cacheRedis: 'Redis',
    redisUrl: 'Redis URL',
    memoryBackend: 'Memory Backend',
    memoryFile: 'File System',
    portsTitle: 'Service Ports',
    portsDesc: 'API and Dashboard port configuration',
    apiPort: 'API Port',
    dashboardPort: 'Dashboard Port',
    teamDefaultsTitle: 'Team Defaults',
    teamDefaultsDesc: 'Configure auto team creation and team name prefix',
    autoCreateTeam: 'Auto Create Team',
    autoCreateTeamHint: 'Automatically create a team on new project start',
    teamNamePrefix: 'Team Name Prefix',
    teamNamePrefixPlaceholder: 'e.g. project-alpha',
    teamNamePrefixHint: 'Prefix used when auto-creating teams',
    templatesTitle: 'Team Templates',
    templatesDesc: 'Use a preset template to quickly add members',
    noTemplates: 'No templates available',
    useTemplate: 'Use Template',
    membersTitle: 'Permanent Members',
    membersDesc: 'Members automatically added when creating a team',
    noMembers: 'No permanent members. Click below to add.',
    memberEnabled: 'Enabled',
    memberDisabled: 'Disabled',
    memberNamePlaceholder: 'Name',
    memberRolePlaceholder: 'Role description',
    addMember: 'Add Permanent Member',
    saveTeamConfig: 'Save Team Config',
    savedMsg: 'Settings saved',
    teamConfigSavedMsg: 'Team config saved',
    memberAddedMsg: 'Member added',
    memberDeletedMsg: 'Member deleted',
    memberUpdatedMsg: 'Member updated',
    templateAlreadyExists: 'All template members already exist',
    templateApplied: (name: string, count: number) => `Added ${count} members from "${name}"`,
    membersUnit: (count: number) => `${count} members`,
    aboutTitle: 'About AI Team OS',
    aboutDesc: 'Version and project information',
    version: 'Version',
    techStack: 'Tech Stack',
    license: 'License',
    python: 'Python',
    nodejs: 'Node.js',
    coreDeps: 'Core Dependencies',
    depLangGraph: 'LangGraph — AI Orchestration',
    depFastAPI: 'FastAPI — REST API Framework',
    depMem0: 'Mem0 — Memory Management',
    depReact: 'React + TypeScript — Frontend',
    depDB: 'SQLite / PostgreSQL — Data Storage',
    depZustand: 'Zustand — State Management',
    defaultProjectDesc: 'Universal reusable AI Agent team operating system framework',
  },
  activityLog: {
    loading: 'Loading...',
    noActivities: 'No activities',
    ariaRunning: 'Running',
    ariaError: 'Error',
    ariaCompleted: 'Completed',
  },
  taskCard: {
    statusPending: 'Pending',
    statusRunning: 'Running',
    statusCompleted: 'Completed',
    statusFailed: 'Failed',
    priorityCritical: 'Critical',
    priorityHigh: 'High',
    priorityMedium: 'Medium',
    priorityLow: 'Low',
    scoreUnit: 'pts',
  },
  agents: {
    title: 'Agent Config',
    searchPlaceholder: 'Search agents...',
    selectAgent: 'Click an agent on the left to view and edit',
    noAgents: 'No agent templates found',
    noAgentsHint: 'Templates are in ~/.claude/agents/ or plugin/agents/',
    loadFailed: (msg: string) => `Load failed: ${msg}`,
    saveFailed: (msg: string) => `Save failed: ${msg}`,
    saveSuccess: 'Saved successfully',
    saving: 'Saving...',
    fieldName: 'Name',
    fieldDescription: 'Description',
    fieldModel: 'Model',
    fieldColor: 'Color',
    fieldPrompt: 'Prompt',
    promptPlaceholder: 'Enter agent system prompt...',
    descPlaceholder: 'Enter agent description...',
    modelOpus: 'Opus (Most Capable)',
    modelSonnet: 'Sonnet (Balanced)',
    modelHaiku: 'Haiku (Fast)',
    colorOptions: 'Color Label',
    groupEngineering: 'Engineering',
    groupManagement: 'Management',
    groupTesting: 'Testing',
    groupSupport: 'Support',
    groupSpecialized: 'Specialized',
    groupOther: 'Other',
    save: 'Save',
  },
  reports: {
    title: 'Reports',
    searchPlaceholder: 'Search reports...',
    filterAuthor: 'All Authors',
    noReports: 'No reports found',
    noReportsHint: 'Reports are stored in ~/.claude/data/ai-team-os/reports/',
    selectReport: 'Click a report on the left to preview',
    loadFailed: (msg: string) => `Load failed: ${msg}`,
    author: 'Author',
    date: 'Date',
    size: 'Size',
    bytes: 'B',
    kb: 'KB',
  },
  briefings: {
    title: 'Leader Briefings',
    tabPending: 'Pending',
    tabResolved: 'Resolved',
    tabDismissed: 'Dismissed',
    noItems: 'No items',
    options: 'Options',
    recommendation: 'Recommendation',
    resolution: 'Resolution',
    resolve: 'Resolve',
    dismiss: 'Dismiss',
    resolveDialogTitle: 'Enter Decision',
    resolutionLabel: 'Resolution',
    resolutionPlaceholder: 'Enter your decision or instruction...',
    confirmResolve: 'Confirm',
    urgency: {
      high: 'High',
      medium: 'Medium',
      low: 'Low',
    },
  },
  taskDetail: {
    horizonShort: 'Short',
    horizonMid: 'Mid',
    horizonLong: 'Long',
    memoTypeProgress: 'Progress',
    memoTypeDecision: 'Decision',
    memoTypeIssue: 'Issue',
    memoTypeSummary: 'Summary',
    fieldHorizon: 'Horizon:',
    fieldScore: 'Score:',
    fieldTeam: 'Team:',
    fieldAssignedTo: 'Assignee:',
    sectionDesc: 'Description',
    sectionResult: 'Result',
    sectionMemo: 'Memo',
    sectionTimeline: 'Timeline',
    timelineCreated: 'Created',
    timelineStarted: 'Started',
    timelineCompleted: 'Completed',
  },
};
