// Path: android/tweakr/src/main/java/com/google/tweakr/types/ValueType.java
// public interface ValueType {
//     /**
//      * Simple name of the type. Used to select an appropriate UI.
//      */
//     String getName();
// 
//     /**
//      * A default value if one cannot be determined.
//      */
//     Object getDefault();
// 
//     /**
//      * Safely convert a value from Firebase into the correct type.
//      */
//     Object convert(Object newValue);
// 
//     /**
//      * For enum fields or other fields you want to restrict to only certain choices.
//      *
//      * @return An array of String representations of all possible values to choose from.
//      */
//     default List<String> getPossibleValues() {
//         return null;
//     }
// }


import androidx.annotation.NonNull;
import android.util.Log;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.google.tweakr.types.ValueType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
     * Returns the name of the root-level collection in the database to add all Tweaks.
     *
     * Override this if you are using the same database for multiple apps.
     */
    @NonNull
    protected String getRootCollectionKey() {
        return TABLE_TWEAKR;
    }

    /**
     * Returns the user's sub-collection key. Use this if you want each user to be able to Tweak
     * their own set of values, which will not change the other users' values.
     *
     * @return an alphanumeric identifier that is unique per user.
     */
    public CompletableFuture<String> getUserKey() {
        return CompletableFuture.completedFuture("default");
    }

    @Override
    public void addListener(OnChangeListener listener) {
        listeners.add(listener);
    }

    @Override
    public void removeListener(OnChangeListener listener) {
        listeners.remove(listener);
    }

    @Override
// Path: android/tweakr/src/main/java/com/google/tweakr/types/ValueType.java
// public interface ValueType {
//     /**
//      * Simple name of the type. Used to select an appropriate UI.
//      */
//     String getName();
// 
//     /**
//      * A default value if one cannot be determined.
//      */
//     Object getDefault();
// 
//     /**
//      * Safely convert a value from Firebase into the correct type.
//      */
//     Object convert(Object newValue);
// 
//     /**
//      * For enum fields or other fields you want to restrict to only certain choices.
//      *
//      * @return An array of String representations of all possible values to choose from.
//      */
//     default List<String> getPossibleValues() {
//         return null;
//     }
// }


// Path: android/tweakr-firebase/src/main/java/com/google/tweakr/TweakrFirebaseRepo.java
import androidx.annotation.NonNull;
import android.util.Log;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.google.tweakr.types.ValueType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;

     * Returns the name of the root-level collection in the database to add all Tweaks.
     *
     * Override this if you are using the same database for multiple apps.
     */
    @NonNull
    protected String getRootCollectionKey() {
        return TABLE_TWEAKR;
    }

    /**
     * Returns the user's sub-collection key. Use this if you want each user to be able to Tweak
     * their own set of values, which will not change the other users' values.
     *
     * @return an alphanumeric identifier that is unique per user.
     */
    public CompletableFuture<String> getUserKey() {
        return CompletableFuture.completedFuture("default");
    }

    @Override
    public void addListener(OnChangeListener listener) {
        listeners.add(listener);
    }

    @Override
    public void removeListener(OnChangeListener listener) {
        listeners.remove(listener);
    }

    @Override
    public void add(String name, int targetId, ValueType valueType, Object initialValue, TweakMetadata tweakMetadata) {