export const DefaultAdornerSettings=[{adorner:"grid",isEnabled:!0},{adorner:"flex",isEnabled:!0},{adorner:"Ad",isEnabled:!0}];export class AdornerManager{constructor(t){this.adornerSettings=new Map,this.settingStore=t,this.syncSettings()}updateSettings(t){this.adornerSettings=t,this.persistCurrentSettings()}getSettings(){return this.adornerSettings}isAdornerEnabled(t){return this.adornerSettings.get(t)||!1}persistCurrentSettings(){const t=[];for(const[e,s]of this.adornerSettings)t.push({adorner:e,isEnabled:s});this.settingStore.set(t)}loadSettings(){const t=this.settingStore.get();for(const e of t)this.adornerSettings.set(e.adorner,e.isEnabled)}syncSettings(){this.loadSettings();const t=new Set(this.adornerSettings.keys());for(const{adorner:e,isEnabled:s}of DefaultAdornerSettings)t.delete(e),this.adornerSettings.has(e)||this.adornerSettings.set(e,s);for(const e of t)this.adornerSettings.delete(e);this.persistCurrentSettings()}}