import { LocalstorageService } from './localstorage.service';
function localstorage(app) {
    // get the default app
    if (!app) {
        if (!window['$$$SHEETBASE_APPS']) {
            throw new Error('No app for localstorage component.');
        }
        app = window['$$$SHEETBASE_APPS'].getApp();
    }
    // return the instance
    if (!!app.Localstorage) {
        return app.Localstorage;
    }
    else {
        return new LocalstorageService(app);
    }
}
export default localstorage;
