//
//  TagCollectionViewCell.swift
//  MVMCoreUI
//
//  Created by Dhamodaram Nandi on 27/05/20.
//  Copyright © 2020 Verizon Wireless. All rights reserved.
//

import Foundation

open class TagCollectionViewCell: CollectionViewCell {
    public let tagLabel = Tag()
    
    open override func reset() {
        super.reset()
        backgroundColor = .clear
    }
    
    open override func setupView() {
        super.setupView()
        addMolecule(tagLabel)
        MVMCoreUIUtility.setMarginsFor(contentView, leading: 0, top: 0, trailing: 0, bottom: 0)
    }
    
    open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
        guard let model = model as? TagModel else { return }
        tagLabel.set(with: model, delegateObject, additionalData)
    }
}
