import type { messagesFr } from "./messages-fr";

export const messagesEn: typeof messagesFr = {
  auth: {
    logoutSuccess: "Successfully logged out",
    invalidCredentials: "Invalid email or password",
    sessionExpired: "Your session has expired, please log in again",
    appName: "Dadycar",
    loginSubtitle: "Sign in to your Super Admin account",
    emailPlaceholder: "admin@fleet43.com",
    passwordPlaceholder: "Your password",
    submit: "Sign in",
    forgotPasswordLink: "Forgot password?",
    forgotPassword: {
      title: "Forgot password",
      subtitle: "Enter your email to receive a reset link.",
      submit: "Send link",
      success: "If an account exists for this email, a reset link has been sent.",
      back: "Back to login",
    },
    resetPassword: {
      title: "Set your password",
      subtitle: "Choose a password for your account.",
      newPassword: "New password",
      confirmPassword: "Confirm password",
      submit: "Set password",
      successTitle: "Password set",
      successMessage: "Your password has been saved. You can now sign in.",
      backToLogin: "Go to login",
      invalidLinkTitle: "Invalid link",
      invalidLinkMessage: "This link is invalid or has expired. Please request a new one.",
    },
  },
  pages: {
    dashboard: { title: "Overview", subtitle: "Main dashboard" },
    companies: { title: "Companies", subtitle: "Manage companies" },
    users: { title: "Users", subtitle: "Manage all users" },
    internalUsers: { title: "Internal users", subtitle: "Manage admin team members, roles and permissions" },
    vehicles: { title: "Vehicles", subtitle: "Vehicle fleet management" },
    sites: { title: "Sites", subtitle: "Manage sites and locations" },
    subscriptions: { title: "Subscriptions", subtitle: "Manage subscriptions and plans" },
    tickets: { title: "Tickets", subtitle: "Manage support tickets" },
    ticketDetail: { title: "Ticket details", subtitle: "Ticket information and management" },
    activityLogs: { title: "Activity logs", subtitle: "Track actions and changes" },
    helpCenter: { title: "Help Center", subtitle: "Manage articles, sections and analyze feedback" },
    helpCenterCreate: { title: "New article", subtitle: "Help Center" },
    telematics: { title: "Telematics boxes", subtitle: "Manage fleet manager orders and the available product catalog" },
    telematicsOrderDetail: { title: "Telematics order details", subtitle: "Order summary" },
    installations: {
      title: "History",
      subtitle: (n: number) => `${n} installation${n !== 1 ? "s" : ""} — whole team`,
    },
    installers: {
      title: "Installers",
      subtitle: (n: number) => `${n} installer${n !== 1 ? "s" : ""}`,
    },
    antai: { title: "ANTAI", subtitle: "Monitor and manage vehicles linked to the ANTAI integration" },
    antaiVehicleDetail: { title: "ANTAI vehicle details", subtitle: "ANTAI state, visibility and exception handling" },
    rfidBatches: { title: "RFID cards", subtitle: "Process RFID card batches submitted by companies" },
    rfidBatchDetail: { title: "RFID batch details", subtitle: "Batch changes and processing" },
    health: { title: "Executive Dashboard", subtitle: "Portfolio-wide health, adoption and engagement across all client accounts" },
    healthClients: { title: "Client Health Scores", subtitle: "Every account scored 0–100 from activity, adoption, frequency, data completeness and growth" },
    healthProfile: { title: "Client profile", subtitle: "Health, activity, adoption and benchmark" },
    healthConfig: { title: "Health configuration", subtitle: "Tune the health-score model and alert thresholds without code" },
    anomalyRules: {
      title: "Anomaly rules",
      subtitle: (n: number) => `${n} rule${n !== 1 ? "s" : ""} — the starting values of every client`,
      searchPlaceholder: "Search a rule...",
      empty: "No rule matches",
      filters: { all: "All", customized: "Customized by clients", off: "Off by default", withdrawn: "Withdrawn" },
      withdrawn: "Withdrawn",
      defaultOn: "On by default",
      defaultOff: "Off by default",
      customized: (n: number) => `${n} client${n !== 1 ? "s" : ""}`,
      disabledBy: (n: number) => `switched off by ${n}`,
      severityByCase: "Depends on the case",
      channels: { mobile: "Driver push", fleet: "Fleet push", email: "Email" },
      sheet: {
        title: "Dadycar values of the rule",
        intro: "These values apply to every client who did not change the rule, from the next detection. A client who customized it keeps their own settings.",
        condition: "What the rule checks",
        available: "Rule available to clients",
        availableHint: "Withdrawn, the rule runs for nobody and disappears from the clients' screen.",
        enabledByDefault: "On by default",
        enabledByDefaultHint: "For clients who did not choose themselves.",
        thresholds: "Thresholds",
        noThreshold: "This rule has no threshold: it records a fact.",
        factory: (value: string) => `Original value: ${value}`,
        severity: "Default severity",
        severityByCaseHint: "The rule grades each anomaly itself; this choice applies when it does not.",
        notifications: "Default notifications",
        mobile: "Push notification to the driver",
        fleet: "Notification in the fleet app",
        email: "Email",
        emailSending: "Email sending",
        save: "Save for every client",
        saved: "Rule updated for every client",
        noChange: "No change",
        error: "Could not save the rule",
        clientsTitle: "Clients who customized it",
        noClients: "No client changed this rule.",
        clientOff: "Off",
        historyTitle: "Latest changes",
        noHistory: "No change recorded.",
        dadycar: "Dadycar",
        resetAction: "Back to the Dadycar values",
      },
    },
    integrations: {
      title: "Connectors",
      subtitle: (n: number) => `${n} connector${n !== 1 ? "s" : ""}`,
      searchPlaceholder: "Search by connector name or code...",
      empty: "No connector found",
      emptyHint: "Ensure the connector name is spelled correctly or adjust the filters.",
      results: (n: number) => `${n} result${n !== 1 ? "s" : ""}`,
      connectionsCount: (n: number) => `${n} connection${n !== 1 ? "s" : ""}`,
      filters: {
        title: "Filters",
        status: "Status",
        allStatuses: "All statuses",
        category: "Category",
        allCategories: "All categories",
        reset: "Reset",
      },
      statusLabels: {
        enabled: "Enabled",
        disabled: "Disabled",
      } as Record<string, string>,
      connectionMethodLabels: {
        sftp: "SFTP",
        manual: "Manual",
        api: "API",
        oauth: "OAuth",
      } as Record<string, string>,
      categories: {
        fuel_cards: "Fuel Cards",
        telepeage: "Tolls",
        electric_recharge: "Electric Recharge",
        accounting: "Accounting",
        leasing_companies: "Leasing Companies",
        telematics: "Telematics",
        insurance: "Insurance",
        payroll: "Payroll & HR",
        expenses: "Expenses",
      } as Record<string, string>,
      detail: {
        title: "Connector Details",
        editTitle: "Edit Connector",
        generalInfo: "General Information",
        activeConnections: "Active Connections",
        requirements: "Requirements",
        activationSteps: "Activation Steps",
        supportedModules: "Supported Modules",
        noConnections: "No active connections for this connector.",
        noRequirements: "No specific requirements defined.",
        noActivationSteps: "No specific activation steps defined.",
        noModules: "No modules supported.",
        noConnectionDate: "No connection date",
        actions: {
          enable: "Enable Connector",
          disable: "Disable Connector",
          edit: "Edit Details",
          save: "Save Changes",
          cancel: "Cancel",
          saving: "Saving...",
        },
        fields: {
          name: "Connector Name",
          code: "Connector Code",
          description: "Description",
          category: "Category",
          connectionMethod: "Connection Method",
          syncFrequency: "Sync Frequency",
          activationMode: "Activation Mode",
          modules: "Modules",
          status: "Status",
        },
        syncFrequencies: {
          real_time: "Real-time",
          hourly: "Hourly",
          daily: "Daily",
          weekly: "Weekly",
        } as Record<string, string>,
        activationModes: {
          immediate: "Immediate",
          on_request: "On Request",
        } as Record<string, string>,
        toasts: {
          enabled: "Connector enabled successfully",
          disabled: "Connector disabled successfully",
          updated: "Connector updated successfully",
          error: "An error occurred",
        },
        connectionColumns: {
          company: "Company",
          connectedAt: "Connected At",
          lastSync: "Last Sync",
          status: "Status",
        },
      },
    },
    integrationConnections: {
      title: "Integration Connections",
      subtitle: (n: number) => `${n} connection${n !== 1 ? "s" : ""}`,
      searchPlaceholder: "Search by company, integration or status...",
      empty: "No connection found",
      emptyHint: "Adjust your filters or ensure the search term is spelled correctly.",
      results: (n: number) => `${n} result${n !== 1 ? "s" : ""}`,
      filters: {
        title: "Filters",
        status: "Status",
        allStatuses: "All statuses",
        company: "Company",
        allCompanies: "All companies",
        category: "Category",
        allCategories: "All categories",
        reset: "Reset",
      },
      statusLabels: {
        disconnected: "Disconnected",
        connected: "Connected",
        requested: "Requested",
        rejected: "Rejected",
        error: "Error",
      } as Record<string, string>,
      table: {
        integration: "Connector",
        company: "Company",
        status: "Status",
        connectedAt: "Connected At",
        lastSync: "Last Sync",
        actions: "Actions",
        viewDetails: "View Details",
      },
      detail: {
        title: "Connection Details",
        editTitle: "Edit Connection",
        integrationInfo: "Connector Information",
        companyInfo: "Company Information",
        connectionInfo: "Connection Info",
        credentials: "Credentials",
        noCredentials: "No credentials defined.",
        rawJson: "Raw JSON Configuration",
        editJson: "Edit as JSON",
        editFields: "Edit Fields",
        invalidJson: "Invalid JSON format.",
        retry: "Retry",
        code: "Code",
        previewNotAvailable: "Preview not available for this file type",
        downloadFile: "Download file",
        toasts: {
          updated: "Connection updated successfully",
          error: "Failed to update connection",
        },
        actions: {
          edit: "Edit Connection",
          save: "Save Changes",
          cancel: "Cancel",
        },
        fields: {
          status: "Status",
          connectedAt: "Connected At",
          lastSyncAt: "Last Sync At",
          name: "Name",
          email: "Email",
          createdAt: "Created At",
          updatedAt: "Updated At",
        },
      },
    },
  },
  nav: {
    overview: "Overview",
    companies: "Companies",
    users: "Users",
    dormantAccounts: "Dormant accounts",
    internalUsers: "Internal users",
    vehicles: "Vehicles",
    sites: "Sites",
    subscriptions: "Subscriptions",
    tickets: "Support",
    activityLogs: "Logs",
    helpCenter: "Help Center",
    telematics: "Telematics boxes",
    installations: "Installations",
    installers: "Installers",
    antai: "ANTAI",
    rfidCards: "RFID cards",
    health: "Customer Health",
    integrations: "Connectors",
    integrationConnections: "Connections",
    anomalyRules: "Anomaly rules",
  },
  navCategories: {
    main: "Main",
    management: "Management",
    commercial: "Commercial",
    technical: "Technical",
    system: "System",
    administration: "Administration",
  },
  notifications: {
    title: "Notifications",
    empty: "No notification",
    viewAll: "View all",
    markAllRead: "Mark all read",
    unreadBadge: (n: number) => (n > 99 ? "99+" : String(n)),
  },
  account: {
    myAccount: "My account",
    profile: "Profile",
    security: "Security",
    logout: "Log out",
    defaultName: "Super Admin",
    defaultEmail: "admin@dadycar.fr",
    searchPlaceholder: "Search...",
  },
  support: {
    title: "Support",
    subtitle: "Live conversations with clients",
    views: {
      mine: "My conversations",
      unassigned: "Unassigned",
      open: "All",
      resolved: "Resolved",
    },
    searchPlaceholder: "Search a client, a company…",
    live: "Live",
    autoRefresh: "Auto refresh",
    emptyTitle: "No conversation",
    emptyDescription: "You're all caught up for this view.",
    noResults: "No conversation matches your search",
    selectTitle: "Pick a conversation",
    selectDescription: "Client messages show up here in real time.",
    you: "You",
    note: "Note",
    previewFrom: (who: string, text: string) => `${who}: ${text}`,
    voiceMessage: "Voice message",
    image: "Image",
    file: "File",
    unassigned: "Unassigned",
    awaitingReply: "Awaiting reply",
    assignToMe: "Assign to me",
    assign: "Assign",
    resolve: "Mark as answered",
    reopen: "Reopen",
    resolvedBadge: "Resolved",
    statuses: {
      Open: "Open",
      "In Progress": "In progress",
      Resolved: "Awaiting client confirmation",
      Closed: "Closed",
    } as Record<string, string>,
    loadError: "The conversation could not be loaded",
    toasts: {
      resolved: "Marked as answered: the client has to confirm",
      reopened: "Conversation reopened",
      assigned: "Conversation assigned",
    },
    thread: {
      newMessages: "New messages",
      today: "Today",
      yesterday: "Yesterday",
      internalNote: "Internal note",
      awaitingConfirmation: (date: string) => `Marked as answered on ${date} · awaiting the client's confirmation`,
      closedOn: (date: string) => `Conversation closed on ${date}`,
      subject: "Subject",
      urgency: "Urgency",
      startedOn: (date: string) => `Conversation started on ${date}`,
    },
    composer: {
      reply: "Reply",
      note: "Internal note",
      replyPlaceholder: "Write to the client…",
      notePlaceholder: "Only the team sees notes · @ to mention",
      noteHint: "Only visible to the Dadycar team",
      repliesClosed: "Conversation closed: reopen it to reply to the client. Internal notes are still possible.",
      send: "Send",
      addNote: "Add note",
      attach: "Attach a file",
      emoji: "Emoji",
      record: "Record a voice message",
      recording: "Recording…",
      sendingVoice: "Sending the voice message…",
      cancel: "Cancel",
      enterHint: "Enter to send · Shift+Enter for a new line",
      micBlocked: "Microphone blocked for this site: allow it from the address bar icon, then try again.",
      micMissing: "No microphone detected.",
      micBusy: "The microphone is used by another application.",
      emptyVoice: "The voice message is empty, try again.",
      fileTooLarge: (name: string) => `${name} is larger than 10 MB`,
      mentionHeader: "Mention",
      retry: "Try again",
      sendFailed: "The message could not be sent",
    },
    panel: {
      client: "Client",
      company: "Company",
      email: "Email",
      phone: "Phone",
      conversationsCount: (n: number) => `${n} conversation${n > 1 ? "s" : ""}`,
      details: "Details",
      status: "Status",
      priority: "Priority",
      category: "Category",
      assignee: "Assigned to",
      createdAt: "Started on",
      otherConversations: "Other conversations from this client",
      noOtherConversations: "No other conversation",
      activity: "Activity",
      noCategory: "None",
    },
  },
  common: {
    add: "Add",
    edit: "Edit",
    delete: "Delete",
    save: "Save",
    create: "Create",
    cancel: "Cancel",
    confirm: "Confirm",
    yes: "Yes",
    no: "No",
    all: "All",
    allF: "All",
    none: "None",
    loading: "Loading...",
    search: "Search...",
    noData: "No data available",
    resultsCount: (n: number) => `${n} result${n !== 1 ? "s" : ""}`,
    resultsCountFor: (n: number, query: string) => `${n} result${n !== 1 ? "s" : ""} for "${query}"`,
    activate: "Activate",
    deactivate: "Deactivate",
    active: "Active",
    inactive: "Inactive",
    activeM: "Active",
    pending: "Pending",
    disabled: "Disabled",
    new30d: "New (30d)",
    new30dF: "New (30d)",
    createdAt: "Created at",
    date: "Date",
    impersonate: "Impersonate",
    tokenCopied: "Token copied to clipboard",
    unnamed: "Unnamed",
    retry: "Retry",
  },
  mcpToken: {
    menuLabel: "Generate MCP token",
    dialogTitle: "MCP token",
    dialogDescription: (name: string) => `Generate MCP access credentials for ${name}. The client connects without email or password.`,
    nameLabel: "Credential name",
    namePlaceholder: "e.g. Client's Claude connector",
    ttlLabel: "Token lifetime (minutes)",
    ttlHint: "Lifetime of the ready-to-use token (5 to 1440, default 60).",
    expiresLabel: "Credential expiry (days)",
    expiresHint: "Empty = never expires.",
    generate: "Generate token",
    regenerate: "Generate a new token",
    warning: "Copy these values now: the client secret is shown only once.",
    accessToken: "Access token (Bearer)",
    accessTokenHint: (min: number) => `Paste as the "Authorization: Bearer" header. Expires in ${min} min.`,
    clientId: "Client ID",
    clientSecret: "Client secret",
    clientSecretHint: "Shown once — durable and revocable.",
    mcpUrl: "MCP server URL",
    tokenEndpoint: "Refresh endpoint",
    credentialExpires: "Credential expiry",
    never: "Never",
    copy: "Copy",
    copied: "Copied",
    copyAll: "Copy all",
    done: "Done",
    toastGenerated: "MCP token generated",
    usageTitle: "How the client uses it",
    usageBody: "Claude connector: enter client_id / client_secret in the OAuth fields. Header-based client: paste the access token into \"Authorization: Bearer\".",
    existingTitle: "Existing credentials",
    emptyList: "No credentials yet.",
    createdAtLabel: "Created",
    lastUsedLabel: "Last used",
    neverUsed: "Never used",
    revoke: "Revoke",
    confirmRevoke: "Confirm revocation",
    toastRevoked: "Credential revoked",
    statusActive: "Active",
    statusExpired: "Expired",
    statusRevoked: "Revoked",
    newSectionTitle: "Generate a new credential",
  },
  validation: {
    nameRequired: "Name is required",
    fullNameRequired: "Full name is required",
    firstNameRequired: "First name is required",
    lastNameRequired: "Last name is required",
    emailRequired: "Email is required",
    emailInvalid: "Invalid email",
    phoneRequired: "Phone is required",
    passwordRequired: "Password is required",
    passwordMinLength: "Password must be at least 8 characters",
    passwordsDoNotMatch: "Passwords do not match",
    siretRequired: "SIRET is required",
    addressRequired: "Address is required",
    cityRequired: "City is required",
    postalCodeRequired: "Postal code is required",
    displayNameRequired: "Display name is required",
    priceMustBePositive: "Price must be positive",
    frequencyRequired: "Frequency is required",
    titleRequired: "Title is required",
    titleMaxLength: "Title cannot exceed 255 characters",
    numberplateRequired: "Plate is required",
    markRequired: "Make is required",
    modelRequired: "Model is required",
    motorTypeRequired: "Engine type is required",
    roleRequired: "Role is required",
    codeRequired: "Code is required",
    labelRequired: "Label is required",
    installMethodRequired: "Install method is required",
    numberNonNegative: "Value cannot be negative",
    vatRateInvalid: "VAT rate must be between 0 and 100",
    referencePrefixRequired: "Reference prefix is required",
    minUnitsInvalid: "Minimum units must be at least 1",
    weightsMustTotal100: "Weights must total 100",
  },
  forms: {
    name: "Name",
    firstName: "First name",
    lastName: "Last name",
    email: "Email",
    phone: "Phone",
    password: "Password",
    newPassword: "New password",
    role: "Role",
    status: "Status",
    company: "Company",
    description: "Description",
  },
  notFound: {
    title: "Page not found",
    description: "The page you are looking for doesn't exist or has been moved.",
    backToDashboard: "Back to dashboard",
  },
  dashboard: {
    periods: {
      "7d": "7 days",
      "30d": "30 days",
      "90d": "90 days",
      "12m": "12 months",
    },
    charts: {
      verified: "Verified",
      newF: "New",
      newM: "New",
      connected: "Connected",
      active: "Active",
      trial: "Trial",
      expired: "Expired",
      companyGrowth: "Company growth",
      companyGrowthDesc: "Trend over period",
      vehicleGrowth: "Vehicle growth",
      vehicleGrowthDesc: "New and connected",
      subscriptionTimeline: "Subscriptions timeline",
      subscriptionTimelineDesc: "Active, trial and expired",
      planDistribution: "Plan distribution",
      planDistributionDesc: "Breakdown by plan type",
      motorTypes: "Motor types",
      motorTypesDesc: "Breakdown by engine type",
    },
    stats: {
      companies: "Companies",
      users: "Users",
      vehicles: "Vehicles",
      subscriptions: "Subscriptions",
      sites: "Sites",
      planDistribution: "Plan distribution",
      plansSuffix: " plans",
      withVehicles: (n: number) => `${n} with vehicles`,
      newCompanies: (n: number) => `${n} new`,
      connected: (n: number) => `${n} connected`,
      onTrial: (n: number) => `${n} on trial`,
    },
    loadError: "Unable to load statistics",
  },
  companies: {
    toasts: {
      created: "Company created successfully",
      updated: "Company updated",
      deleted: "Company deleted",
      restored: "Company restored",
      lookupSuccess: "Company information retrieved",
      siretInvalid: "SIRET must contain exactly 14 digits",
      accessUpdating: "Updating access...",
      accessEnabled: "Company access enabled",
      accessDisabled: "Company access disabled",
      testFlagged: "Marked as test account — excluded from Customer Health statistics",
      testUnflagged: "Test flag removed — included in Customer Health statistics",
      refacturationGranted: "Inter-company refacturation enabled for this group",
      refacturationRevoked: "Inter-company refacturation disabled for this group",
      aiAgentsEnabled: "Donna (AI agents) enabled for this company",
      aiAgentsDisabled: "Donna (AI agents) disabled for this company",
    },
    sort: {
      label: "Order by",
      newest: "Newest first",
      oldest: "Oldest first",
      disabledFirst: "Disabled first",
      enabledFirst: "Enabled first",
    },
    actions: {
      enableAccess: "Enable Company Access",
      disableAccess: "Disable Company Access",
      markTest: "Mark as test account",
      unmarkTest: "Remove test flag",
      grantRefacturation: "Enable inter-company refacturation",
      revokeRefacturation: "Disable inter-company refacturation",
      enableAiAgents: "Enable Donna (early access)",
      disableAiAgents: "Disable Donna",
    },
    testBadge: "TEST",
    refacturationBadge: "REFACT.",
    aiAgentsBadge: "DONNA",
    searchPlaceholder: "Search a company...",
    empty: "No company found",
    stats: {
      total: "Total",
      withVehicles: "With vehicles",
      withSubscription: "With subscription",
      new30d: "New (30d)",
    },
    dialog: {
      titleEdit: "Edit company",
      titleCreate: "New company",
      siretPlaceholder: "14 digits",
      siretLookupTitle: "Look up company by SIRET",
    },
    fields: {
      siret: "SIRET",
    },
    delete: {
      title: "Delete company",
      description: (name: string | undefined) =>
        `Are you sure you want to delete "${name}"? This action is reversible.`,
    },
    countLabel: (n: number) => `${n} compan${n > 1 ? "ies" : "y"}`,
  },
  users: {
    toasts: {
      created: "User created",
      updated: "User updated",
      deleted: "User deleted",
      statusChanged: "Status changed",
      emailVerified: "Email verified",
      passwordReset: "Password reset",
    },
    columns: {
      emailVerified: "Email verified",
    },
    actions: {
      verifyEmail: "Verify email",
      resetPassword: "Reset password",
    },
    stats: {
      total: "Total",
      active: "Active",
      disabled: "Disabled",
      emailVerified: "Email verified",
    },
    statusFilter: {
      pending: "Pending",
      active: "Active",
      disabled: "Disabled",
    },
    roles: {
      company: "Company",
      driver: "Driver",
      siteManager: "Manager",
      siteManagerLong: "Site manager",
      companyClient: "Client",
      companyClientLong: "Company client",
    },
    roleLabels: {
      admin: "Administrator",
      manager: "Manager",
      user: "User",
      technician: "Technician",
      super_admin: "Super Admin",
    },
    dialog: {
      titleEdit: "Edit user",
      titleCreate: "New user",
      resetPasswordTitle: "Reset password",
      resetPasswordSubmit: "Reset",
    },
    delete: {
      title: "Delete user",
      description: (firstName?: string, lastName?: string) =>
        `Are you sure you want to delete "${firstName ?? ""} ${lastName ?? ""}"?`,
    },
    toggleStatus: {
      title: "Change status",
      description: (active: boolean) =>
        `Do you want to ${active ? "deactivate" : "activate"} this user?`,
    },
  },
  vehicles: {
    toasts: {
      updated: "Vehicle updated",
      deleted: "Vehicle deleted",
      linkbycarConnected: "Vehicle successfully connected to LinkByCar",
      eligibilityChecked: "Vehicle is eligible, you can now connect it",
      eligibilityChecking: "Checking eligibility...",
      linkbycarDisconnecting: "Disconnecting from LinkByCar...",
      linkbycarDisconnected: "Vehicle disconnected from LinkByCar",
      linkbycarNotRegistered: "This vehicle was not registered with LinkByCar — its local status has been corrected",
    },
    columns: {
      numberplate: "Plate",
      vin: "VIN",
      mark: "Make",
      model: "Model",
      motorType: "Engine",
      connection: "Connection",
      provider: "Provider",
    },
    fields: {
      motorTypeLong: "Engine type",
    },
    actions: {
      connectLinkbycar: "Connect LinkByCar",
      testEligibility: "Test eligibility",
      disconnectLinkbycar: "Disconnect from LinkByCar",
      disconnectCompany: "Disconnect a company",
    },
    stats: {
      total: "Total",
      connected: "Connected",
      notConnected: "Not connected",
      new30d: "New (30d)",
    },
    connectionFilter: {
      notConnected: "Not connected",
      eligible: "Eligible",
      pending: "Pending",
      connected: "Connected",
    },
    disconnect: {
      title: "Disconnect from LinkByCar",
      description: (numberplate: string | undefined) =>
        `Vehicle "${numberplate}" will be removed from LinkByCar: data collection and the related subscription stop. It can be reconnected later.`,
      confirm: "Disconnect",
    },
    companyDisconnect: {
      title: "Disconnect a company from LinkByCar",
      trigger: "Disconnect a company",
      pickCompany: "Pick a company in the “Company” filter above first.",
      loading: "Reading LinkByCar status...",
      warning:
        "Vehicles will be removed from LinkByCar: data collection and the related subscriptions stop immediately.",
      counts: {
        total: "Vehicles",
        connected: "Connected",
        pending: "Pending",
        eligible: "Eligible",
        notConnected: "Not connected",
      },
      targetLinked: (n: number) =>
        `${n} connected or pending vehicle${n !== 1 ? "s" : ""} will be removed from LinkByCar.`,
      includeAllLabel: "Catch-up: process every vehicle that has a VIN",
      includeAllHint: (n: number) =>
        `${n} vehicle${n !== 1 ? "s" : ""} will be sent to LinkByCar, including those the local status already calls disconnected. Slower, but it fixes stale statuses.`,
      nothing: "No vehicle to disconnect for this company.",
      confirm: "Start disconnection",
      queued: (n: number) => `Disconnection started for ${n} vehicle${n !== 1 ? "s" : ""}.`,
      progressTitle: "Disconnection running",
      progressRemaining: (n: number) =>
        `${n} vehicle${n !== 1 ? "s" : ""} still linked to LinkByCar.`,
      progressDone: "Done — no vehicle is linked to LinkByCar any more.",
      progressCatchUp:
        "The catch-up sweep continues in the background on vehicles the local status already called disconnected.",
      progressStalled:
        "Processing continues in the background. Reopen this window later to see where it stands.",
      loadError: "Could not read this company's LinkByCar status.",
      close: "Close",
      verify: {
        trigger: "Check with LinkByCar",
        running: "Asking LinkByCar...",
        error: "Could not reach LinkByCar. Try again in a moment.",
        clean: "LinkByCar no longer holds any vehicle of this company.",
        remaining: (n: number) =>
          `LinkByCar still holds ${n} vehicle${n !== 1 ? "s" : ""} of this company.`,
        checked: (n: number, total: number) =>
          `${n} vehicle${n !== 1 ? "s" : ""} with a VIN cross-referenced against the ${total} registrations on the LinkByCar account.`,
        staleHint: (n: number) =>
          `${n} of them the local status already calls disconnected — only the catch-up mode will process them.`,
        absentHint: (n: number) =>
          `${n} vehicle${n !== 1 ? "s" : ""} marked connected on our side but unknown to LinkByCar.`,
        archived: "archived",
        columns: { plate: "Vehicle", local: "Local status", provider: "LinkByCar" },
      },
    },
    dialog: {
      titleEdit: "Edit vehicle",
    },
    delete: {
      title: "Delete vehicle",
      description: (numberplate: string | undefined) =>
        `Are you sure you want to delete vehicle "${numberplate}"?`,
    },
  },
  sites: {
    toasts: {
      updated: "Site updated",
      deleted: "Site deleted",
    },
    columns: {
      address: "Address",
      city: "City",
      postalCode: "Postal code",
      capacity: "Capacity",
      manager: "Manager",
    },
    stats: {
      total: "Total",
      withVehicles: "With vehicles",
      withoutVehicles: "Without vehicles",
      new30d: "New (30d)",
    },
    dialog: {
      titleEdit: "Edit site",
    },
    delete: {
      title: "Delete site",
      description: (name: string | undefined) =>
        `Are you sure you want to delete site "${name}"?`,
    },
  },
  subscriptions: {
    toasts: {
      planCreated: "Plan created",
      planUpdated: "Plan updated",
    },
    tabs: {
      subscriptions: "Subscriptions",
      plans: "Plans",
      billing: "Billing",
      products: "Billed products",
      signals: "Sales signals",
      donna: "Donna (AI)",
    },
    stats: {
      total: "Total",
      active: "Active",
      trial: "On trial",
      expiredTrial: "Expired trial",
    },
    columns: {
      id: "ID",
      plan: "Plan",
      trial: "Trial",
    },
    trialFilter: {
      label: "Trial",
      trial: "Trial",
      standard: "Standard",
    },
    plans: {
      newPlan: "New plan",
      popular: "Popular",
      popularField: "Popular",
      activeField: "Active",
      unlimited: "Unlimited",
      perMonth: "month",
      perYear: "year",
      companiesCount: (n: number) => `${n} companies`,
    },
    dialog: {
      titleEdit: "Edit plan",
      titleCreate: "New plan",
      identifier: "Identifier",
      displayName: "Display name",
      originalPrice: "Original price",
      discountedPrice: "Discounted price",
      frequency: "Frequency",
      monthly: "Monthly",
      yearly: "Yearly",
    },
  },
  donna: {
    intro: (markup: string, rate: string) =>
      `Donna = the whole AI product (chat + background agents). Every call is charged at provider cost × ${markup}. Monthly gift: ${rate} of what the client pays for the fleet. Platform AI (OCR, analyses) is counted separately and offered.`,
    month: "Month",
    searchPlaceholder: "Search a client...",
    empty: "No client on the list: add one to give them Donna credit",
    addClient: "Add a client",
    remove: "Remove",
    removeTitle: (name: string) => `Remove ${name} from the list?`,
    removeDescription: "This month's gift is taken back and Donna stops for this client once he has no credit, unless he accepts to pay beyond it.",
    removed: "Client removed",
    add: {
      title: "Add a client",
      intro: "The client gets Donna credit without having to use it first. Without credit, Donna does not work for him until he accepts to pay beyond it.",
      change: "Change",
      price: "Price paid per vehicle / month (€)",
      priceHint: "Optional: editable afterwards in the list.",
      amount: "This month's gift (€)",
      amountPlaceholder: "Computed from the price per vehicle",
      amountHint: "Leave empty for the automatic gift (needs a price per vehicle).",
      note: "Note (optional)",
      none: "No company to add",
      submit: "Add",
      added: "Client added",
    },
    giftOff: "Automatic gift switched off (Settings)",
    stats: {
      gifts: "Gifts granted",
      donnaUsed: "Donna usage (client price)",
      donnaCost: "Donna cost (provider)",
      overage: "Overage to invoice",
      platformCost: "Offered platform AI (cost)",
      net: "AI result of the month",
      netHint: "Invoiced overage − every AI cost",
      unassigned: (amount: string) => `incl. ${amount} not tied to a client`,
    },
    columns: {
      client: "Client",
      pricePerVehicle: "Price / vehicle",
      gift: "Gift",
      donna: "Donna used",
      overage: "Overage",
      cost: "Real cost",
      platform: "Platform (offered)",
      net: "Result",
    },
    noPrice: "to fill in",
    revoked: "revoked",
    custom: "custom",
    grantAll: "Grant this month's gifts",
    grantedAll: (n: number, amount: string) => `${n} gift(s) granted, ${amount} in all`,
    settings: {
      button: "Settings",
      title: "Donna settings",
      intro: "All of Donna's pricing is set here. A change applies to the calls made after it; what is already counted keeps its price.",
      saved: "Settings saved",
      cancel: "Cancel",
      markup: "Markup (multiplier)",
      markupHint: "Client price = provider cost × this multiplier. 1.20 = +20%.",
      usdToEur: "USD → EUR rate",
      usdToEurHint: "Providers bill in dollars; our costs are kept in euros.",
      giftRate: "Monthly gift (%)",
      giftRateHint: "Share of what the client pays for its fleet (billable vehicles × price per vehicle).",
      giftEnabled: "Automatic gift enabled",
      giftEnabledHint: "Off: no more automatic gift. Gifts already granted and custom gifts stay.",
      prices: "Model prices (USD per million tokens)",
      pricesHint: "The providers' public prices. A dated model (gpt-4o-2024-08-06) takes the price of the name it starts with.",
      model: "Model",
      input: "Input",
      output: "Output",
      cacheRead: "Cache read",
      cacheWrite: "Cache write",
      otherModels: "Any other model",
      addModel: "Add a model",
      ocrPage: "OCR (USD per page)",
      ocrPageHint: "Pages read by Azure Vision.",
    },
    save: "Save",
    saved: "Price saved",
    details: "Details",
    detail: {
      title: (name: string, period: string) => `${name} — ${period}`,
      priceLabel: "Price paid per vehicle / month (temporary)",
      priceHint: "Typed by hand until the pricing module is ready.",
      giftEnabled: "Monthly gift enabled",
      quote: (amount: string, vehicles: number, price: string) => `This month's gift if granted now: ${amount} (${vehicles} vehicles × ${price} × gift rate)`,
      noQuote: "No gift possible: missing price, gift disabled or no billable vehicle.",
      grant: "Grant this month's gift",
      granted: "Gift granted",
      revoke: "Revoke the gift",
      revokedToast: "Gift revoked",
      restore: "Restore the gift",
      restoredToast: "Gift restored",
      customTitle: "Custom gift",
      customHint: "An amount of your choice for this month: a goodwill gesture, a client with no price, or the computed gift corrected. It replaces the month's gift.",
      customAmount: "Amount in €",
      customNote: "Reason (internal)",
      customGrant: "Give this amount",
      customNoteShown: (note: string) => `Reason: ${note}`,
      gift: "Gift",
      used: "Used",
      remaining: "Remaining",
      overage: "Overage",
      ourCost: "Our cost",
      donnaLines: "Donna — where the usage went",
      workers: "Background agents",
      platformLines: "Platform AI (offered)",
      feature: "Item",
      calls: "Calls",
      price: "Client price",
      cost: "Cost",
      on: "On",
      off: "Off",
      nothing: "Nothing this month",
    },
  },
  billing: {
    searchPlaceholder: "Search a client, contact, email...",
    empty: "No client",
    settingsButton: "Settings",
    manageButton: "Manage",
    months: (n: number) => `${n} month${n !== 1 ? "s" : ""}`,
    perMonth: (amount: string) => `${amount} / mo`,
    unpaidOf: (n: number, tol: number) => `${n} / ${tol}`,
    stats: {
      totalDue: "Total amount due",
      withUnpaid: "Clients with unpaid",
      atRisk: "At risk of suspension",
      suspended: "Suspended accounts",
    },
    columns: {
      client: "Client",
      plan: "Plan",
      vehicles: "Vehicles",
      status: "Status",
      unpaid: "Unpaid",
      amountDue: "Amount due",
      nextDue: "Next due date",
      tolerance: "Tolerance",
      action: "Action",
    },
    settings: {
      title: "Billing settings",
      toleranceLabel: "Default tolerance period (months)",
      toleranceHelp: "Applied to new clients. Adjustable individually from each client's record.",
      save: "Save",
      saved: "Settings saved",
    },
    products: {
      intro:
        "The products invoiced to contract clients, at their list price excl. VAT per vehicle and month. A new price applies from the next invoice to the clients without a price of their own; the others keep their price, only the discount shown changes. Invoices already issued do not move.",
      newProduct: "New product",
      edit: "Edit",
      columns: { product: "Product", role: "Invoiced on", price: "List price excl. VAT", pennylane: "Pennylane product", clients: "Clients", status: "Status" },
      roles: {
        fleet: "Every vehicle in the fleet",
        telematics: "Every connected vehicle",
        bundle: "Every vehicle with a box",
      } as Record<string, string>,
      active: "Active",
      inactive: "Switched off",
      perVehicle: (price: string) => `${price} / vehicle / month`,
      saved: "Product saved",
      created: "Product created",
      dialog: {
        titleCreate: "New product",
        titleEdit: "Edit product",
        label: "Name on the invoice",
        role: "Invoiced on",
        roleFixed: "Set at creation: it says which vehicles the line counts.",
        price: "List price excl. VAT / vehicle / month",
        description: "Text under the invoice line",
        pennylane: "Pennylane product ID (optional)",
        pennylaneHint: "Pennylane then fills the line from its catalog.",
        active: "Offered in contracts",
        activeLocked: (n: number) => `Invoiced to ${n} client${n > 1 ? "s" : ""}: change their contract first to switch it off.`,
        create: "Create the product",
        save: "Save",
      },
    },
    manage: {
      title: "Billing management",
      contact: "Contact",
      paymentMode: "Payment mode",
      subscriptionStart: "Subscription start",
      lastPayment: "Last payment",
      statut: "Status",
      unpaidMonths: "Unpaid months",
      amountDue: "Amount due",
      autoLockTitle: "Automatic account lock",
      autoLockHelp: "Automatically suspends the client account after the tolerance period of consecutive unpaid months.",
      toleranceTitle: "Tolerance period (months)",
      toleranceHelp: "Number of unpaid months tolerated before automatic lock.",
      useDefault: (n: number) => `Reset to default (${n} months)`,
      inheritsDefault: "Inherits the default value",
      warnDisabled: "Automatic lock is disabled for this client. No suspension will be applied for unpaid invoices.",
      warnWillLock: (unpaid: number, tol: number) =>
        `With these settings, this account will be locked immediately (${unpaid} unpaid months ≥ ${tol} months tolerance).`,
      accessTitle: "Account access",
      lockState: "Current state",
      suspend: "Suspend now",
      reactivate: "Reactivate",
      backToAuto: "Back to automatic",
      invoicesTitle: "Invoices to reconcile",
      markPaid: "Mark paid",
      save: "Save",
      notFound: "Client not found",
      mandate: {
        title: "SEPA direct debit",
        phases: {
          none: "No mandate",
          waiting: "Awaiting signature",
          active: "Active",
          inactive: "Inactive",
        },
        off: "Direct debit is not open yet (BILLING_SEPA_ENABLED).",
        none: "Pennylane e-mails the mandate to the client, who signs it online.",
        waiting: (on: string, source: string) => `Mandate sent on ${on} (${source}), not signed yet.`,
        active: (on: string) => `Mandate signed on ${on}: Pennylane debits the invoices.`,
        activeNoDate: "Mandate signed: Pennylane debits the invoices.",
        inactive: (status: string) => `Mandate ${status}: no more debits.`,
        // Pennylane's mandate statuses, in words (only "enabled" is documented).
        statuses: { revoked: "revoked", canceled: "cancelled", cancelled: "cancelled", refused: "refused", expired: "expired", failed: "failed" } as Record<string, string>,
        // Why the bank rejected a debit, in Pennylane's payment statuses.
        debitStatuses: { failed: "failed", charged_back: "charged back", customer_approval_denied: "denied by the customer" } as Record<string, string>,
        sources: { client: "by the client", admin: "by an admin", auto: "automatic", command: "bulk send" } as Record<string, string>,
        send: "Send the mandate",
        resend: "Send the mandate again",
        sent: "Mandate sent by Pennylane",
        email: "Company e-mail",
        lastError: "Last error",
        rejects: "Rejected debits (12 months)",
        reject: (number: string, amount: string, on: string) => `Invoice ${number}, ${amount} incl. VAT, reject seen on ${on}`,
        settled: "settled since",
        owed: "owed",
      },
      contract: {
        title: "Billing contract",
        active: "Invoiced by the platform",
        activeHelp: "The monthly run invoices active clients only.",
        mode: "Rule",
        modes: {
          contract: "Contract: the month just ended, counted on its last day",
          plan: "Plan: the plan's price on every vehicle (Telematics: the connected ones, the others at Fleet Business), the month ahead",
        } as Record<string, string>,
        roles: {
          fleet: "Fleet (every vehicle)",
          telematics: "Telematics (every connected vehicle)",
          bundle: "Box bundle (every vehicle with a box)",
        } as Record<string, string>,
        notInvoiced: "Not invoiced",
        clientPrice: "Client price",
        priceHint: (list: string) => `Client price excl. VAT / vehicle / month. Empty: list price, ${list}.`,
        notes: "Contract terms",
        save: "Save the contract",
        saved: "Contract saved",
        none: "No contract: this client is not invoiced by the platform.",
        lastMonth: (month: string) => `Invoice for ${month}`,
        thisMonth: (month: string) => `${month}, running (counted today)`,
        nextMonth: (month: string) => `Next invoice: ${month}, issued on the 1st (counted today)`,
        counts: (fleet: number, boxes: number, cars: number) => `${fleet} vehicles, ${boxes} boxes, ${cars} connected cars`,
        columns: { product: "Product", quantity: "Qty", list: "List price", discount: "Discount", total: "Total excl. VAT" },
        total: "Total excl. VAT",
        empty: "Nothing to invoice",
      },
      vehiclePlans: {
        title: "Vehicle plans",
        inUse: "Billed by its vehicles' plans: only the vehicles holding a plan are billed, each at the client's price for its plans.",
        contractNotInUse: "No plan yet: this client is billed by its contract. From the first plan set on a vehicle, only the vehicles holding a plan are billed, on the month's last day: set the whole fleet's plans at once.",
        offerNotInUse: (plan: string, count: number) =>
          `No plan chosen yet: the ${plan} offer is billed on ${count} vehicle${count > 1 ? "s" : ""}. On the first choice, ${count > 1 ? "they keep it" : "it keeps it"}, then each vehicle follows its plans.`,
        notBilled: "This client is not invoiced by the platform: plans change nothing until its billing is active.",
        columns: { plan: "Plan", list: "List price", price: "Client price excl. VAT", vehicles: "Vehicles", vehicle: "Vehicle" },
        offSale: "off sale",
        priceHint: "Empty: list price. The price applies from the next invoice.",
        savePrices: "Save the prices",
        pricesSaved: "Prices saved",
        search: "Plate, make, model",
        selectAll: "Select all",
        selected: (n: number) => `${n} selected`,
        choosePlan: "Plan",
        add: "Add",
        remove: "Remove",
        updated: "Vehicle plans updated",
        prorata: (amount: string) => `Prorata on the next invoice: ${amount} excl. VAT`,
        connected: "connected",
        byOffer: "by the offer",
        none: "no plan",
        noVehicle: "No vehicle in the fleet.",
        totals: (withPlan: number, total: number, amount: string) =>
          `${withPlan} of ${total} vehicle${total > 1 ? "s" : ""} billed · ${amount} excl. VAT / month`,
      },
      pennylane: {
        title: "Pennylane customer",
        help: "The Pennylane customer this company's invoices go to.",
        off: "Pennylane is switched off on this platform (PENNYLANE_ENABLED): the link is not checked.",
        none: "No link: on the first invoice, a new customer would be created in Pennylane.",
        linked: (name: string, id: string) => `${name} (no. ${id})`,
        unchecked: (id: string) => `Customer no. ${id}`,
        sirenDiffers: (siren: string) => `SIREN differs from the company's (${siren}): check it is the entity invoiced.`,
        alsoLinked: (names: string) => `Also linked to: ${names}`,
        search: "Name or SIREN / SIRET",
        searchButton: "Search",
        noResult: "No Pennylane customer found",
        link: "Link",
        unlink: "Unlink",
        linkedToast: "Pennylane customer linked",
        unlinkedToast: "Link removed",
      },
    },
    suspendConfirm: {
      title: "Suspend account",
      description: (name: string) =>
        `"${name}" will be locked: app access is blocked regardless of the unpaid level. This does not remove vehicles from ANTAI.`,
    },
    toasts: {
      configSaved: "Configuration updated",
      suspended: "Account suspended",
      reactivated: "Account reactivated",
      backToAuto: "Automatic policy restored",
      invoicePaid: "Invoice marked as paid",
    },
  },
  tickets: {
    toasts: {
      updated: "Ticket updated",
      deleted: "Ticket deleted",
    },
    columns: {
      ticket: "Ticket",
      category: "Category",
      priority: "Priority",
      createdBy: "Created by",
    },
    actions: {
      viewDetails: "View details",
    },
    searchPlaceholder: "Search a ticket...",
    empty: "No ticket found",
    stats: {
      total: "Total",
      open: "Open",
      resolved: "Resolved",
      new30d: "New (30d)",
      awaitingReply: "Awaiting reply",
    },
    filters: {
      allStatuses: "All statuses",
      allPriorities: "All priorities",
      allCategories: "All categories",
      allAssignees: "All assignees",
      unassigned: "Unassigned",
      assignee: "Assigned to",
      conversation: "Conversation",
      allConversations: "All conversations",
      awaitingReply: "Client awaiting reply",
    },
    awaitingReplyBadge: "Client replied",
    columnsExtra: {
      assignee: "Assigned to",
      lastClientMessage: "Last client message",
      lastDadycarReply: "Last Dadycar reply",
    },
    delete: {
      title: "Delete ticket",
      description: (title: string | undefined) =>
        `Are you sure you want to delete "${title}"? This action is reversible.`,
    },
  },
  ticketDetail: {
    notFound: "Ticket not found",
    ticketIdLabel: (id: number) => `Ticket #${id}`,
    editTitle: "Edit ticket",
    sections: {
      description: "Description",
      documents: (n: number) => `Documents (${n})`,
      info: "Information",
      history: "History",
    },
    fields: {
      title: "Title",
      noDescription: "No description",
      createdAt: "Created at",
      updatedAt: "Last updated",
      assignee: "Assigned to",
      lastClientMessage: "Last client message",
      lastDadycarReply: "Last Dadycar reply",
    },
    assignee: {
      placeholder: "Select a member",
      search: "Search a member...",
      empty: "No member",
      unassign: "Unassign",
      activeCount: (n: number) => `(${n})`,
    },
    communications: {
      tabs: {
        client: "Client conversation",
        internal: "Internal communications",
      },
      empty: "No message yet",
      composerPlaceholderClient: "Reply to the client...",
      composerPlaceholderInternal: "Internal note... (type @ to mention)",
      sendClient: "Send to client",
      sendInternal: "Post note",
      privateBadge: "Private note - not visible to the client",
      clientFooter: (ticketId: number) =>
        `Sent via support@dadycar.fr - Subject: [Ticket #${ticketId}]`,
      mention: {
        header: "Mention a member",
        empty: "No result",
      },
      attachmentsHint: "Drag & drop files (max 10 files, 10 MB each)",
      fileTooLarge: (name: string) => `File too large: "${name}" exceeds 10 MB`,
      tooManyFiles: "Maximum 10 files per message",
      internalOnly: "Internal only",
      edit: "Edit",
      delete: "Delete",
      editedAt: "(edited)",
      clientImmutable: "Client conversations cannot be modified.",
      toastMessageSent: "Message posted",
      toastMessageEdited: "Message updated",
      toastMessageDeleted: "Message deleted",
      confirmDeleteTitle: "Delete note",
      confirmDeleteDescription:
        "Are you sure you want to delete this internal note? This action is irreversible.",
    },
    history: {
      readOnly: "Read-only - Internal",
      loadMore: "Load more",
      empty: "No history entry",
      labels: {
        create: "created the ticket",
        deleted: "deleted the ticket",
        status_change: "changed the status",
        priority_change: "changed the priority",
        category_change: "changed the category",
        title_change: "edited the title",
        description_change: "edited the description",
        assign: "assigned the ticket",
        unassign: "unassigned the ticket",
        message_client: "replied to the client",
        message_from_client: "wrote to Dadycar",
        message_internal: "added an internal note",
        message_edited: "edited a message",
        message_deleted: "deleted a message",
        attachment_added: "added an attachment",
        attachment_removed: "removed an attachment",
      },
      unassigned: "Unassigned",
      system: "System",
    },
  },
  rfid: {
    stats: {
      total: "Total batches",
      processing: "Processing",
      processed: "Processed",
      changesPending: "Pending changes",
      companies: "Companies",
    },
    searchPlaceholder: "Search a reference...",
    empty: "No RFID card batches",
    columns: {
      reference: "Reference",
      company: "Company",
      status: "Status",
      changes: "Changes",
      submittedBy: "Submitted by",
      submittedAt: "Submitted at",
    },
    filters: {
      status: "Status",
      allStatuses: "All statuses",
      company: "Company",
      allCompanies: "All companies",
    },
    statuses: {
      processing: "Processing",
      processed: "Processed",
    },
    actions: {
      viewDetails: "View details",
      process: "Process batch",
    },
    toasts: {
      processed: "Batch processed",
    },
    detail: {
      notFound: "Batch not found",
      referenceLabel: (ref: string) => `Batch ${ref}`,
      sections: {
        info: "Information",
        changes: (n: number) => `Changes (${n})`,
      },
      fields: {
        reference: "Reference",
        company: "Company",
        status: "Status",
        changesCount: "Changes",
        submittedBy: "Submitted by",
        submittedAt: "Submitted at",
        processedBy: "Processed by",
        processedAt: "Processed at",
        empty: "—",
      },
      change: {
        card: (num: string) => `Card ${num}`,
        noCard: "No card",
        requestedBy: "Requested by",
        empty: "No changes in this batch",
      },
      changeTypes: {
        create: "Create",
        assign: "Assign",
        vehicles: "Vehicles",
        activate: "Activate",
        deactivate: "Deactivate",
        archive: "Archive",
      },
      process: {
        button: "Process batch",
        confirmTitle: "Process this batch?",
        confirmDescription:
          "This finalises the changes (activation/deactivation) and syncs driver badges to the devices. It is irreversible.",
        alreadyProcessed: "This batch has already been processed.",
      },
    },
  },
  health: {
    periods: { month: "This month", week: "Last week", "3months": "Last 3 months", custom: "Custom" },
    tiers: { healthy: "Healthy", attention: "Needs attention", at_risk: "At risk" },
    watchlist: "Watchlist",
    needsCompute: {
      title: "Analytics not computed yet",
      description: "The nightly computation has not run. Metrics will appear once snapshots are generated.",
    },
    exec: {
      portfolioScore: "Portfolio score",
      clients: "Clients",
      totalClients: "Total clients",
      activeThisMonth: "Active this month",
      inactive: "Inactive",
      newClients: "New (30 days)",
      churnRisk: "Churn risk",
      users: "Users",
      totalUsers: "Total users",
      activeToday: "Active today",
      activeWeek: "Active this week",
      activeMonth: "Active this month",
      adoption: "Adoption",
      avgLoginFrequency: "Avg login frequency",
      avgModules: "Avg modules / client",
      avgSession: "Avg session",
      avgFeatureAdoption: "Avg feature adoption",
      engagement: "Portfolio engagement",
      actionsPerWeek: "Total actions / week",
      vsPrev: "vs prev",
      distribution: "Health distribution",
      clientsLower: "clients",
      bandHealthy: (n: number) => `Healthy (${n}+)`,
      bandAttention: "Needs attention",
      bandAtRisk: (n: number) => `At risk (<${n})`,
      churnListTitle: "Churn risk · needs attention",
      noChurn: "No client below the at-risk threshold.",
      viewAll: "View all →",
      noLoginDays: (n: number) => `No login in ${n} days`,
      daysAgo: (n: number) => `${n}d ago`,
      moduleUtil: "Module utilization · portfolio avg",
      perMonth: "/mo",
      minutes: (n: number) => `${n}m`,
    },
    list: {
      searchPlaceholder: "Search a client…",
      new: "NEW",
      accounts: (n: number) => `${n} account${n !== 1 ? "s" : ""}`,
      columns: {
        company: "Company", plan: "Plan", vehicles: "Vehicles", users: "Users",
        active: "Active", modules: "Modules", trend: "Trend", health: "Health",
      },
      tabs: { all: "All", healthy: "Healthy", attention: "Attention", at_risk: "At risk" },
    },
    profile: {
      back: "Back to all clients",
      score: "/ 100",
      clientSince: (y: string) => `Client since ${y}`,
      tiles: { vehicles: "Vehicles", users: "Users", active: "Active", mau: "MAU" },
      tabs: { overview: "Overview", activity: "Activity & Logins", adoption: "Feature Adoption", behavior: "Behavior", benchmark: "Benchmark" },
      breakdown: "Health score breakdown",
      weight: (n: number) => `${n}% weight`,
      excluded: "Excluded (not applicable)",
      alerts: "Adoption & engagement alerts",
      noAlerts: "No active alerts — account is healthy.",
      engagementTrend: "Engagement trend",
      thisMonth: "This month", lastMonth: "Last month", actionsLower: "actions",
      fleetMaturity: "Fleet maturity",
      components: { activity: "User activity", adoption: "Module adoption", frequency: "Session frequency", completeness: "Data completeness", growth: "Growth trend" },
      maturityItems: {
        vehicles_data: "Vehicles data entered", employees: "Employees assigned", sites: "Sites created",
        suppliers: "Suppliers recorded", finance_documents: "Finance documents uploaded", fuel_energy: "Fuel & Energy tracked",
      },
      dau: "Daily active users", wau: "Weekly active users", mau: "Monthly active users",
      today: "today", last7: "last 7 days", last30: "last 30 days",
      loginAnalytics: "Login analytics", logins30d: "Logins · last 30 days", avgLoginsUser: "Avg logins / user",
      mostActive: "Most active users", inactiveUsers: "Inactive users",
      noLogin30: "No login in 30+ days", noLogin60: "No login in 60+ days", noLogin90: "No login in 90+ days",
      byModule: "Feature adoption · by module", ranking: "Utilization ranking", discovery: "Feature discovery timeline",
      status: { active: "Active", low: "Low usage", unused: "Unused", "n/a": "N/A" },
      threshold: (n: number) => `target ${n}`,
      workflow: "Workflow analysis · top navigation paths", avgSession: "Avg session",
      minutes: (n: number) => `${n} min`,
      heatmap: "Activity heatmap", byHour: "By hour of day", byWeekday: "By day of week",
      low: "Low", high: "High",
      annual: "Annual activity · last 12 months", activeDays: (n: number) => `${n} active days in the last year`,
      less: "Less", more: "More", lowActivity: "Low activity — few paths to show.",
      benchmarkTitle: "Benchmark vs all clients", benchmarkUnavailable: "Benchmark needs a computed snapshot set.",
      benchmarkAgainst: (n: number) => `Compared against the portfolio average across all ${n} other accounts.`,
      thisClient: "This client", peerAvg: "Peer avg", vsPeers: "vs peers",
      benchmarkSummary: (n: number) => `Underutilizing in ${n} of 5 metrics vs the portfolio average.`,
      benchmarkOutperforms: "Outperforms peers on all metrics.",
    },
    config: {
      scoreWeights: "Score weights", weightsHint: "Each component's contribution to the 0–100 score. Should total 100.",
      total: "Total",
      weights: { activity: "User activity", adoption: "Module adoption", frequency: "Session frequency", completeness: "Data completeness", growth: "Growth trend" },
      targets: "Targets & calibration",
      targetActions: "Target actions / user", targetLogins: "Target logins / user", growthBand: "Growth band",
      perMonth: "/month", band: "±% mapping to 0 and 100",
      moduleThresholds: "Per-module adoption thresholds",
      moduleThresholdsHint: "Usage % (per-vehicle) or minimum count (account/record) at which each module counts as adopted.",
      completenessItems: "Vehicle completeness items",
      tierCutoffs: "Health tier cut-offs", tierHealthy: "Healthy ≥", tierAtRisk: "At risk <",
      alertThresholds: "Alert thresholds",
      alerts: {
        inactivity_amber_days: "Inactivity — amber (business days)", inactivity_red_days: "Inactivity — red (business days)",
        weak_adoption_amber: "Weak adoption — amber (%)", weak_adoption_red: "Weak adoption — red (%)", tenure_gate_months: "Tenure gate (months)",
        weekly_drop_enabled: "Weekly active-user drop (1 = on)", monthly_drop_enabled: "Monthly active-user drop (1 = on)",
      },
      defaultPeriod: "Default reporting period",
      save: "Save changes", reset: "Reset to defaults",
      resetTitle: "Reset to defaults?", resetDescription: "This restores every scoring parameter to its shipped default value.",
      readOnly: "You have read-only access to this configuration.",
      toasts: { saved: "Configuration saved", reset: "Configuration reset to defaults" },
    },
    weekdays: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
  },
  activityLogs: {
    stats: {
      userActivity: "User activity",
      vehicleHistory: "Vehicle history",
      statusChanges: "Status changes",
      siteChanges: "Site changes",
      todayCount: (today: number, last30: number) => `${today} today, ${last30} this month`,
      last30Days: (n: number) => `${n} in the last 30 days`,
    },
    tabs: {
      activity: "Activity",
      vehicles: "Vehicles",
      statuses: "Statuses",
      sites: "Sites",
    },
    columns: {
      action: "Action",
      method: "Method",
      module: "Module",
      user: "User",
      ip: "IP",
      description: "Description",
      vehicle: "Vehicle",
      oldStatus: "Old status",
      newStatus: "New status",
      oldSite: "Old site",
      newSite: "New site",
    },
    search: {
      userActivity: "Search URL, module, IP, user...",
      vehicleHistory: "Search description, action...",
    },
    filters: {
      modules: {
        vehicles: "Vehicles",
        drivers: "Drivers",
        sites: "Sites",
      },
      vehicleActions: {
        archived: "Archived",
        unarchived: "Unarchived",
      },
    },
  },
  telematics: {
    tabs: {
      orders: "Orders",
      catalog: "Product catalog",
    },
    catalog: {
      subtitle:
        "Manage products available for order, their specifications, covered needs and prices.",
      addButton: "New product",
      searchPlaceholder: "Search by name, SKU, need or description...",
      empty: "No product",
      stats: {
        products: "Products",
        active: "Active",
        outOfStock: "Out of stock",
        stockValue: "Stock value",
      },
      filters: {
        category: "Category",
        allCategories: "All categories",
      },
      columns: {
        sku: "SKU",
        product: "Product",
        category: "Category",
        needs: "Needs covered",
        price: "Price excl. tax",
        stock: "Stock",
        status: "Status",
      },
      categories: {
        boitier: "Box",
        module: "Module",
        capteur: "Sensor",
        accessoire: "Accessory",
      },
      dialog: {
        titleCreate: "New product",
        titleEdit: "Edit product",
        submitCreate: "Create product",
        submitEdit: "Save",
      },
      fields: {
        sku: "SKU",
        skuPlaceholder: "TLT-FMC003",
        category: "Category",
        name: "Product name",
        namePlaceholder: "Teltonika FMC003",
        description: "Description",
        priceHt: "Price excl. tax (€)",
        stock: "Stock",
        statusActive: "Product active",
        needsCovered: "Needs covered",
        needsHelp: "Select the features provided by this product.",
        addCustomNeed: "Add a custom need...",
        addNeedButton: "Add",
        specifications: "Specifications",
        addSpec: "Add",
        specKeyPlaceholder: "Key",
        specValuePlaceholder: "Value",
      },
      toasts: {
        created: "Product created",
        updated: "Product updated",
        deleted: "Product deleted",
      },
      delete: {
        title: "Delete product",
        description: (name?: string) =>
          `Are you sure you want to delete "${name ?? ""}"?`,
      },
    },
    orders: {
      searchPlaceholder: "Search by reference, organization or product...",
      empty: "No order",
      stats: {
        total: "Total orders",
        pending: "Pending",
        inProgress: "In progress",
        installed: "Installed",
      },
      filters: {
        status: "Status",
        allStatuses: "All statuses",
      },
      columns: {
        reference: "Reference",
        organization: "Organization",
        products: "Boxes",
        quantity: "Quantity",
        delivery: "Delivery",
        date: "Date",
        totalHt: "Total excl. tax",
        status: "Status",
      },
      actions: {
        accept: "Accept",
        reject: "Reject",
        view: "View order",
      },
      lifecycle: {
        acceptTitle: "Accept order",
        acceptDescription:
          "The order will move to \"In progress\" and be forwarded to the supplier.",
        acceptOrderDateLabel: "Order date",
        acceptNotePlaceholder: "Internal note (optional)",
        rejectTitle: "Reject order",
        rejectDescription:
          "The order will be marked as \"Rejected\" and the fleet manager will be notified.",
        rejectReasonPlaceholder: "Rejection reason",
        confirm: "Confirm",
      },
      toasts: {
        accepted: "Order accepted",
        rejected: "Order rejected",
      },
    },
    orderDetail: {
      notFound: "Order not found",
      subtitle: (org: string, date: string) => `${org} · submitted on ${date}`,
      sections: {
        delivery: (n: number) => `Delivery (${n} site${n > 1 ? "s" : ""})`,
        needs: "Expressed needs",
        totalCommande: "Order total",
        ttc: "Incl. tax",
        summary: "Summary",
        dates: "Dates",
        demandeur: "Requester",
      },
      fields: {
        units: (n: number) => `${n} unit${n > 1 ? "s" : ""}`,
        unitPrice: (qty: number, price: string) => `${qty} × ${price}`,
        lines: "Lines",
        boxes: "Boxes",
        sites: "Sites",
        orderDate: "Order date",
        receivedDate: "Reception date",
        dateNotSet: "Not set",
        installation: "Installation",
        totalHt: "Total excl. tax",
        vat: (rate: number) => `VAT (${rate}%)`,
        totalTtc: "Total incl. tax",
        noNeeds: "No expressed need",
      },
    },
    requestInstallation: {
      action: "Request installation",
      title: "Start installation request",
      description:
        "Notify one or more installers: each proposes their slots, the client validates the one that suits them.",
      installerLabel: "Installer",
      installerPlaceholder: "Select an installer",
      vehiclesLabel: "Boxes",
      noInstallers: "No installer available.",
      missingInstaller: "Select at least one installer.",
      confirm: "Start request",
      success: "Installation request(s) started",
      step1Title: "Order delivered",
      step1Lead: (ref: string) =>
        `Order ${ref} — has just been delivered. Do you want to start the installation request?`,
      step1Heading: "An order has been delivered",
      step1Body: (boxes: number, location: string, vehicles: number) =>
        `${boxes} telematics box(es) to deliver to ${location}, for installation on ${vehicles} vehicle(s). Do you want to start the installation request?`,
      remindLater: "Remind me later",
      launch: "Start installation request",
      step2Title: "Order summary",
      step2Lead: (ref: string) =>
        `Order ${ref} — review the information before notifying installers.`,
      summaryTitle: "Order summary",
      boxesLabel: "Telematics boxes",
      qtyLabel: "Qty",
      clientLabel: "Client",
      deliveryLabel: "Delivery location",
      contactLabel: "On-site contact",
      sitesTitle: "Delivery sites",
      sitesCount: (n: number) => `${n} site${n > 1 ? "s" : ""}`,
      unitsLabel: (n: number) => `${n} box${n > 1 ? "es" : ""}`,
      noContact: "No contact provided",
      vehiclesTitle: "Vehicles",
      colPlate: "Plate",
      colVehicle: "Vehicle",
      colYear: "Year",
      colVin: "VIN",
      colBox: "Box",
      back: "Back",
      next: "Continue",
      step3Title: "Assign installers",
      step3Lead: (ref: string) =>
        `Order ${ref} — select the vehicles, then the installer(s) who will handle them.`,
      // Vehicle selection to assign (many-to-many relationship).
      selectVehiclesTitle: "Vehicles to assign",
      vehiclesSelectedCount: (n: number) => `${n} selected`,
      selectAll: "Select all",
      deselectAll: "Deselect all",
      allAssigned: "All vehicles are already assigned to an installer.",
      assignedTo: (name: string) => `Assigned to ${name}`,
      colAssignment: "Assignment",
      noVehicles: "No vehicle to install for this order.",
      // Grouping vehicles by delivery site.
      siteGroupNoSite: "No site",
      siteVehiclesCount: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""}`,
      selectSiteAll: "Select all",
      selectSiteNone: "Deselect all",
      // Building groups (vehicles → installers) before submission.
      assignSelected: (n: number) => `Assign ${n} vehicle${n !== 1 ? "s" : ""}`,
      pickInstallersTitle: "Choose installers",
      pickInstallersLead: (n: number) =>
        `For ${n} selected vehicle${n !== 1 ? "s" : ""}.`,
      confirmGroup: "Confirm group",
      groupBadge: (index: number, names: string) => `Group ${index} · ${names}`,
      groupsTitle: "Assignment groups",
      groupVehiclesCount: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""}`,
      remainingToAssign: (n: number) =>
        `${n} vehicle${n !== 1 ? "s" : ""} left to assign`,
      allAssignedReady: "All vehicles are assigned.",
      submitGroups: (n: number) =>
        `Submit request (${n} group${n !== 1 ? "s" : ""})`,
      personnelTitle: "Installation staff",
      selectedCount: (n: number) => `${n} selected`,
      submit: (n: number) => `Submit request (${n})`,
      submitToast: (n: number) => `Email sent to ${n} installer${n !== 1 ? "s" : ""}`,
    },
    installerAvailabilities: {
      action: "Installer availabilities",
      title: "Installer availabilities",
      lead: (ref: string) => `Order ${ref} — responses from notified installers.`,
      responsesTitle: "Responses received",
      responsesCount: (responded: number, total: number) =>
        `${responded} / ${total}`,
      responded: "Responded",
      awaiting: "Pending",
      scheduledBanner: (date: string) => `Installation scheduled on ${date}`,
      scheduledWith: (name: string) => `with ${name}`,
      noResponses: "No installer notified for this order.",
      close: "Close",
      loadError: "Unable to load availabilities.",
    },
    markDelivered: {
      action: "Mark as delivered",
      success: "Order marked as delivered.",
      title: "Mark order as delivered",
      description:
        "The order will move to \"Delivered\". Enter the reception date.",
      receivedDateLabel: "Reception date",
      confirm: "Confirm",
    },
  },
  installers: {
    badge: "installer",
    searchPlaceholder: "Search for an installer...",
    noResults: "No installer matches your search.",
    empty: "No installer",
    emptyHint: "Members of the installation team will appear here.",
    archivedBadge: "archived",
    archivedSince: (date: string) => `Archived on ${date}`,
    archivedEmpty: "No archived installer",
    archivedEmptyHint: "Installers you archive will appear here.",
    tabs: {
      active: "Active",
      archived: "Archived",
    },
    details: "View details",
    since: (date: string) => `Since ${date}`,
    recentTitle: "Recent installations",
    noPlate: "No plate",
    deviceUnknown: "Unknown device",
    validatedCount: (n: number) => `${n} validated`,
    errorsCount: (n: number) => `${n} error${n !== 1 ? "s" : ""}`,
    stats: {
      installations: "Installations",
      okRate: "OK rate",
      avgMin: "Avg min",
    },
    manage: {
      add: "Add installer",
      edit: "Edit",
      delete: "Delete",
      createTitle: "New installer",
      editTitle: "Edit installer",
      createLead: "Create an installer account. They will use it to sign in to the app.",
      editLead: "Update the installer's name and email.",
      nameLabel: "Name",
      namePlaceholder: "Full name",
      emailLabel: "Email",
      emailPlaceholder: "installer@example.com",
      passwordLabel: "Password",
      passwordPlaceholder: "At least 8 characters",
      passwordConfirmLabel: "Confirm password",
      cancel: "Cancel",
      save: "Save",
      create: "Create",
      createSuccess: "Installer created.",
      updateSuccess: "Installer updated.",
      passwordMismatch: "Passwords do not match.",
      // Password change
      changePassword: "Change password",
      passwordTitle: "Change password",
      passwordLead: (name: string) => `Set a new password for ${name}.`,
      newPasswordLabel: "New password",
      passwordSuccess: "Password updated.",
      // Archive (soft delete of an active installer)
      archive: "Archive",
      archiveTitle: "Archive installer",
      archiveConfirm: (name: string) =>
        `Are you sure you want to archive ${name}? You can restore them later.`,
      archiveSuccess: "Installer archived.",
      // Restore
      restore: "Restore",
      restoreSuccess: "Installer restored.",
      // Permanent deletion (irreversible)
      deleteForever: "Delete permanently",
      deleteTitle: "Delete permanently",
      deleteConfirm: (name: string) =>
        `Are you sure you want to permanently delete ${name}? This action cannot be undone.`,
      deleteSuccess: "Installer permanently deleted.",
    },
  },
  installations: {
    searchPlaceholder: "Search by plate, IMEI, model...",
    empty: "No installation",
    emptyHint: "Installations performed by the team will appear here.",
    results: (n: number) => `${n} result${n !== 1 ? "s" : ""}`,
    stats: {
      total: "Total",
      validated: "Validated",
      toFix: "To fix",
      pending: "Pending",
      avgMin: "Avg min",
    },
    filters: {
      title: "Filters",
      status: "Status",
      allStatuses: "All statuses",
      installer: "Installer",
      allInstallers: "All installers",
      dateFrom: "From",
      dateTo: "To",
      reset: "Reset",
    },
    statusLabels: {
      in_progress: "In progress",
      validated: "Validated",
      gps_error: "To fix",
      pending: "Pending",
    } as Record<string, string>,
    card: {
      noPlate: "No license plate",
      deviceUnknown: "Unknown device",
      fleetVehicle: (id: number) => `Fleet #${id}`,
      photos: (n: number) => `${n} photo${n !== 1 ? "s" : ""}`,
      minutes: (n: number) => `${n} min`,
    },
    edit: {
      title: "Edit installation",
      backToList: "Back to list",
      next: "Next",
      previous: "Previous",
      save: "Save",
      saveAndValidate: "Save and validate",
      saving: "Saving…",
      savedToast: "Installation saved",
      saveError: "Saving failed.",
      steps: {
        vehicle: "Vehicle",
        device: "Device",
        wiring: "Wiring & accessories",
        summary: "Summary",
      },
      summaryHint:
        "Review the information then save. “Save and validate” applies the changes and finalizes the installation.",
    },
    detail: {
      notFound: "Installation not found",
      actions: {
        edit: "Edit",
        validate: "Validate installation",
        validating: "Validating…",
        save: "Save",
        saving: "Saving…",
        cancel: "Cancel",
        editTitle: "Edit installation",
        incomplete: "Installation incomplete:",
        actionError: "The action failed. Please retry.",
        addWiring: "Add wire",
        unlinkFleet: "Unlink from fleet",
        fleetSearchPlaceholder: "Search a plate or VIN in the fleet…",
        fleetSearchEmpty: "No vehicle found",
      },
      sections: {
        intervention: "Intervention",
        vehicle: "Vehicle",
        device: "Device",
        wiring: "Wiring",
        validation: "GPS validation",
        accessories: "Accessories",
        photos: "Photos",
        notes: "Comments",
      },
      fields: {
        installer: "Installer",
        interventionDate: "Intervention date",
        location: "Location",
        duration: "Duration",
        licensePlate: "License plate",
        vin: "VIN",
        fleetVehicle: "Fleet vehicle",
        fleetLinked: (id: number) => `Linked — vehicle #${id}`,
        fleetNotLinked: "Not linked to the fleet",
        odometer: "Odometer (entered)",
        hourMeter: "Hour meter (entered)",
        fuelLevel: "Fuel level (entered)",
        odometerGps: "Odometer (GPS test)",
        hourMeterGps: "Hour meter (GPS test)",
        fuelLevelGps: "Fuel level (GPS test)",
        model: "Model",
        productLine: "Product line",
        telematicsBox: "Box (catalog)",
        imei: "IMEI",
        stockOrigin: "Stock origin",
        canModule: "CAN module",
        canModuleType: "CAN module type",
        simIccid: "SIM ICCID",
        simOperator: "SIM operator",
        simApn: "SIM APN",
        contactDetected: "Contact detected",
        gpsDate: "GPS position on",
        gpsAddress: "GPS address",
        satellites: "Satellites",
        wire: "Wire",
        accessory: "Accessory",
      },
      fuelLevels: {
        none: "Empty",
        quarter: "1/4",
        half: "1/2",
        three_quarters: "3/4",
        full: "Full",
      } as Record<string, string>,
      stockOrigins: {
        client: "Client stock",
        installer: "Installer stock",
        both: "Mixed",
      } as Record<string, string>,
      photoTypes: {
        vin: "VIN",
        before_install: "Before installation",
        after_install: "After installation",
        device_position: "Device position",
        incident: "Incident",
      } as Record<string, string>,
    },
  },
  antai: {
    searchPlaceholder: "Search by company, vehicle, plate or VIN...",
    empty: "No vehicle",
    refresh: "Refresh",
    queuedHint: "Processing is queued — refresh to see the result.",
    stats: {
      total: "Total vehicles",
      visible: "ANTAI visible",
      hidden: "Hidden",
      exceptions: "Exceptions",
      openExceptions: (n: number) => `${n} open`,
      archivedSuffix: (n: number) => `incl. ${n} archived`,
    },
    sort: {
      label: "Sort",
      recentSync: "Recent sync",
      oldestSync: "Oldest sync",
      plateAsc: "Plate A-Z",
      plateDesc: "Plate Z-A",
      newest: "Newest",
      oldest: "Oldest",
    },
    filters: {
      title: "Filters",
      company: "Company",
      companyStatus: "Company account",
      vehicleStatus: "Vehicle status",
      visibility: "ANTAI visibility",
      binding: "Binding",
      archived: "Archiving",
      unbindingReason: "Unbinding reason",
      exceptionType: "Exception type",
      exceptionStatus: "Exception status",
      reset: "Reset",
      activeCount: (n: number) => `${n} active`,
    },
    columns: {
      vehicle: "Vehicle",
      vin: "VIN",
      company: "Company",
      vehicleStatus: "Status",
      visibility: "ANTAI visibility",
      binding: "Binding",
      archive: "Archiving",
      exception: "Exception",
      lastUpdate: "Last update",
    },
    actions: {
      view: "View details",
      enable: "Enable visibility",
      disable: "Disable visibility",
      manageException: "Manage exception",
    },
    enable: {
      title: "Enable ANTAI visibility",
      description: (name: string) => `Vehicle "${name}" will be added to ANTAI (Visible status).`,
    },
    disable: {
      title: "Disable ANTAI visibility",
      description: (name: string) => `Vehicle "${name}" will be removed from ANTAI (Hidden status).`,
      reasonLabel: "Reason",
    },
    bulk: {
      selected: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} selected`,
      enable: "Enable visibility",
      disable: "Disable visibility",
      clear: "Clear selection",
      enableTitle: "Enable visibility (bulk)",
      enableDescription: (n: number) =>
        `ANTAI visibility will be enabled for ${n} vehicle${n !== 1 ? "s" : ""}. Processing is queued.`,
      disableTitle: "Disable visibility (bulk)",
      disableDescription: (n: number) =>
        `ANTAI visibility will be disabled for ${n} vehicle${n !== 1 ? "s" : ""}. Processing is queued.`,
      queued: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} queued`,
    },
    cascade: {
      action: "Disable all ANTAI vehicles",
      title: "Disable company vehicles",
      description: (company: string) =>
        `Every non-hidden vehicle of "${company}" will be removed from ANTAI (reason: company disabled). Processing is queued.`,
      queued: (n: number) => `${n} vehicle${n !== 1 ? "s" : ""} queued`,
    },
    exception: {
      badge: (type: string, status: string) => `${type} · ${status}`,
      title: "Manage exception",
      subtitle: "Resolution tracking. This does not change the real ANTAI state — use Enable/Disable for that.",
      statusLabel: "Resolution status",
      typeLabel: "Exception type",
      resolutionLabel: "Resolution",
      resolutionHelp: "Can the issue be resolved internally or does it require external intervention (ANTAI)?",
      detailLabel: "Detail",
      detailPlaceholder: "Tracking notes, ANTAI ticket reference...",
      detailMaxLength: "Detail cannot exceed 2000 characters",
      none: "None",
      submit: "Save",
      resolvedAt: (date: string) => `Resolved on ${date}`,
      updated: "Exception updated",
    },
    toasts: {
      enabled: "Visibility enabled",
      disabled: "Visibility disabled",
    },
    detail: {
      notFound: "Vehicle not found",
      sections: {
        antaiStatus: "ANTAI state",
        vehicle: "Vehicle",
        company: "Company",
        exception: "Exception",
      },
      fields: {
        plate: "Plate",
        vin: "VIN",
        mark: "Make",
        model: "Model",
        motorType: "Engine",
        vehicleStatus: "Vehicle status",
        companyAccount: "Company account",
        visibility: "ANTAI visibility",
        binding: "Binding",
        archive: "Archiving",
        unbindingReason: "Unbinding reason",
        clientCode: "ANTAI client code",
        lastUpdate: "Last synchronization",
        createdAt: "Created on",
        exceptionType: "Type",
        exceptionStatus: "Status",
        exceptionResolution: "Resolution",
        exceptionDetail: "Detail",
        resolvedAt: "Resolved on",
      },
    },
    enums: {
      visibility: {
        visible: "Visible",
        hidden: "Hidden",
        exception: "Exception",
      },
      binding: {
        bound: "Bound",
        unbound: "Unbound",
        exception: "Exception",
      },
      companyStatus: {
        active: "Active",
        disabled: "Disabled",
      },
      archived: {
        active: "Active",
        archived: "Archived",
      },
      unbindingReason: {
        manual: "Manual",
        company_disabled: "Company disabled",
        external_removal: "External removal",
        exception: "Exception",
      },
      exceptionType: {
        already_linked_other_client: "Already linked to another client code",
        removed_externally: "Removed externally",
        sync_failure: "Synchronization failure",
        antai_rejection: "ANTAI rejection",
        other: "Other",
      },
      exceptionStatus: {
        open: "Open",
        in_progress: "In progress",
        resolved: "Resolved",
      },
      exceptionResolution: {
        internal: "Internal",
        external: "External",
      },
      disableReason: {
        manual: "Manual",
        external_removal: "External removal",
        company_disabled: "Company disabled",
      },
    },
  },
  internalUsers: {
    inviteButton: "Invite a user",
    roleSettingsButton: "Role settings",
    searchPlaceholder: "Search by name or email...",
    empty: "No internal user found",
    noActivity: "—",
    stats: {
      total: "Total",
      active: "Active",
      invited: "Invitations",
      suspended: "Suspended",
    },
    filters: {
      role: "Role",
      allRoles: "All roles",
      status: "Status",
      allStatuses: "All statuses",
    },
    columns: {
      user: "User",
      role: "Role",
      status: "Status",
      lastActivity: "Last activity",
      createdAt: "Created at",
    },
    actions: {
      edit: "Edit",
      permissions: "Permissions",
      resendInvitation: "Resend invitation",
      delete: "Delete",
    },
    roleLabels: {
      super_admin: "Super Admin",
      admin: "Admin",
      support: "Support",
      commercial: "Commercial",
      read_only: "Read only",
    } as Record<string, string>,
    statusLabels: {
      active: "Active",
      invited: "Invited",
      suspended: "Suspended",
    } as Record<string, string>,
    permissionLabels: {
      "tickets.manage": "Manage tickets",
      "tickets.view": "View tickets",
      "companies.manage": "Manage companies",
      "users.manage": "Manage client users",
      "internal.manage": "Manage internal users",
      "telematic.manage": "Manage telematics orders",
      "catalog.manage": "Manage product catalog",
      "subscriptions.manage": "Manage subscriptions",
      "admin_vehicles.manage": "Manage vehicles",
      "logs.view": "View logs",
      "rfid.manage": "Manage RFID cards",
      "impersonate.use": "Impersonate users",
    } as Record<string, string>,
    invite: {
      title: "Invite a user",
      subtitle: "An invitation email will be sent.",
      submit: "Send invitation",
    },
    edit: {
      title: "Edit user",
      subtitle: "Update the member's information.",
      submit: "Save",
    },
    form: {
      fullName: "Full name",
      email: "Email",
      role: "Role",
      status: "Status",
    },
    roleHint: (role: string, count: number) =>
      `The ${role} role includes ${count} permission(s) by default. You can adjust them from the « Permissions » action.`,
    permissionsDialog: {
      title: (name: string) => `Permissions of ${name}`,
      baseRole: (role: string) => `Base role: ${role}`,
      modified: "Modified",
    },
    roleSettings: {
      title: "Role settings",
      subtitle: "Define default permissions for each role.",
    },
    delete: {
      title: "Delete user",
      description: (name?: string) =>
        `Are you sure you want to delete "${name ?? ""}"?`,
    },
    toasts: {
      invited: "Invitation sent",
      updated: "User updated",
      deleted: "User deleted",
      invitationResent: "Invitation resent",
      permissionsSaved: "Permissions saved",
      roleUpdated: "Role updated",
    },
  },
  dormantAccounts: {
    hint: "Free accounts left unused for the time their plan sets (the \"Closing after inactivity\" setting, 12 months on the free plan): warned by e-mail 30 days before, then closed. A closed account keeps all its data; \"Restore\" gives its users their access back.",
    searchPlaceholder: "Search a company or an e-mail...",
    empty: "No dormant account",
    status: { all: "All", notified: "Warned", closed: "Closed", restored: "Restored" },
    badges: { notified: "Warned", closed: "Closed", restored: "Restored" },
    columns: { company: "Company", lastActivity: "Last activity", status: "State", action: "" },
    notified: (on: string, closeOn: string) => `Warned on ${on} · closing on ${closeOn}`,
    closed: (date: string) => `Closed on ${date}`,
    restored: (date: string, who?: string | null) => (who ? `Restored on ${date} by ${who}` : `Restored on ${date}`),
    restore: "Restore",
    confirm: {
      title: "Restore this account?",
      description: (name?: string) =>
        `${name ?? "This account"} gets its access back: its users can sign in to Dadycar Fleet and DadycarGo again, with all their data. The inactivity count starts again from today.`,
    },
    toasts: { restored: "Account restored" },
  },
  upsellSignals: {
    hint: "Companies that hit a limit of their plan: to call. New signals also go to the sales team by e-mail each morning.",
    searchPlaceholder: "Search a company or an e-mail...",
    empty: "No signal",
    status: { open: "To follow", handled: "Handled", all: "All" },
    allKinds: "All signals",
    columns: {
      company: "Company",
      contact: "Contact",
      signal: "Signal",
      occurrences: "Times",
      lastSeen: "Last",
      follow: "Follow-up",
    },
    vehicles: (n: number) => `${n} vehicle${n > 1 ? "s" : ""}`,
    seenAgain: "again",
    handledBy: (who: string, date: string) => `Handled by ${who} on ${date}`,
    handledOn: (date: string) => `Handled on ${date}`,
    markHandled: "Mark handled",
    reopen: "Reopen",
    toasts: { handled: "Signal marked handled", reopened: "Signal reopened" },
  },
  entitlements: {
    planButton: "Features",
    planTitle: (name: string) => `Features — ${name}`,
    planHint: "What the plan includes. A module not listed follows the plan's default.",
    defaultLabel: "Default behaviour",
    states: { allow: "Included", preview: "Preview", deny: "Excluded" },
    capabilities: "Modules",
    quotas: "Limits",
    fromDefault: "default",
    unlimited: "Unlimited",
    periods: { lifetime: "Lifetime", month: "Per month" },
    counters: { live: "Counted from the data", setting: "Setting" } as Record<string, string>,
    save: "Save",
    saved: "Features saved",
    unlimitedPlanNotice: "This plan is unlimited: it includes everything, whatever these lines say.",
    search: "Search…",
    companyMenu: "Plan and features",
    companyTitle: (name: string) => `Plan and features — ${name}`,
    companyHint: "The company's plan, and the exceptions that apply to it only.",
    plan: "Plan",
    noPlan: "No plan",
    planChanged: "Company plan updated",
    planState: "Plan",
    effective: "Effective",
    override: "Exception",
    setOverride: "Exception",
    removeOverride: "Remove",
    overrideTitle: (label: string) => `Exception — ${label}`,
    overrideSaved: "Exception saved",
    overrideRemoved: "Exception removed",
    note: "Note",
    expiresAt: "Until (optional)",
    expired: "expired",
    used: "Used",
    limit: "Ceiling",
    planLimit: "Plan ceiling",
    resetUsage: "Reset",
    usageReset: "Counter reset",
    cancel: "Cancel",
  },
  // Plan changes during the month and cancellation (billing automation, part 2).
  subscriptionChanges: {
    title: "Subscription",
    confirmPlanTitle: (name: string) => `Move to the ${name} plan`,
    appliesNow: "The change applies at once. The rights follow the plan from the next request.",
    supplement: (amount: string, vehicles: number, days: number, month: number) =>
      `This month: +${amount} excl. VAT added to the next invoice (${vehicles} vehicles, ${days} days out of ${month}).`,
    credit: (amount: string, vehicles: number, days: number, month: number) =>
      `This month: ${amount} excl. VAT deducted from the next invoice (${vehicles} vehicles, ${days} days out of ${month}).`,
    noAdjustment: "No adjustment on the current month.",
    nextMonth: (vehicles: number, amount: string) =>
      `Then, each month: ${vehicles} vehicle${vehicles > 1 ? "s" : ""} = ${amount} excl. VAT.`,
    // Billed by its vehicles' plans: the offer moves on the vehicles holding it, the other plans stay.
    nextMonthVehiclePlans: (vehicles: number, amount: string) =>
      `Then, each month: the plans of ${vehicles} vehicle${vehicles > 1 ? "s" : ""} = ${amount} excl. VAT.`,
    confirmChange: "Confirm the change",
    planChanged: "Plan changed",
    noCancellation: "No cancellation in progress.",
    endsOn: (date: string, source: string) => `Cancellation scheduled: ends on ${date} (requested by ${source}).`,
    endedOn: (date: string) => `Subscription ended on ${date}.`,
    reason: "Reason",
    sources: { client: "the client", admin: "Dadycar" },
    cancel: "Cancel subscription",
    cancelTitle: "Cancel the subscription",
    cancelHint: "Access stays open until the end date included; no invoice is issued for the following months. Default: the end of the current month, already invoiced.",
    endDate: "End date",
    reasonPlaceholder: "Reason (optional)",
    confirmCancel: "Confirm the cancellation",
    cancelled: "Cancellation recorded",
    undo: "Undo the cancellation",
    undone: "Cancellation undone",
    pending: "On the next invoice",
    history: "History",
    kinds: {
      vehicle_plans: "Vehicle plans",
      plan_change: "Plan change",
      cancellation: "Cancellation",
      cancellation_undone: "Cancellation undone",
      trial_started: "Trial started",
      trial_stopped: "Trial stopped by the client",
      trial_resumed: "Trial resumed",
      trial_converted: "End of the trial: paid plan",
      trial_ended: "End of the trial: free plan",
    },
    trialUntil: (date: string) => `until ${date}`,
    trialEndsOn: (date: string) => `ends on ${date}`,
    trialRunning: (plan: string, date: string, how: string) => `${plan} trial until ${date}, ${how}: billed from the day after.`,
    trialStopped: (date: string) => `Trial stopped by the client: back on the free plan after ${date}, nothing billed.`,
    trialConverted: (from: string, to: string) => `Trial from ${from} to ${to}, then the paid plan.`,
    trialEnded: (from: string, to: string) => `Trial from ${from} to ${to}, then back on the free plan.`,
    trialCard: (brand: string, last: string) => `${brand} card •••• ${last}`,
    trialSepa: "SEPA direct debit",
    date: "Date",
    event: "Event",
    by: "By",
    invoiced: "invoiced",
    empty: "No change recorded.",
    close: "Close",
    frequencies: { monthly: "monthly", yearly: "yearly", quarterly: "quarterly", half_yearly: "half-yearly" },
  },
};
