/* Copyright 2009 Palm, Inc.  All rights reserved. */

var FolderFlags = Class.create( {
	initialize: function() {
		
	}	
});


// is the folder marked as a favorite
FolderFlags.favoriteBit = 1<<0;
// is the folder marked as not selectable (like the [Gmail] folder)
FolderFlags.noselectBit = 1<<8;


FolderFlags.isNotSelectable = function(flags) {
	return ((flags & FolderFlags.noselectBit) !== 0);
}

FolderFlags.getFavoriteStatus = function(flags) {
	if ((flags & FolderFlags.favoriteBit) !== 0) {
		return "starred";
	} else {
		return "";
	}
}

//This is the look up function to check the domain is known domain or unknown. If it's unknown then it returns
//'generic' so that the generic icon would display on the header.
FolderFlags.getFolderHeaderIcon = function(domainName) {
	
	if(FolderFlags.knownDomain.indexOf(domainName) === -1)
		return 'default';
	else	
		return domainName;
}

FolderFlags.knownDomain = ['eas','yahoo','gmail','aol'];

