// Copyright (c) 2022, Frappe and contributors
// For license information, please see license.txt

frappe.ui.form.on('Malware Scan', {
	refresh: function (frm) {
		if (['Installed', 'Failure', 'Success'].includes(frm.pg.status)) {
			frm.add_custom_button(__('Start'), () => {
				frappe.confirm('Are you sure you want to scan?', () =>
					frm.call('start'),
				);
			});
		}
	},
});
