<commit_before>using Uno;
using Uno.UX;
using Uno.Collections;
using Uno.Compiler.ExportTargetInterop;
using Fuse;
using Fuse.Triggers;
using Fuse.Controls;
using Fuse.Controls.Native;
using Fuse.Controls.Native.Android;
using Uno.Threading;

namespace Firebase.Authentication
{
    [Require("Source.Include", "Firebase/Firebase.h")]
    [Require("Source.Include", "FirebaseAuth/FirebaseAuth.h")]
    extern(iOS)
    internal static class User
    {
        [Foreign(Language.ObjC)]
        internal static ObjC.Object GetCurrent()
        @{
            return [FIRAuth auth].currentUser;
        @}

        [Foreign(Language.ObjC)]
        internal static string GetUid(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            NSString* name = user.uid;
            return name;
        @}

        [Foreign(Language.ObjC)]
        internal static string GetName(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            NSString* name = user.displayName;
            return name;
        @}

        [Foreign(Language.ObjC)]
        internal static string GetEmail(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            NSString* email = user.email;
            return email;
        @}

        [Foreign(Language.ObjC)]
        internal static string GetPhotoUrl(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            NSURL* photoUrl = user.photoURL;
            return (photoUrl==NULL) ? NULL : photoUrl.absoluteString;
        @}

        [Foreign(Language.ObjC)]
        internal static bool IsEmailVerified(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            return user.isEmailVerified();
        @}
    }


    [Require("Source.Include", "Firebase/Firebase.h")]
    [Require("Source.Include", "FirebaseAuth/FirebaseAuth.h")]
    extern(iOS)
    internal class GetToken : Promise<string>
    {
        [Foreign(Language.ObjC)]
        public GetToken()
        @{
            NSLog(@"We are in obj-c trying to get token");
            FIRUser* user = [FIRAuth auth].currentUser;
            [user getIDTokenWithCompletion: ^(NSString *_Nullable token, NSError *_Nullable error) {
                    NSLog(@"%@", token);
                if (error) {
                    @{GetToken:Of(_this).Reject(string):Call(@"failed getting token for user")};<commit_msg>change to return correct property<commit_after>using Uno;
using Uno.UX;
using Uno.Collections;
using Uno.Compiler.ExportTargetInterop;
using Fuse;
using Fuse.Triggers;
using Fuse.Controls;
using Fuse.Controls.Native;
using Fuse.Controls.Native.Android;
using Uno.Threading;

namespace Firebase.Authentication
{
    [Require("Source.Include", "Firebase/Firebase.h")]
    [Require("Source.Include", "FirebaseAuth/FirebaseAuth.h")]
    extern(iOS)
    internal static class User
    {
        [Foreign(Language.ObjC)]
        internal static ObjC.Object GetCurrent()
        @{
            return [FIRAuth auth].currentUser;
        @}

        [Foreign(Language.ObjC)]
        internal static string GetUid(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            NSString* name = user.uid;
            return name;
        @}

        [Foreign(Language.ObjC)]
        internal static string GetName(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            NSString* name = user.displayName;
            return name;
        @}

        [Foreign(Language.ObjC)]
        internal static string GetEmail(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            NSString* email = user.email;
            return email;
        @}

        [Foreign(Language.ObjC)]
        internal static string GetPhotoUrl(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            NSURL* photoUrl = user.photoURL;
            return (photoUrl==NULL) ? NULL : photoUrl.absoluteString;
        @}

        [Foreign(Language.ObjC)]
        internal static bool IsEmailVerified(ObjC.Object obj)
        @{
            FIRUser* user = [FIRAuth auth].currentUser;
            BOOL isEmailVerified = user.emailVerified;
            return isEmailVerified;
        @}
    }


    [Require("Source.Include", "Firebase/Firebase.h")]
    [Require("Source.Include", "FirebaseAuth/FirebaseAuth.h")]
    extern(iOS)
    internal class GetToken : Promise<string>
    {
        [Foreign(Language.ObjC)]
        public GetToken()
        @{
            NSLog(@"We are in obj-c trying to get token");
            FIRUser* user = [FIRAuth auth].currentUser;
            [user getIDTokenWithCompletion: ^(NSString *_Nullable token, NSError *_Nullable error) {
                    NSLog(@"%@", token);
                if (error) {
                    @{GetToken:Of(_this).Reject(string):Call(@"failed getting token for user")};
{'fraction_non_alphanumeric': 0.1121756487025948, 'fraction_numerical': 0.0, 'mean_word_length': 2.1775523145212428, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3733858', 'n_tokens_mistral': 1472, 'n_tokens_neox': 1416, 'n_words': 314}