# 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 AsyncRawCashDrawersClient, RawCashDrawersClient

if typing.TYPE_CHECKING:
    from .shifts.client import AsyncShiftsClient, ShiftsClient


class CashDrawersClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawCashDrawersClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._shifts: typing.Optional[ShiftsClient] = None

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

        Returns
        -------
        RawCashDrawersClient
        """
        return self._raw_client

    @property
    def shifts(self):
        if self._shifts is None:
            from .shifts.client import ShiftsClient  # noqa: E402

            self._shifts = ShiftsClient(client_wrapper=self._client_wrapper)
        return self._shifts


class AsyncCashDrawersClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawCashDrawersClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._shifts: typing.Optional[AsyncShiftsClient] = None

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

        Returns
        -------
        AsyncRawCashDrawersClient
        """
        return self._raw_client

    @property
    def shifts(self):
        if self._shifts is None:
            from .shifts.client import AsyncShiftsClient  # noqa: E402

            self._shifts = AsyncShiftsClient(client_wrapper=self._client_wrapper)
        return self._shifts
