 
 extension LayoutGuide {
     
-    var top: CGFloat {
+    public var top: CGFloat {
         return self.rect.top
     }
     
-    var middle: CGFloat {
+    public var middle: CGFloat {
         return self.rect.middle
     }
     
-    var bottom: CGFloat {
+    public var bottom: CGFloat {
         return self.rect.bottom
     }
     
-    var height: CGFloat {
+    public var height: CGFloat {
         return self.rect.height
     }
     
-    func vertical(at relativePosition: CGFloat) -> CGFloat {
+    public func vertical(at relativePosition: CGFloat) -> CGFloat {
         return self.top + (self.height * relativePosition)
     }
     


extension LayoutGuide {
    
    var topLeft: CGPoint {
        return self.rect.topLeft
    }
    
    var topCenter: CGPoint {
        return self.rect.topCenter
    }
    
    var topRight: CGPoint {
        return self.rect.topRight
    }
    
    var middleLeft: CGPoint {
        return self.rect.middleLeft
    }
    
    var middleCenter: CGPoint {
        return self.rect.middleCenter
    }
    
    var middleRight: CGPoint {
        return self.rect.middleRight
    }
    
    var bottomLeft: CGPoint {
        return self.rect.bottomLeft
    }
    
    var bottomCenter: CGPoint {
        return self.rect.bottomCenter
    }
    
    var bottomRight: CGPoint {
        return self.rect.bottomRight
    }
    
    var size: CGSize {
        return self.rect.size
    }
    
    func point(at relativePoint: CGPoint) -> CGPoint {
        let x = self.horizontal(at: relativePoint.x)
        let y = self.vertical(at: relativePoint.y)
        return .init(x: x, y: y)
    }
    
}


public struct LayoutGuide {
    
    let uiLayoutDirection: UIUserInterfaceLayoutDirection
    let rect: Rect
    
    static let empty: LayoutGuide = .init(uiLayoutDirection: .leftToRight,
                                          rect: .zero)
    
}

extension LayoutGuide: LayoutGuideRepresentable {
    
    public var layoutGuide: LayoutGuide {
        return self
    }
    
}

extension LayoutGuide {
    
    public var left: CGFloat {
        return self.rect.left
    }
    
    public var center: CGFloat {
        return self.rect.center
    }
    
    public var right: CGFloat {
        return self.rect.right
    }
    
    public var width: CGFloat {
        return self.rect.width
    }
    
    public func horizontal(at relativePosition: CGFloat) -> CGFloat {
        return self.left + (self.width * relativePosition)
    }
    
