 
 import UIKit
 
-private let ListLayoutCountOfColumns = 1
-private let GridLayoutCountOfColumns = 3
-
 @objc public enum LayoutState: Int {
     
     case list, grid

        var yOffset = [CGFloat](repeating: contentHeight, count: numberOfColumns)
        for item in 0 ..< collectionView!.numberOfItems(inSection: 0) {
            let indexPath = IndexPath(item: item, section: 0)
            let height = cellPadding + staticCellHeight
            let frame = CGRect(x: xOffsets[column], y: yOffset[column], width: columnWidth, height: height)
            let insetFrame = frame.insetBy(dx: cellPadding, dy: cellPadding)
            let attributes = DisplaySwitchLayoutAttributes(forCellWith: indexPath)
            attributes.frame = insetFrame
            baseLayoutAttributes.append(attributes)

open class DisplaySwitchLayout: UICollectionViewLayout {
    
    fileprivate let numberOfColumns: Int
    fileprivate let cellHeightPadding: CGFloat
    fileprivate let cellWidthPadding: CGFloat
    fileprivate let staticCellHeight: CGFloat
    fileprivate let nextLayoutStaticCellHeight: CGFloat
    fileprivate var previousContentOffset: NSValue?
    let layoutState: LayoutState
    fileprivate let listLayoutCountOfColumns = 1
    fileprivate let gridLayoutCountOfColumns: Int
  
    fileprivate var baseLayoutAttributes: [DisplaySwitchLayoutAttributes]!
    
