"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useQueryString = void 0;
var native_1 = require("@react-navigation/native");
var use_deep_compare_effect_1 = require("use-deep-compare-effect");
var use_immer_1 = require("use-immer");
function useQueryString(path) {
    var _a;
    var route = native_1.useRoute();
    var _b = use_immer_1.useImmer((_a = route.params) !== null && _a !== void 0 ? _a : {}), query = _b[0], setQuery = _b[1];
    use_deep_compare_effect_1.useDeepCompareEffectNoCheck(function () {
        setQuery(function () { var _a; return (_a = route.params) !== null && _a !== void 0 ? _a : {}; });
    }, [route.params]);
    return query;
}
exports.useQueryString = useQueryString;
//# sourceMappingURL=useQueryString.native.js.map