"""Conversation module for Enterprise Brain.

Provides conversation database access and API endpoints.
"""

from backend.chanakya.conversation.database import (
    create_conversation,
    get_conversations,
    get_conversation,
    update_conversation_title,
    delete_conversation,
    save_message,
    get_messages,
    toggle_bookmark,
    get_user_bookmarks,
)
from backend.chanakya.conversation.router import (
    create_conversation_handler,
    get_conversations_handler,
    get_conversation_handler,
    update_conversation_title_handler,
    delete_conversation_handler,
    save_message_handler,
    get_messages_handler,
    toggle_bookmark_handler,
    get_user_bookmarks_handler,
)
from backend.chanakya.conversation._history import (
    load_conversation_history,
    append_to_history_cache,
    serialize_history,
    deserialize_history,
)

__all__ = [
    # Database functions
    "create_conversation",
    "get_conversations",
    "get_conversation",
    "update_conversation_title",
    "delete_conversation",
    "save_message",
    "get_messages",
    "toggle_bookmark",
    "get_user_bookmarks",
    # Route handlers
    "create_conversation_handler",
    "get_conversations_handler",
    "get_conversation_handler",
    "update_conversation_title_handler",
    "delete_conversation_handler",
    "save_message_handler",
    "get_messages_handler",
    "toggle_bookmark_handler",
    "get_user_bookmarks_handler",
    # History adapter
    "load_conversation_history",
    "append_to_history_cache",
    "serialize_history",
    "deserialize_history",
]
