//--------------------------------------
//               PowerUI
//
//        For documentation or 
//    if you have any issues, visit
//        powerUI.kulestar.com
//
//    Copyright  2013 Kulestar Ltd
//          www.kulestar.com
//--------------------------------------

using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;


namespace Css.Units{
	
	/// <summary>
	/// Represents an instance of an textual value.
	/// </summary>
	
	public class PropertyMapUnit:SelectorBlockUnit{
		
		public Dictionary<string,Css.Value> Properties=new Dictionary<string,Css.Value>();
		
		protected override int OnReadProperty(Style style,string pName,Css.Value value){
			
			// Push in:
			Properties[pName]=value;
			
			// Ok - don't store the property in the style.
			return 1;
		}
		
		protected override Value Clone(){
			PropertyMapUnit result=new PropertyMapUnit();
			result.Style=Style;
			result.Properties=Properties;
			return result;
		}
		
		/// <summary>Override pre-text such that property map unit doesn't always end up being used.</summary>
		public override string[] PreText{
			get{
				return null;
			}
		}
		
	}
	
}



