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;

public class AddressEditorActivity extends AppCompatActivity {


    static String URL_TYPE = "url_type";
    static String REQUEST_URL = "request_url";
    static String IS_SUBACTION = "is_subaction";
    static String SUBACTION_TAG = "subaction_tag";
    static String GROUP = "group";
    static String CHILD = "child";
    static String RETURN_VALUE = "return_value";

    public static class Builder {

        public Intent build(Context ctx,int url_type,String request_url,String is_subaction,String subaction_tag,int group,int child) {
            if (ctx == null) {
                return null;
            }
            Intent intent = new Intent(ctx,AddressEditorActivity.class);

            intent.putExtra(URL_TYPE ,url_type);

            if (request_url != null) {
                intent.putExtra(REQUEST_URL,request_url);
            }
            if (is_subaction != null) {
                intent.putExtra(IS_SUBACTION,is_subaction);
            }
            if (subaction_tag != null) {
                intent.putExtra(SUBACTION_TAG,subaction_tag);
            }
            intent.putExtra(GROUP,group);
            intent.putExtra(CHILD,child);

            return intent;
        }
    }

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