         return indexChild
     }
     
-    func isParent(_ indexPath: NSIndexPath) -> Bool {
+    func isParent(indexPath: NSIndexPath) -> Bool {
         return model[indexPath.section].parent == nil
     }
 }

        return model.count
    }
    
    func numberOfRowsInSection(_ section: Int) -> Int {
        if model[section].hidden { return 0 }
        return model[section].cells.count
    }
    
    func heightForRow(_ indexPath: NSIndexPath) -> CGFloat {
        return model[indexPath.section].heights[indexPath.row]
    }
    

        model[indexPath.section].heights[indexPath.row] = height
    }
    
    func getType(indexPath: NSIndexPath) -> T {
        return model[indexPath.section].cells[indexPath.row]
    }
    
    func isExpand(indexPath: NSIndexPath) -> Bool {
        guard let indexChild = getIndexChild(indexPath) else { return false }
        return !model[indexChild].hidden
    }
    
    func selectParent(indexPath: NSIndexPath, completion: (Int, Bool) -> Void) {
        guard let indexChild = getIndexChild(indexPath) else { return }
        model[indexChild].hidden = !model[indexChild].hidden
        completion(indexChild, model[indexChild].hidden)
    }
    
    func getIndexChild(indexPath: NSIndexPath) -> Int? {
        guard isParent(indexPath),
            let child = model.filter({$0.parent == indexPath.section}).first,
            let indexChild = model.indexOf({$0.parent == child.parent})
