# Generated by smithplates HTTP codegen. Do not edit.

from __future__ import annotations

from dataclasses import dataclass

import httpx2
from generated.example.widget_api.clients.widgets_client import WidgetsApiClient


@dataclass(frozen=True)
class ApiClients:
    widgets_client: WidgetsApiClient


def create_api_clients(
    client: httpx2.AsyncClient,
    *,
    base_url: str,
) -> ApiClients:
    normalized_base_url = base_url.rstrip("/")
    return ApiClients(
        widgets_client=WidgetsApiClient(
            client,
            normalized_base_url,
        ),
    )
