package com.usai.redant.CommonEditor;

import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.usai.redant.redantmobile.R;

import org.json.JSONObject;

import java.io.Serializable;

public class ContactListActivity extends AppCompatActivity {


    static String IS_SUBACTION = "is_subaction";
    static String SUBACTION_TAG = "subaction_tag";
    static String GROUP = "group";
    static String CHILD = "child";
    static String CONTACT_TYPE = "contact_type";
    static String SHOW_NAV_BAR = "show_navigation_bar";
    static String RETURN_VALUE = "return_value";


    public static class Builder {

        public Intent build(Context ctx, String is_subaction, String subaction_tag,String contact_type,boolean show_nav_bar,int group, int child) {
            if (ctx == null) {
                return null;
            }

            Intent intent = new Intent(ctx,CreditCardEditorActivity.class);

            if (is_subaction != null) {
                intent.putExtra(IS_SUBACTION,is_subaction);
            }
            if (subaction_tag != null) {
                intent.putExtra(SUBACTION_TAG,subaction_tag);
            }
            if (contact_type != null) {
                intent.putExtra(CONTACT_TYPE,contact_type);
            }

            intent.putExtra(SHOW_NAV_BAR,show_nav_bar);
            intent.putExtra(GROUP,group);
            intent.putExtra(CHILD,child);


            return intent;
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_contact_list);
    }
}
