2025-11-28 13:19:15 -06:00
|
|
|
import { ClientAPI } from "./client";
|
|
|
|
|
import { ServerAPI } from "./server";
|
|
|
|
|
|
|
|
|
|
let dynamicAPI: AbstractAPI;
|
|
|
|
|
|
|
|
|
|
if (typeof window === "undefined") {
|
|
|
|
|
dynamicAPI = new ServerAPI();
|
|
|
|
|
} else {
|
|
|
|
|
dynamicAPI = new ClientAPI();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const api = dynamicAPI;
|