/**
 * Tones API client
 * @since 1.2.0
 */

import { apiClient } from './client'

export interface Tone {
  id: number
  name: string
  slug: string
  emoji: string | null
  description: string | null
  system_prompt: string | null
  is_system: number
  is_active: number
  language?: string
}

export interface TonesListResponse {
  success: boolean
  data: {
    tones: Tone[]
  }
}

export const tonesApi = {
  /**
   * List all tones, optionally filtered by language.
   */
  async list(language?: string): Promise<TonesListResponse> {
    return apiClient.get('tones', { language })
  },
}
