# This file was auto-generated by Fern from our API Definition.

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.avatar_list_response import AvatarListResponse
from ..types.avatar_response import AvatarResponse
from .raw_client import AsyncRawAvatarsClient, RawAvatarsClient


class AvatarsClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawAvatarsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawAvatarsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAvatarsClient
        """
        return self._raw_client

    def list_avatars(self, *, request_options: typing.Optional[RequestOptions] = None) -> AvatarListResponse:
        """
        List all available avatars for assistant image selection.

        Returns all active avatars that can be used for assistant profiles.

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AvatarListResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.avatars.list_avatars()
        """
        _response = self._raw_client.list_avatars(request_options=request_options)
        return _response.data

    def get_avatar(self, avatar_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> AvatarResponse:
        """
        Get a specific avatar by ID.

        Returns avatar details including name, description, and image URL.

        Parameters
        ----------
        avatar_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AvatarResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.avatars.get_avatar(
            avatar_id="avatar_id",
        )
        """
        _response = self._raw_client.get_avatar(avatar_id, request_options=request_options)
        return _response.data


class AsyncAvatarsClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawAvatarsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawAvatarsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAvatarsClient
        """
        return self._raw_client

    async def list_avatars(self, *, request_options: typing.Optional[RequestOptions] = None) -> AvatarListResponse:
        """
        List all available avatars for assistant image selection.

        Returns all active avatars that can be used for assistant profiles.

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AvatarListResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.avatars.list_avatars()


        asyncio.run(main())
        """
        _response = await self._raw_client.list_avatars(request_options=request_options)
        return _response.data

    async def get_avatar(
        self, avatar_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> AvatarResponse:
        """
        Get a specific avatar by ID.

        Returns avatar details including name, description, and image URL.

        Parameters
        ----------
        avatar_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AvatarResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.avatars.get_avatar(
                avatar_id="avatar_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_avatar(avatar_id, request_options=request_options)
        return _response.data
