import { defaultIcons } from "./consts.js";

//#region src/icons/cache.ts
/**
* Holds the collection of selected predefined icons. Can be extended with more icons by the consumer.
* When using icons, they will be checked in library before loading them from CDN.
*/
var IconsCache = class {
	cache = /* @__PURE__ */ new Map();
	add = (...icons) => {
		icons.forEach((icon) => {
			this.cache.set(icon.name, icon);
		});
	};
	get = (name) => {
		const icon = this.cache.get(name);
		if (!icon) console.error(`Icon ${name} does not exist in the library.`);
		return icon;
	};
	has = (name) => {
		return this.cache.has(name);
	};
	init = () => {
		this.add(...Object.values(defaultIcons));
	};
	reset = () => {
		this.cache.clear();
	};
};
const cache = new IconsCache();
cache.init();

//#endregion
export { cache as default };
globalThis.__vuiVersion__ = "4.0.1"
//# sourceMappingURL=cache.js.map