let sdkToken: string | null = null;
let castApplicationId: string | null = null;

/**
 * Initializes the Spalla SDK. Must be called once before rendering a player.
 * Mirrors the legacy native `initialize(token, applicationId)` signature.
 */
export function initialize(
  token: String,
  applicationId: String | null = null
): void {
  sdkToken = token ? String(token) : null;
  castApplicationId = applicationId ? String(applicationId) : null;
}

export function getSdkToken(): string | null {
  return sdkToken;
}

export function getCastApplicationId(): string | null {
  return castApplicationId;
}
