         waitingForMotion = true
     }
     
+    public func statusHealth() -> PermissionStatus {
+        // There should be only one...
+        // TODO: Refactor to comp. var.
+        //        let healthCategoryTypes = self.configuredPermissions.filter { $0.healthCategoryTypes != .None && !$0.healthCategoryTypes!.isEmpty }.first?.healthCategoryTypes
+        //        let status = HKHealthStore().authorizationStatusForType(healthCategoryType!)
+        //        switch status {
+        //        case .SharingAuthorized:
+        //            return .Authorized
+        //        case .SharingDenied:
+        //            return .Unauthorized
+        //        case .NotDetermined:
+        //            return .Unknown
+        //        }
+        return .Unknown
+    }
+    
+    func requestHealth() {
+        //        switch statusHealth() {
+        //        case .Unknown:
+        //            HKHealthStore().requestAuthorizationToShareTypes(<#typesToShare: Set<NSObject>!#>,
+        //                readTypes: <#Set<NSObject>!#>,
+        //                completion: <#((Bool, NSError!) -> Void)!##(Bool, NSError!) -> Void#>)
+        //            EKEventStore().requestAccessToEntityType(EKEntityTypeEvent,
+        //                completion: { (granted, error) -> Void in
+        //                    self.detectAndCallback()
+        //            })
+        //        case .Unauthorized:
+        //            self.showDeniedAlert(.Reminders)
+        //        default:
+        //            break
+        //        }
+    }
+    
     // MARK: finally, displaying the panel
 
     @objc public func show(authChange: ((finished: Bool, results: [PermissionResult]) -> Void)? = nil, cancelled: ((results: [PermissionResult]) -> Void)? = nil) {

    static let requestedForMotion = "askedForMotion"
}

@objc public enum PermissionType: Int {
    case Contacts, LocationAlways, LocationInUse, Notifications, Microphone, Camera, Photos, Reminders, Events, Bluetooth, Motion
    
    public func stringValue() -> String {
        switch self {
        case .Contacts: return "Contacts"
        case .Events: return "Events"

        // this is a bit of a mess, eh?
        switch type {
        case .LocationAlways, .LocationInUse:
            button.setTitle("Enable \(type.prettyName)".localized.uppercaseString, forState: UIControlState.Normal)
        default:
            button.setTitle("Allow \(type.description)".localized.uppercaseString, forState: UIControlState.Normal)
        }
        
        button.addTarget(self, action: Selector("request\(type.description)"), forControlEvents: UIControlEvents.TouchUpInside)
        
        return button
    }
