"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "useSplitPersistent", {
    enumerable: true,
    get: function() {
        return useSplitPersistent;
    }
});
const _react = require("react");
const useSplitPersistent = (key, defaulValue)=>{
    const size = (0, _react.useMemo)(()=>{
        const size = localStorage.getItem(key);
        if (size) {
            return `${size}%`;
        }
        return defaulValue;
    }, [
        key,
        defaulValue
    ]);
    const setSize = (size)=>{
        localStorage.setItem(key, size);
    };
    return [
        size,
        setSize
    ];
};

//# sourceMappingURL=useSplitPersistent.js.map