//
//  HeadersH1NoButtonsBodyText.swift
//  MVMCoreUI
//
//  Created by Subhankar Acharya on 13/07/20.
//  Copyright © 2020 Verizon Wireless. All rights reserved.
//

import Foundation

@objcMembers open class HeadersH1NoButtonsBodyText: HeaderView {
    //--------------------------------------------------
    // MARK: - Outlets
    //--------------------------------------------------
    
    public let headlineBody = HeadlineBody()
    
    //-------------------------------------------------------
    // MARK: - View Lifecycle
    //-------------------------------------------------------
    open override func setupView() {
        super.setupView()
        headlineBody.styleLandingPageHeader()
        addMolecule(headlineBody)
    }
    
    //----------------------------------------------------
    // MARK: - Molecule
    //------------------------------------------------------
    
    open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
        super.set(with: model, delegateObject, additionalData)
        guard let model = model as? HeadersH1NoButtonsBodyTextModel else { return }
        headlineBody.set(with: model.headlineBody, delegateObject, additionalData)
    }
    
    open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { 121 }
    
    open override func reset() {
        super.reset()
        headlineBody.styleLandingPageHeader()
    }
}
