UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) • 637 B
import{KIOSK_ENABLE_KEY as e}from"../../constants";import{isLocalStorageAvailable as r}from"../../utils/localStorage";import{getSavedKiosk as i}from"./SetKiosk/storage";export function applyKioskMode(t,o){t.kiosk=o,o||t.resetUIScale(),r&&window.localStorage.setItem(e,o?"1":"0")}export function isKioskMode(t){const o=new URLSearchParams(window.location.search).get(e);return o==="1"||o==="0"?o==="1":storedKioskMode(t)}export function storedKioskMode(t){const o=r?window.localStorage.getItem(e):null;return o==="1"||o==="0"?o==="1":hasSavedKiosk()||Object.keys(t.kiosk??{}).length>0}export function hasSavedKiosk(){return r&&i()!=null}