 
         view.layoutIfNeeded()
         refreshContentViewSize()
-        _ = centerContentView(margin: -PXLayout.getStatusBarHeight())
+//        _ = centerContentView(margin: -PXLayout.getStatusBarHeight())
     }
 }
 

    func render() {
        guard let model = model else {return}
        self.removeAllSubviews()
        self.layer.borderWidth = 2


        PXLayout.setHeight(owner: self, height: PXLayout.getScreenHeight(applyingMarginFactor: 40)).isActive = true

        for dat in model.data {
            let margin: CGFloat = dat.isTotal ? PXLayout.S_MARGIN : PXLayout.XXS_MARGIN

typealias OneTapSummaryData = (title: String, value: String, highlightedColor: UIColor, isTotal: Bool)

class PXOneTapHeaderViewModel {
    let icon: UIImage
    let title: String
    let data: [OneTapSummaryData]

    init(icon: UIImage, title: String, data: [OneTapSummaryData]) {
        self.icon = icon
        self.title = title
        self.data = data
    }
}

class PXOneTapHeaderMerchantView: PXComponentView {
    let image: UIImage
    let title: String
    let showHorizontally: Bool

    init(image: UIImage, title: String, showHorizontally: Bool = false) {
        self.image = image
        self.title = title
        self.showHorizontally = showHorizontally
        super.init()
        render()
    }

    required public init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    private func render() {
        let imageView = PXUIImageView()
        imageView.translatesAutoresizingMaskIntoConstraints = false
        imageView.enableFadeIn()
        imageView.image = image
        self.addSubview(imageView)
        PXLayout.setHeight(owner: imageView, height: 20).isActive = true
        PXLayout.setWidth(owner: imageView, width: 20).isActive = true

        let titleLabel = UILabel()
        titleLabel.translatesAutoresizingMaskIntoConstraints = false
        titleLabel.text = title
        titleLabel.font = Utils.getSemiBoldFont(size: PXLayout.M_FONT)
        titleLabel.textAlignment = .center
        self.addSubview(titleLabel)

        if showHorizontally {
            PXLayout.put(view: imageView, leftOf: titleLabel, withMargin: PXLayout.L_MARGIN, relation: .equal).isActive = true
        } else {
            PXLayout.centerHorizontally(view: imageView).isActive = true
            PXLayout.pinTop(view: imageView, withMargin: PXLayout.XXS_MARGIN).isActive = true
            PXLayout.centerHorizontally(view: titleLabel).isActive = true
            PXLayout.put(view: titleLabel, onBottomOf: imageView, withMargin: PXLayout.XXS_MARGIN).isActive = true
            PXLayout.pinBottom(view: titleLabel, withMargin: PXLayout.XXS_MARGIN).isActive = true
        }
    }
}

