from __future__ import annotations

from typing import Any, Dict, TYPE_CHECKING

if TYPE_CHECKING:
    from socialrails.client import SocialRails, AsyncSocialRails


class WorkspaceResource:
    """Synchronous resource for workspace information."""

    def __init__(self, client: SocialRails) -> None:
        self._client = client

    def get(self) -> Dict[str, Any]:
        """Get workspace information including plan and usage.

        Returns:
            Dict with id, name, created_at, plan, limits, and usage.
        """
        return self._client._get("/workspace")


class AsyncWorkspaceResource:
    """Asynchronous resource for workspace information."""

    def __init__(self, client: AsyncSocialRails) -> None:
        self._client = client

    async def get(self) -> Dict[str, Any]:
        """Get workspace information including plan and usage.

        Returns:
            Dict with id, name, created_at, plan, limits, and usage.
        """
        return await self._client._get("/workspace")
