// Copyright (c) 2019, InfluxFramework LLC
// MIT License. See license.txt

influxframework.ui.form.on('Website Theme', {
	validate(frm) {
		let theme_scss = frm.doc.theme_scss;
		if (theme_scss && theme_scss.includes('influxframework/public/scss/website')
			&& !theme_scss.includes('influxerp/public/scss/website')
		) {
			frm.set_value('theme_scss',
				`${frm.doc.theme_scss}\n@import "influxerp/public/scss/website";`);
		}
	}
});
