import * as firebase from "../../firebase";
export var firestore;
(function (firestore) {
    class Firestore {
        collection(collectionPath) {
            return firebase.firestore.collection(collectionPath);
        }
        collectionGroup(id) {
            return firebase.firestore.collectionGroup(id);
        }
        doc(path) {
            return firebase.firestore.docRef(path);
        }
        FieldValue() {
            return {
                type: undefined,
                value: undefined,
                serverTimestamp: () => "SERVER_TIMESTAMP",
                delete: () => "DELETE_FIELD",
                arrayUnion: (...elements) => new firebase.firestore.FieldValue("ARRAY_UNION", elements),
                arrayRemove: (...elements) => new firebase.firestore.FieldValue("ARRAY_REMOVE", elements),
                increment: (n) => new firebase.firestore.FieldValue("INCREMENT", n)
            };
        }
        GeoPoint(latitude, longitude) {
            return firebase.firestore.GeoPoint(latitude, longitude);
        }
        runTransaction(updateFunction) {
            return firebase.firestore.runTransaction(updateFunction);
        }
        batch() {
            return firebase.firestore.batch();
        }
        settings(settings) {
            firebase.firestore.settings(settings);
        }
        clearPersistence() {
            return firebase.firestore.clearPersistence();
        }
    }
    firestore.Firestore = Firestore;
})(firestore || (firestore = {}));
//# sourceMappingURL=index.js.map