package macampcorp.macamp.utils;

import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;

import macampcorp.macamp.activities.viewers.ImageViewerActivity;
import macampcorp.macamp.activities.viewers.MediaViewerAcitvity;
import macampcorp.macamp.game.Game;
import macampcorp.macamp.game.Resource;

/**
 * Created by ptitcois on 14/03/17.
 */
public class AndroidResources {



    public static Drawable getImage()
    {
        return null;
    }

    public static int getViewerRequestCode( Resource re)
    {
        if(re.isAudio() || re.isVideo())
            return MediaViewerAcitvity.REQUEST_CODE;
        else
            return ImageViewerActivity.REQUEST_CODE;
    }
    public static Intent getViewerIntent(Context c, Resource re)
    {
        Intent intent =null ;
        if(re.isAudio() || re.isVideo())
            intent = new Intent(c, MediaViewerAcitvity.class);
        else if(re.isImage())
            intent= new Intent(c, ImageViewerActivity.class);

        intent.putExtra("resource", re);

        return intent;
    }



    public static Intent getMapIntent(Context c, Game g)
    {
        Intent intent = new Intent(c, ImageViewerActivity.class);
        intent.putExtra("map", g.getName()+"_map");
        return intent;
    }
    //ImageViewerActivity.class
}
