/**
 * Personalities API client
 * @since 1.2.0
 */

import { apiClient } from './client'

export interface Personality {
    id: number
    name: string
    slug: string
    description: string | null
    system_prompt: string
    tone: string
    proactive_engagement: number
    proactive_delay_seconds?: number
    custom_instructions?: string
    is_default: number
    is_system: number
}

export interface PersonalitiesListResponse {
    success: boolean
    data: {
        personalities: Personality[]
    }
}

export const personalitiesApi = {
    /**
     * Get all personalities (optionally filtered by language)
     */
    async getPersonalities(language?: string): Promise<PersonalitiesListResponse> {
        return apiClient.get<PersonalitiesListResponse>('personalities', { language })
    },
}
