import {LayoutConfigJson} from "../../Customizations/JSON/CustomLayoutFromJSON"; import {UIEventSource} from "../../Logic/UIEventSource"; import {UIElement} from "../UIElement"; import Combine from "../Base/Combine"; export class Preview extends UIElement { private url: UIEventSource; private config: UIEventSource; constructor(url: UIEventSource, config: UIEventSource) { super(url); this.config = config; this.url = url; } InnerRender(): string { const url = this.url.data; return new Combine([ ``, '

The above preview is in testmode. Changes will not be sent to OSM, so feel free to add points and answer questions

', `

Your link

`, 'Bookmark the link below
', 'MapComplete has no backend. The entire theme configuration is saved in the following URL. This means that this URL is needed to revive and change your MapComplete instance.
', `${this.url.data}
`, '

JSON-configuration

', 'You can see the configuration in JSON format below.
', '', JSON.stringify(this.config.data, null, 2).replace(/\n/g, "
").replace(/ /g, " "), '
' ]).Render(); } }