import ApiWebClient from './ApiWebClient'; import ApiNativeClient from './ApiNativeClient'; export interface ApiClient { post: (path: string, body: object) => Promise; put: (path: string, body: object) => Promise; get: (path: string) => Promise; delete: (path: string) => Promise; fileImageUrl: (path: string) => Promise; } export const apiClient: ApiClient = window.ReactNativeWebView ? new ApiNativeClient() : new ApiWebClient();