"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLogic = void 0;
const react_1 = require("react");
const DashboardSidebarProvider_1 = require("../../DashboardSidebarProvider");
const useLocalStorage_1 = require("../../useLocalStorage");
const useLogic = () => {
    // Достается напрямую, т.к. нет гарантий, что скелетон будет обернут в контекст
    const [storageState = true] = (0, useLocalStorage_1.useLocalStorage)(DashboardSidebarProvider_1.LOCAL_STORAGE_KEY, true);
    const [isPinned, setPinned] = (0, react_1.useState)(true);
    (0, react_1.useEffect)(() => {
        setPinned(storageState);
    }, []);
    return { isPinned };
};
exports.useLogic = useLogic;
