     override init(frame:CGRect)
     {
         buttonsTotalWidth = kLabelsWidth + kLabelsMargin + kButtonsWidth + kButtonsWidth + kLabelsMargin + kLabelsWidth
+        colorNotSelected = UIColor(white:0.9, alpha:1)
         
         super.init(frame:frame)
         

    weak var buttonFreeJoin:UIButton!
    weak var model:MHomeItemAccess!
    weak var layoutButtonsLeft:NSLayoutConstraint!
    private let buttonsTotalWidth:CGFloat
    private let kLabelsHeight:CGFloat = 20
    private let kLabelsWidth:CGFloat = 105

        
        super.layoutSubviews()
    }
    
    override func config(model:MHomeItem)
    {
        self.model = model as! MHomeItemAccess
        hover()
    }
    
    //MARK: private
    
    private func hover()
    {
        switch model.access
        {
            case FDatabaseModelRoom.Access.invitationOnly:
                
                showInvitationOnly()
                
                break
                
            case FDatabaseModelRoom.Access.freeJoin:
     
                showFreeJoin()
                
                break
        }
    }
    
    private func showInvitationOnly()
    {
        buttonInvitationOnly.backgroundColor = UIColor.main()
        buttonInvitationOnly.imageView!.tintColor = UIColor.white
        buttonFreeJoin.backgroundColor = UIColor.clear
        buttonFreeJoin.imageView!.tintColor = colorNotSelected
    }
    
    private func showFreeJoin()
    {
        buttonInvitationOnly.backgroundColor = UIColor.clear
        buttonInvitationOnly.imageView!.tintColor = colorNotSelected
        buttonFreeJoin.backgroundColor = UIColor.main()
        buttonFreeJoin.imageView!.tintColor = UIColor.white
    }
}
