         return view
     }()
 
+    private lazy var chatStack: UIStackView = {
+        let view = UIStackView(arrangedSubviews: [messageTextField, sendButton])
+        view.distribution = .fillProportionally
+        view.spacing = 4.0
+        view.translatesAutoresizingMaskIntoConstraints = false
+        return view
+    }()
+
     override init(frame: CGRect) {
         super.init(frame: frame)
         commonInit()

        textField.returnKeyType = .send
        textField.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged)
        textField.layer.masksToBounds = true
        return textField
    }()

    private let button: UIButton = {
        let button = UIButton()
        button.titleLabel?.textAlignment = .center
        button.setTitle(String.chatSend, for: .normal)

}

class ChatInputView: UIView, UITextFieldDelegate {
    struct Constants {
        static let textFieldHeight = CGFloat(46.0)
    }

    @objc
    dynamic var sendMessageButtonColor: UIColor? {
        willSet {
            sendButton.setTitleColor(newValue, for: .normal)
            sendButton.setTitleColor(newValue?.withAlphaComponent(0.4), for: .disabled)
            sendButton.setTitleColor(newValue?.withAlphaComponent(0.4), for: .highlighted)
        }
    }

    @objc
    dynamic var textViewTextColor: UIColor? {
        willSet {
            messageTextField.textColor = newValue
        }
    }

    weak var delegate: ChatInputDelegate?

    private let messageTextField: UITextField = {
        let textField = TextFieldWithInsets()
        textField.isOpaque = false
        textField.translatesAutoresizingMaskIntoConstraints = false
