<?xml version="1.0" encoding="utf-8"?>
<tooltip:AdvancedToolTip  xmlns:fx="http://ns.adobe.com/mxml/2009" 
                     xmlns:s="library://ns.adobe.com/flex/spark" 
                     xmlns:mx="library://ns.adobe.com/flex/mx"
                     xmlns:tooltip="com.afi.estimator.views.tooltip.*">
    
    <s:Group id="ttBody">
        
        <s:Rect width="100%" height="100%">
            <s:filters>
                <s:DropShadowFilter alpha=".3" color="0" distance="0" blurX="15" blurY="15" />
            </s:filters>
            <s:fill>
                <s:LinearGradient rotation="90">
                    <s:entries>
                        <s:GradientEntry color="#305B86"/>
                        <s:GradientEntry color="#4A76B7"/>
                    </s:entries>
                </s:LinearGradient>
            </s:fill>
        </s:Rect>
        
        
        <s:Rect width="100%" height="100%">
            <s:stroke>
                <s:SolidColorStroke weight="1" color="#FFFFFF"/>
            </s:stroke>
        </s:Rect>
        
        <s:VGroup paddingTop="8"
                  paddingBottom="8"
                  paddingLeft="12"
                  paddingRight="12">
            
            <s:Label text="{label}" lineHeight="14" color="#EBFCFF" maxWidth="250" maxDisplayedLines="10"/>
        </s:VGroup>
        
    </s:Group>
    
    <s:Group id="arrowLeft"
             x="{ttBody.width}"
             y="{(ttBody.height/2) - (arrowLeft.height/2)}"
             visible="{xAlignment == X_ALIGN_LEFT}">
        
        <s:Path data="M -1 0 L 6 8 L -1 16 Z">
            
            <s:fill>
                <s:LinearGradient rotation="90">
                    <s:entries>
                        <s:GradientEntry color="#305B86"/>
                        <s:GradientEntry color="#4A76B7"/>
                    </s:entries>
                </s:LinearGradient>
            </s:fill>
        </s:Path>
        
        <s:Line xFrom="-1" xTo="6" yFrom="0" yTo="8">
            <s:stroke>
                <s:SolidColorStroke color="0xFFFFFF" weight="1" />
            </s:stroke>
        </s:Line>
        
        <s:Line xFrom="6" xTo="-1" yFrom="8" yTo="16">
            <s:stroke>
                <s:SolidColorStroke color="0xFFFFFF" weight="1" />
            </s:stroke>
        </s:Line>
    </s:Group>
    
    <s:Group id="arrowRight"
             x="0" y="{(ttBody.height/2) - (arrowRight.height/2)}"
             visible="{xAlignment == X_ALIGN_RIGHT}">
        
        <s:Path data="M 1 0 L -6 8 L 1 16 Z">
            
            <s:fill>
                <s:LinearGradient rotation="90">
                    <s:entries>
                        <s:GradientEntry color="#305B86"/>
                        <s:GradientEntry color="#4A76B7"/>
                    </s:entries>
                </s:LinearGradient>
            </s:fill>
        </s:Path>
        
        <s:Line xFrom="1" xTo="-6" yFrom="0" yTo="8">
            <s:stroke>
                <s:SolidColorStroke color="0xFFFFFF" weight="1" />
            </s:stroke>
        </s:Line>
        
        <s:Line xFrom="-6" xTo="1" yFrom="8" yTo="16">
            <s:stroke>
                <s:SolidColorStroke color="0xFFFFFF" weight="1" />
            </s:stroke>
        </s:Line>
    </s:Group>
    
</tooltip:AdvancedToolTip>