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

from __future__ import annotations

import typing

from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .raw_client import AsyncRawAuthClient, RawAuthClient

if typing.TYPE_CHECKING:
    from .resources.default.client import AsyncDefaultClient, DefaultClient


class AuthClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawAuthClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._default: typing.Optional[DefaultClient] = None

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

        Returns
        -------
        RawAuthClient
        """
        return self._raw_client

    @property
    def default(self):
        if self._default is None:
            from .resources.default.client import DefaultClient  # noqa: E402

            self._default = DefaultClient(client_wrapper=self._client_wrapper)
        return self._default


class AsyncAuthClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawAuthClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._default: typing.Optional[AsyncDefaultClient] = None

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

        Returns
        -------
        AsyncRawAuthClient
        """
        return self._raw_client

    @property
    def default(self):
        if self._default is None:
            from .resources.default.client import AsyncDefaultClient  # noqa: E402

            self._default = AsyncDefaultClient(client_wrapper=self._client_wrapper)
        return self._default
