"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.localStorageMock = exports.createSecuritySolutionStorageMock = void 0; var _public = require("@kbn/kibana-utils-plugin/public"); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ const localStorageMock = () => { let store = {}; return { getItem: key => { return store[key] || null; }, setItem: (key, value) => { store[key] = value; }, clear() { store = {}; }, removeItem(key) { delete store[key]; } }; }; exports.localStorageMock = localStorageMock; const createSecuritySolutionStorageMock = () => { const localStorage = localStorageMock(); return { localStorage, storage: new _public.Storage(localStorage) }; }; exports.createSecuritySolutionStorageMock = createSecuritySolutionStorageMock;