 //
 
 import UIKit
+import SnapKit
 
 class ServiceAlertTableViewCell: UITableViewCell {
 

                make.height.equalTo(descriptionLabel.intrinsicContentSize.height)
            }
        }
        
        if let stackView = affectedRoutesStackView {
            // When both a separator view and stackView are required
            affectedRoutesLabel.snp.remakeConstraints { (make) in
                make.leading.equalTo(timeSpanLabel)
                make.top.equalTo(descriptionLabel.snp.bottom).offset(24)
                make.width.equalTo(affectedRoutesLabel.intrinsicContentSize.width)
                make.height.equalTo(affectedRoutesLabel.intrinsicContentSize.height)
            }
            stackView.snp.remakeConstraints { (make) in
                make.top.equalTo(affectedRoutesLabel.snp.bottom).offset(8)
                make.leading.equalTo(timeSpanLabel)
                make.trailing.bottom.equalToSuperview().inset(borderInset)
            }
        } else {

        contentView.addSubview(topSeparator!)
    }
    
    func descriptionLabelConstraints(topConstraint: UIView) {
        descriptionLabel.snp.remakeConstraints { (make) in
            if topConstraint == contentView {
                make.top.equalToSuperview().inset(borderInset)
            } else {
                make.top.equalTo(topConstraint.snp.bottom).offset(12)
            }
            make.leading.trailing.equalToSuperview().inset(borderInset)
            if let text = descriptionLabel.text {
                let width = contentView.frame.width - (CGFloat)(2 * borderInset)
                let heightValue = ceil(text.heightWithConstrainedWidth(width: width, font: descriptionLabel.font))
