"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from abc import abstractmethod

from friendli.friendli_container_chat import (
    AsyncFriendliContainerChat,
    SyncFriendliContainerChat,
)
from friendli.friendli_container_completions import (
    AsyncFriendliContainerCompletions,
    SyncFriendliContainerCompletions,
)
from friendli.friendli_container_token import (
    AsyncFriendliContainerToken,
    SyncFriendliContainerToken,
)

from .basesdk import AsyncSDK, BaseSDK, SyncSDK
from .sdkconfiguration import SDKConfiguration


class BaseContainer(BaseSDK):
    def __init__(self, sdk_config: SDKConfiguration) -> None:
        BaseSDK.__init__(self, sdk_config)
        self.sdk_configuration = sdk_config
        self._init_sdks()

    @abstractmethod
    def _init_sdks(self):
        pass


class SyncContainer(BaseContainer, SyncSDK):
    chat: SyncFriendliContainerChat
    completions: SyncFriendliContainerCompletions
    token: SyncFriendliContainerToken

    def _init_sdks(self):
        self.chat = SyncFriendliContainerChat(self.sdk_configuration)
        self.completions = SyncFriendliContainerCompletions(self.sdk_configuration)
        self.token = SyncFriendliContainerToken(self.sdk_configuration)


class AsyncContainer(BaseContainer, AsyncSDK):
    chat: AsyncFriendliContainerChat
    completions: AsyncFriendliContainerCompletions
    token: AsyncFriendliContainerToken

    def _init_sdks(self):
        self.chat = AsyncFriendliContainerChat(self.sdk_configuration)
        self.completions = AsyncFriendliContainerCompletions(self.sdk_configuration)
        self.token = AsyncFriendliContainerToken(self.sdk_configuration)
