
#ifndef TN_MAP_ARROW_PARAMS_H
#define TN_MAP_ARROW_PARAMS_H

#include <string>
#include <vector>
#include "foundation/SharedPtr.h"

#include "TnMapStyleParams.h"

class TnMapArrowParams : public TnMapStyleParams
{
public:
    
    friend class TnMapStyleParamsFactory;
    
    void SetLengthBackward(double lengthBackward);
    double LengthBackward() const;    
    void SetLengthForward(double lengthForward);
    double LengthForward() const;
    
    TnMapArrowParams &          SetOuterColor(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha = 0);
    uint8_t                     GetOuterColorRed()   const;
    uint8_t                     GetOuterColorGreen() const;
    uint8_t                     GetOuterColorBlue()  const;
    uint8_t                     GetOuterColorAlpha() const;
    
    TnMapArrowParams &          SetInnerColor(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha = 0);
    uint8_t                     GetInnerColorRed()   const;
    uint8_t                     GetInnerColorGreen() const;
    uint8_t                     GetInnerColorBlue()  const;
    uint8_t                     GetInnerColorAlpha() const;
        
    bool DetachedHead() const;
    void SetStretchRight(bool stretchRight);
    bool StretchRight() const;
    std::vector<double> const & OuterWidths() const;
    std::vector<double> const & InnerWidths() const;
    
    enum eArrowTurnType
    {
        eArrowTurnType_Unspecified,
        eArrowTurnType_Straight,
        eArrowTurnType_LeftTurn,
        eArrowTurnType_RightTurn,
        eArrowTurnType_UTurn,
    };
    
    void SetTurnType(eArrowTurnType arrowTurnType);
    eArrowTurnType GetTurnType() const;
    
private:
    
    TnMapArrowParams(Tn::Foundation::shared_ptr<TnMapConf> const & conf, 
                     std::string const & path);

    uint8_t outer_color_r, outer_color_g, outer_color_b, outer_color_a;
    uint8_t inner_color_r, inner_color_g, inner_color_b, inner_color_a;

    double length_backward;
    double length_forward;
    bool detached_head;
    bool stretch_right;
    std::vector<double> outerWidths;
    std::vector<double> innerWidths;
    
    eArrowTurnType m_turnType;
};

#endif //TN_MAP_ARROW_PARAMS
