// Copyright (c) 2019, SolutionERP LLC and Contributors
// MIT License. See license.txt

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