import type { ID, Type, View } from "facilmap-types"; import { getI18n } from "./i18n.js"; const LETTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; const LENGTH = 12; export function generateRandomPadId(length: number = LENGTH): string { let randomPadId = ""; for(let i=0; i): Type[] { const typeArr = Array.isArray(types) ? [...types] : Object.values(types); return typeArr.sort((a, b) => a.idx - b.idx); } export function getOrderedViews(views: View[] | Record): View[] { const typeArr = Array.isArray(views) ? [...views] : Object.values(views); return typeArr.sort((a, b) => a.idx - b.idx); }