# 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.auth_mode_response import AuthModeResponse
from .raw_client import AsyncRawConfigClient, RawConfigClient


class ConfigClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawConfigClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawConfigClient
        """
        return self._raw_client

    def get_auth_mode(self, *, request_options: typing.Optional[RequestOptions] = None) -> AuthModeResponse:
        """
        Get the authentication mode and dev login status.
        This endpoint is public and does not require authentication.

        In local environment, includes prefill credentials for convenience.

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

        Returns
        -------
        AuthModeResponse
            Successful Response

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

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


class AsyncConfigClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawConfigClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawConfigClient
        """
        return self._raw_client

    async def get_auth_mode(self, *, request_options: typing.Optional[RequestOptions] = None) -> AuthModeResponse:
        """
        Get the authentication mode and dev login status.
        This endpoint is public and does not require authentication.

        In local environment, includes prefill credentials for convenience.

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

        Returns
        -------
        AuthModeResponse
            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.config.get_auth_mode()


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