import { GlobalState } from "../types" ; export function setUpDevTools ( storageType , name , state ) { if ( typeof window === 'undefined' ) return ; window . __LSM__ = name ; window . __LSM_NAME__ = name ; window . __LSM_DEBUG__ = ( value ) => storageType . setItem ( '___LSM_DEBUG__' , value ) ; window . __LSM_RESET__ = ( ) => storageType . removeItem ( name ) ; window . __LSM_GET_STORE__ = ( ) => storageType . getItem ( name ) ; window . __LSM_SAVE_TO__ = ( name ) => window . localStorage . setItem ( name , JSON . stringify ( state ) ) ; window . __LSM_LOAD__ = ( { storeName , data , } ) => storageType . setItem ( name || '___LSM_DEBUG__' , data || window . localStorage . getItem ( storeName ) || '' ) ; }