package com.rjconsultores.ventaboletos.web.utilerias.render;

import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

import com.rjconsultores.ventaboletos.web.gui.controladores.catalogos.ViewTestEmailController.EmailConfigurationTestVO;

public class RenderTestEmail implements ListitemRenderer {

	@Override
	public void render(Listitem lstm, Object o) throws Exception {
		EmailConfigurationTestVO testVO = (EmailConfigurationTestVO) o;

		Listcell lc = new Listcell();
		if (testVO.getCodStatus().equals("EA")) {
			lc.setImage("/gui/img/play_icon.png");
		} else if (testVO.getCodStatus().equals("C")) {
			lc.setImage("/gui/img/check_icon.png");
		} else if (testVO.getCodStatus().equals("F")) {
			lc.setImage("/gui/img/close_icon.png");
		}
		
		lc.setParent(lstm);

		lc = new Listcell(testVO.getTarefa());
		lc.setParent(lstm);
		
		lc = new Listcell(testVO.getStatus());
		lc.setParent(lstm);

		lstm.setAttribute("data", testVO);

	}

}
