package com.beem.project.beem.ui;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.Button;

import com.beem.project.beem.R;
import com.beem.project.beem.service.Contact;

public class ContactDialog extends Dialog {

   // final private CharSequence[] items = { "Chat", "Resend suscription", "Alias", "Change group", "Infos" };
    private Contact mContact;
    private Context mContext;

    public ContactDialog(final Context context, Contact c) {
	super(context);
	mContext = context;
	setContentView(R.layout.contactdialog);
	mContact = c;
	setTitle(c.getJID());
		
	Button chat = (Button) findViewById(R.id.CDChat);
	chat.setOnClickListener(new View.OnClickListener() {

	    @Override
	    public void onClick(View v) {
		Activity a = ContactDialog.this.getOwnerActivity();
		Intent i = new Intent(mContext, SendIM.class);
		i.putExtra("contact", mContact);
		a.startActivity(i);
		dismiss();
	    }
	    
	});
    }
}
