 }
 
 extension MealCell: HeightCalculator {
-    static func height(for width: CGFloat, viewModel: MealViewModel) -> CGFloat {
-        let cell = MealCell()
-        cell.update(viewModel: viewModel)
-        let size = cell.contentView.systemLayoutSizeFitting(CGSize(width: width, height: 0),
-                                                            withHorizontalFittingPriority: .required,
-                                                            verticalFittingPriority: .fittingSizeLevel)
-        return size.height
-    }
+	static func height(for width: CGFloat, viewModel: MealViewModel) -> CGFloat {
+		let cell = MealCell()
+		cell.update(viewModel: viewModel)
+		let size = cell.contentView.systemLayoutSizeFitting(CGSize(width: width, height: 0),
+															withHorizontalFittingPriority: .required,
+															verticalFittingPriority: .fittingSizeLevel)
+		return size.height
+	}
 }

        
        self.imageView.contentMode = .scaleAspectFill
        self.imageView.clipsToBounds = true
        
        self.badgeView.backgroundColor = UIColor.htw.mediumGrey
        self.badgeView.textColor = UIColor.white
        self.badgeView.font = UIFont.systemFont(ofSize: 12, weight: .regular)
        
        self.colorView.backgroundColor = UIColor.htw.green

        self.priceView.textAlignment = .right
        self.priceView.textColor = UIColor.htw.mediumGrey
        self.priceView.font = .systemFont(ofSize: Const.markFontSize, weight: .medium)
        
        self.titleView.font = .systemFont(ofSize: Const.titleFontSize, weight: .medium)
        self.titleView.numberOfLines = 0
        self.titleView.textColor = UIColor.htw.darkGrey

        [self.imageView, self.badgeView, self.colorView, self.titleView, self.priceView].forEach {
            self.contentView.addSubview($0)
            $0.translatesAutoresizingMaskIntoConstraints = false
        }
        
        NSLayoutConstraint.activate([
            // image view
            self.imageView.topAnchor.constraint(equalTo: self.priceView.topAnchor),
            self.imageView.trailingAnchor.constraint(equalTo: self.contentView.trailingAnchor, constant: -Const.horizontalMargin),
            self.imageView.leadingAnchor.constraint(equalTo: self.colorView.trailingAnchor, constant: Const.horizontalMargin),
            self.imageView.widthAnchor.constraint(equalTo: self.imageView.heightAnchor, multiplier: 8/5),
            
            // badge view
            self.badgeView.topAnchor.constraint(equalTo: self.imageView.bottomAnchor, constant: Const.innerItemMargin),
            self.badgeView.leadingAnchor.constraint(equalTo: self.colorView.trailingAnchor, constant: Const.horizontalMargin),
            
            // titleView
            self.titleView.leadingAnchor.constraint(equalTo: self.colorView.trailingAnchor, constant: Const.horizontalMargin),
            self.titleView.trailingAnchor.constraint(equalTo: self.contentView.trailingAnchor, constant: -Const.horizontalMargin),
            self.titleView.topAnchor.constraint(equalTo: self.badgeView.bottomAnchor, constant: Const.innerItemMargin),
            self.titleView.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor, constant: -Const.verticalMargin),
            
            // price view
            self.priceView.leadingAnchor.constraint(equalTo: self.contentView.leadingAnchor, constant: Const.horizontalMargin),
            self.priceView.topAnchor.constraint(equalTo: self.contentView.topAnchor, constant: Const.verticalMargin),
            self.priceView.widthAnchor.constraint(equalToConstant: 80),
            self.priceView.heightAnchor.constraint(equalToConstant: 30),
            
            // Color view
            self.colorView.leadingAnchor.constraint(equalTo: self.priceView.trailingAnchor, constant: Const.horizontalMargin),
            self.colorView.topAnchor.constraint(equalTo: self.contentView.topAnchor, constant: Const.colorViewHorizontalMargin),
            self.colorView.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor, constant: -Const.colorViewHorizontalMargin),
            self.colorView.widthAnchor.constraint(equalToConstant: 5),
        ])
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        self.colorView.layer.cornerRadius = 2
    }

    func update(viewModel: MealViewModel) {
        self.imageView.htw.loadImage(url: viewModel.imageUrl, loading: #imageLiteral(resourceName: "Canteen"), fallback: #imageLiteral(resourceName: "Exams"))
        self.titleView.text = viewModel.title

class MealCell: FlatCollectionViewCell, Cell {

    enum Const {
		static let height: CGFloat = 122
		static let imageWidth: CGFloat = 100
		
		static let innerItemMargin: CGFloat = 8
        static let verticalMargin: CGFloat = 15
        static let colorViewHorizontalMargin: CGFloat = 10
    }
    
    private lazy var imageView = UIImageView()
    private lazy var badgeView = BadgeLabel()
    private lazy var titleView = UILabel()
    private lazy var priceView = UILabel()

