"""
Fluent accessor classes for Questionnaire resources.

Auto-generated from OpenAPI specification.
"""

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ..client import AsyncCredoAI, CredoAI


# =============================================================================
# Questionnaire Fluent Accessors (Sync)
# =============================================================================


class QuestionnaireDuplicateAccessor:
    """Access duplicate for a specific questionnaire.

    This accessor provides methods to create
    the duplicate associated with a questionnaire.

    Example:
    """

    def __init__(self, client: "CredoAI", questionnaire_id: str):
        """Initialize the duplicate accessor.

        Args:
            client: The CredoAI client instance
            questionnaire_id: The ID of the parent questionnaire
        """
        self._client = client
        self._questionnaire_id = questionnaire_id


class Questionnaire:
    """Fluent accessor for a specific questionnaire.

    Provides access to related resources through property accessors that enable
    intuitive chaining.

    Example:
        >>> questionnaire = client.questionnaire("questionnaire-id")
        >>> questionnaire.duplicate.get()
    """

    def __init__(self, client: "CredoAI", questionnaire_id: str):
        """Initialize the questionnaire accessor.

        Args:
            client: The CredoAI client instance
            questionnaire_id: The ID of the questionnaire
        """
        self._client = client
        self._questionnaire_id = questionnaire_id

    @property
    def duplicate(self) -> "QuestionnaireDuplicateAccessor":
        """Access duplicate associated with this questionnaire.

        Returns:
            QuestionnaireDuplicateAccessor: Accessor for duplicate operations
        """
        return QuestionnaireDuplicateAccessor(self._client, self._questionnaire_id)


# =============================================================================
# Questionnaire Fluent Accessors (Async)
# =============================================================================


class AsyncQuestionnaireDuplicateAccessor:
    """Async access duplicate for a specific questionnaire.

    This accessor provides async methods to create
    the duplicate associated with a questionnaire.

    Example:
    """

    def __init__(self, client: "AsyncCredoAI", questionnaire_id: str):
        """Initialize the async duplicate accessor.

        Args:
            client: The AsyncCredoAI client instance
            questionnaire_id: The ID of the parent questionnaire
        """
        self._client = client
        self._questionnaire_id = questionnaire_id


class AsyncQuestionnaire:
    """Async fluent accessor for a specific questionnaire.

    Provides access to related resources through property accessors that enable
    intuitive chaining with async/await.

    Example:
        >>> questionnaire = client.questionnaire("questionnaire-id")
        >>> await questionnaire.duplicate.get()
    """

    def __init__(self, client: "AsyncCredoAI", questionnaire_id: str):
        """Initialize the async questionnaire accessor.

        Args:
            client: The AsyncCredoAI client instance
            questionnaire_id: The ID of the questionnaire
        """
        self._client = client
        self._questionnaire_id = questionnaire_id

    @property
    def duplicate(self) -> "AsyncQuestionnaireDuplicateAccessor":
        """Access duplicate associated with this questionnaire.

        Returns:
            AsyncQuestionnaireDuplicateAccessor: Async accessor for duplicate operations
        """
        return AsyncQuestionnaireDuplicateAccessor(self._client, self._questionnaire_id)


# =============================================================================
# Export list
# =============================================================================

__all__ = [
    "Questionnaire",
    "AsyncQuestionnaire",
    "QuestionnaireDuplicateAccessor",
    "AsyncQuestionnaireDuplicateAccessor",
]
