 
 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)
     }
     


public struct LayoutGuide {
    
    private let semanticContentAttribute: UISemanticContentAttribute
    private let effectiveUserInterfaceLayoutDirection: UIUserInterfaceLayoutDirection
    private let rect: CGRect
    
}

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


extension LayoutGuide {
    
    public var topLeft: CGPoint {
        return self.rect.topLeft
    }
    
    public var topCenter: CGPoint {
        return self.rect.topCenter
    }
    
    public var topRight: CGPoint {
        return self.rect.topRight
    }
    
    public var middleLeft: CGPoint {
        return self.rect.middleLeft
    }
    
    public var middleCenter: CGPoint {
        return self.rect.middleCenter
    }
    
    public var middleRight: CGPoint {
        return self.rect.middleRight
    }
    
    public var bottomLeft: CGPoint {
        return self.rect.bottomLeft
    }
    
    public var bottomCenter: CGPoint {
        return self.rect.bottomCenter
    }
    
    public var bottomRight: CGPoint {
        return self.rect.bottomRight
    }
    
    public var size: CGSize {
        return self.rect.size
    }
    
    public 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)
    }
    
}

extension LayoutGuide {
    
    public var frame: CGRect {
        return self.rect.frame
    }
    
    public func frame(inside insets: UIEdgeInsets) -> CGRect {
        return self.rect.frame(inside: insets)
    }
    
}

extension LayoutGuide {
    
    public var leading: CGFloat {
        switch self.uiLayoutDirection {
        case .leftToRight:
            return self.left
            
        case .rightToLeft:
            return self.right
        }
    }
    
    public var trailing: CGFloat {
        switch self.uiLayoutDirection {
        case .leftToRight:
            return self.right
            
        case .rightToLeft:
            return self.left
        }
    }
    
}
