//
//  StackItemModel.swift
//  MVMCoreUI
//
//  Created by Scott Pfeil on 1/16/20.
//  Copyright © 2020 Verizon Wireless. All rights reserved.
//


@objcMembers public class StackItemModel: ContainerModel, StackItemModelProtocol, MoleculeModelProtocol {
    //--------------------------------------------------
    // MARK: - Properties
    //--------------------------------------------------
    
    public static var identifier: String = "simpleStackItem"
    public var moleculeName: String = StackItemModel.identifier
    public var backgroundColor: Color?
    public var spacing: CGFloat?
    public var percent: Int?
    public var gone: Bool = false
    
    //--------------------------------------------------
    // MARK: - Initializer
    //--------------------------------------------------
    
    public init(spacing: CGFloat? = nil, percent: Int? = nil, horizontalAlignment: UIStackView.Alignment? = nil, verticalAlignment: UIStackView.Alignment? = nil, gone: Bool? = nil) {
        self.spacing = spacing
        self.percent = percent
        
        if let gone = gone {
            self.gone = gone
        }
        super.init(horizontalAlignment: horizontalAlignment, verticalAlignment: verticalAlignment)
    }
    
    required public init(from decoder: Decoder) throws {
        fatalError("init(from:) has not been implemented")
    }
}
