package com.paint.ar.drawing;

import android.content.res.AssetManager;
import android.graphics.Typeface;

import com.anythink.core.api.ATSDK;
import com.anythink.core.api.NetTrafficeCallback;
import com.paint.ar.drawing.ob.ObManager;
import com.paint.ar.drawing.topon.AdManager;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class MyApp extends android.app.Application {
    public static String Key_ViewDir = "pre_dir";
    public static String Key_ISMAIN = "ismain";
    public static String Key_Camera = "camera_data";

    public static String TAG = "------------Drawing------";


    public static MyApp app;

    private String APPId ="h679200e7bcbc3";

    private String AppKey ="a6ad05d72569e4c67d2458cc8e548a764";

    public static Typeface defaultFont;

    @Override
    public void onCreate() {
        super.onCreate();
        app = this;
        AssetManager assets = getAssets();
        defaultFont = Typeface.createFromAsset(assets, "myfont.ttf");
        initSDk();
        ObManager.init(this);

    }

    private void initSDk(){
        ATSDK.checkIsEuTraffic(this, new NetTrafficeCallback() {

            @Override
            public void onResultCallback(boolean isEU) {
                if (isEU && ATSDK.getGDPRDataLevel(MyApp.this) == ATSDK.UNKNOWN) {
                    ATSDK.showGdprAuth(MyApp.this);
                }

            }

            @Override
            public void onErrorCallback(String errorMsg) {

            }
        });
        ATSDK.init( this, APPId, AppKey);
        AdManager.loadAllAd();


    }





    public static String Class_Animals = "31_Animals";
    public static String Class_birds = "19_Birds";
    public static String Class_butterfly = "21_Butterfly";
    public static String Class_cafe = "38_Cafe";
    public static String Class_cartoons = "26_Cartoons";
    public static String Class_christmas = "25_Christmas";
    public static String Class_festivals = "22_Festivals";
    public static String Class_flowers = "23_Flowers";
    public static String Class_fruits = "39_Fruits";
    public static String Class_general = "15_General";

    public static String Class_mehndi = "12_Mehndi";
    public static String Class_nature = "23_Nature";
    public static String Class_properties = "19_Properties";
    public static String Class_rangoli = "25_Rangoli";
    public static String Class_sports = "28_Sports";
    public static String Class_vehicles = "32_Vehicles";

    public static List<String> getAllDir() {
        ArrayList<String> list = new ArrayList<>();
        list.add(Class_Animals);
        list.add(Class_birds);
        list.add(Class_butterfly);
        list.add(Class_cafe);
        list.add(Class_cartoons);
        list.add(Class_christmas);
        list.add(Class_festivals);
        list.add(Class_flowers);
        list.add(Class_fruits);
        list.add(Class_general);
        list.add(Class_mehndi);
        list.add(Class_nature);
        list.add(Class_properties);
        list.add(Class_rangoli);
        list.add(Class_sports);
        list.add(Class_vehicles);
        Collections.shuffle(list);
        return list;


    }
}
