/*package org.ntlab.acanthus_client.views.animation;

import androidx.lifecycle.ViewModel;

import org.ntlab.acanthus_client.Acanthus;
import org.ntlab.acanthus_client.entities.Stroke;

import retrofit2.Retrofit;

public class AnimationViewModel extends ViewModel {
    private Retrofit retrofit;
    private Acanthus acanthus;
    // getStrokes
    public void getAnimationStrokes() {
        Stroke stroke = retrofit.create(Stroke.class);
        stroke.getPositions();
        stroke.getPen();
        stroke.getColor();
        stroke.getThickness();

        //return stroke;
    }
}
*/
package org.ntlab.acanthus_client.views.animation;

import android.util.Log;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import org.ntlab.acanthus_client.Acanthus;
import org.ntlab.acanthus_client.entities.Stroke;
import org.ntlab.acanthus_client.resources.gallery.StrokesRest;
import org.ntlab.acanthus_client.views.paint.PaintModelContainer;

import java.util.ArrayList;
import java.util.Collection;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.jackson.JacksonConverterFactory;
import retrofit2.converter.scalars.ScalarsConverterFactory;

public class AnimationViewModel extends ViewModel {
    private Retrofit retrofit;
    private Acanthus acanthus;
    private PaintModelContainer paintModelContainer;
    private AnimationConnectionModel animationConnectionModel;
    private MutableLiveData<String> pages  = new MutableLiveData<>();;

    public void init(Acanthus acanthus) {

        animationConnectionModel = new AnimationConnectionModel(acanthus);
        animationConnectionModel.init(acanthus);
        animationConnectionModel.getPage(pages);
        //Log.d("image", "init: "+pages.getValue());
        //url.setValue(new String());

    }
    // StrokesRestをGETする。
    public LiveData<String> getAnimationPage() {
        return pages;
    }
}
