import appStore from "./AppStore";

export type SDKConfig = {
    baseUrl: string;
    token?: string;
    timeout?: number;
};
let config: SDKConfig | null = null;

export const initSDK = (options: SDKConfig) => {
    config = options;
    appStore.getDeviceId();
    appStore.getPublicIp();
    appStore.getAppId();
    appStore.getDevicePayload();
};

export const getSDKConfig = (): SDKConfig => {
    if (!config) {
        throw new Error("SDK not initialized. Call initSDK() first.");
    }
    return config;
};

