//
//  DoughnutChartItemModel.swift
//  MVMCoreUI
//
//  Created by Kevin Christiano on 4/7/20.
//  Copyright © 2020 Verizon Wireless. All rights reserved.
//

import Foundation


@objcMembers public class DoughnutChartItemModel: MoleculeModelProtocol {
    //--------------------------------------------------
    // MARK: - Properties
    //--------------------------------------------------
    
    public var backgroundColor: Color?
    public static var identifier: String = "doughnutChartItem"
    public var moleculeName: String = DoughnutChartItemModel.identifier
    public var label: LabelModel
    @Percent public var percent: CGFloat
    public var color: Color
    
    //--------------------------------------------------
    // MARK: - Keys
    //--------------------------------------------------
    
    private enum CodingKeys: String, CodingKey {
        case backgroundColor
        case label
        case percent
        case color
    }
    
    //--------------------------------------------------
    // MARK: - Initializer
    //--------------------------------------------------
    
    public init(percent: CGFloat, color: Color, label: LabelModel) {
        self.percent = percent
        self.color = color
        self.label = label
    }
}
