         }
     }
 }
-

        section = nil
        webcams = nil
        delegate = nil

        task?.cancel()
        task = nil
        
        takenFromPool.forEach { webcamView in
            webcamView.reset()
            WebcamViewPool.shared.give(view: webcamView)
        }
        takenFromPool.removeAll()

    }
    
    func configure(with item: ItemType) {
        layoutIfNeeded()
        carousel.layoutIfNeeded()
        
        section = item
        webcams = item.sortedWebcams()
        
        // Configure Carousel
        carousel.reloadData()
        
        carousel.alpha = 0
        UIView.animate(
            withDuration: 0.2,
            delay: 0.2,
            options: [.allowUserInteraction],
            animations: { [weak self] in
                self?.carousel.alpha = 1
                
            },
            completion: nil)
        
        // Configure header
        let currentWebcam = webcams?[safe: carousel.currentItemIndex] ?? webcams?.first

        sectionImageView.image = item.image
        sectionTitleLabel.text = item.title?.uppercased()
