//
// © 2018-2020 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
//

import UIKit

class BottomSheetViewControllerItemView: UIView {

    @IBOutlet public weak var contentView: UIView!
    @IBOutlet public weak var imageView: UIImageView!
    @IBOutlet public weak var imageViewLeftConstraint: NSLayoutConstraint!
    @IBOutlet public weak var checkmark: UIImageView!
    @IBOutlet public weak var titleLabel: UILabel!
    @IBOutlet public weak var button: UIButton!

    override init(frame: CGRect) {
        super.init(frame: frame)
        commonInit()
    }

    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        commonInit()
    }

    func commonInit() {
        Bundle.main.loadNibNamed("BottomSheetViewControllerItemView",
                                 owner: self,
                                 options: nil)
        contentView.frame = self.bounds
        addSubview(contentView)
        contentView.autoresizingMask = [.flexibleWidth]
        self.setContentHuggingPriority(.required, for: .vertical)
        self.setContentCompressionResistancePriority(.required, for: .vertical)
    }

    override var intrinsicContentSize: CGSize {
        return bounds.size
    }
}
