'use strict';

var React = require('react');
var zustand = require('zustand');
var middleware = require('zustand/middleware');
var index = require('./index-6ce6e395.js');

const useIsInit = () => {
    const [isInit, setIsInit] = React.useState(true);
    React.useEffect(() => {
        setIsInit(false);
    }, []);
    return isInit;
};

const useCartCareService = zustand.create()(middleware.persist((set, get) => ({
    href: null,
    setHref: (href) => {
        set({ href });
    },
    getHref: () => {
        var _a;
        return (_a = get().href) !== null && _a !== void 0 ? _a : null;
    },
    resetHref: () => {
        set({ href: null });
    },
}), {
    name: index.HHG_CART_CARE_STORE_KEY,
    storage: middleware.createJSONStorage(() => localStorage),
}));

exports.useCartCareService = useCartCareService;
exports.useIsInit = useIsInit;
