import { getFromStorage, updateStorage } from "../../lib"; import { EStorageKey } from "../index"; export class HiddenColumns { get(tableId: string): string[] { const hidden = getFromStorage(EStorageKey.hiddenColumnIds); return hidden[tableId] || []; } set(tableId: string, columnIds: string[]) { const hidden = getFromStorage(EStorageKey.hiddenColumnIds); hidden[tableId] = columnIds.length ? columnIds : undefined; updateStorage(EStorageKey.hiddenColumnIds, hidden); } }