 //  Copyright © 2017 com.pluto-y. All rights reserved.
 //
 
-public protocol LabelStyle: Displayable, Textful{
-    
-    var position: Position? { get set }
+public final class Label: Displayable, Formatted, Shadowable, Textful, Borderable {
+    public var show: Bool?
+    public var precision: UInt8?
+    public var formatter: Formatter?
+    public var margin: Float?
+    public var textStyle: TextStyle?
+    public var padding: Padding?
+    public var backgroundColor: Color?
+    public var borderColor: Color?
+    public var borderWidth: Float?
+    public var shadowBlur: Float?
+    public var shadowColor: Color?
+    public var shadowOffsetX: Float?
+    public var shadowOffsetY: Float?
 }
 
-public final class CommonLabelStyle: LabelStyle {
-    
-    public var show: Bool?
-    public var position: Position?
-    public var textStyle: TextStyle?
-    
-    public init() { }
-    
-}
-
-extension CommonLabelStyle: Enumable {
+extension Label: Enumable {
     public enum Enums {
-        case show(Bool), position(Position), textStyle(TextStyle)
+        case show(Bool), precision(UInt8), formatter(Formatter), margin(Float), textStyle(TextStyle), padding(Padding), backgroundColor(Color), borderColor(Color), borderWidth(Float), shadowBlur(Float), shadowColor(Color), shadowOffsetX(Float), shadowOffsetY(Float)
     }
     
     public typealias ContentEnum = Enums


extension Label: Mappable {
    public func mapping(map: Mapper) {
        map["normal"] = normal
        map["emphasis"] = emphasis
    }
}

public final class FormattedLabelStyle: LabelStyle, Formatted {

            switch ele {
            case let .show(show):
                self.show = show
            case let .precision(precision):
                self.precision = precision
            case let .formatter(formatter):
                self.formatter = formatter
            case let .margin(margin):
                self.margin = margin
            case let .textStyle(textStyle):
                self.textStyle = textStyle
            case let .padding(padding):
                self.padding = padding
            case let .backgroundColor(backgroundColor):
                self.backgroundColor = backgroundColor
            case let .borderColor(borderColor):
                self.borderColor = borderColor
            case let .borderWidth(borderWidth):
                self.borderWidth = borderWidth
            case let .shadowBlur(shadowBlur):
                self.shadowBlur = shadowBlur
            case let .shadowColor(shadowColor):
                self.shadowColor = shadowColor
            case let .shadowOffsetX(shadowOffsetX):
                self.shadowOffsetX = shadowOffsetX
            case let .shadowOffsetY(shadowOffsetY):
                self.shadowOffsetY = shadowOffsetY
            }
        }
    }
