package com.rjconsultores.ventaboletos.enums;

import java.util.Arrays;
import java.util.List;

import org.zkoss.util.resource.Labels;

public enum EnumClasseServicoConfortoMonitrip {
	
	CAMA(1, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.cama")),
	LEITO(2, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.leito")),
	SEMILEITO(3, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.semileito")),
	EXECUTIVA(4, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.executiva")),
	BASICA(5, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.basica"));

	
	private Integer codigo;
	private String descricao;
	
	private EnumClasseServicoConfortoMonitrip(Integer codigo, String descricao) {
		this.codigo = codigo;
		this.descricao = descricao;
	}

	public Integer getCodigo() {
		return codigo;
	}

	public String getDescricao() {
		return descricao;
	}

	@Override
	public String toString() {
		return getDescricao();
	}
	
	public static List<EnumClasseServicoConfortoMonitrip> getList() {
		return Arrays.asList(EnumClasseServicoConfortoMonitrip.values());
	}
	
	public static EnumClasseServicoConfortoMonitrip getTipo(Integer codigo) {
		
		for (EnumClasseServicoConfortoMonitrip tipoClasseServicoBPe : EnumClasseServicoConfortoMonitrip.values()) {
			if(tipoClasseServicoBPe.getCodigo().equals(codigo)) {
				return tipoClasseServicoBPe;
			}
		}
		return null;
	}
	
}
