YUI.add("moodle-mod_checklist-linkselect",function(e,t){var n={COURSELINK:"#menulinkcourseid",URLLINK:"#id_linkurl",OPENLINKINNEWWINDOW:"#id_openlinkinnewwindow"};M.mod_checklist=M.mod_checklist||{},M.mod_checklist.linkselect={courselink:null,urllink:null,init:function(){this.courselink=e.one(n.COURSELINK),this.urllink=e.one(n.URLLINK),this.openurlinnewwindow=e.one(n.OPENLINKINNEWWINDOW);if(!this.courselink||!this.urllink)return;this.courselink.on("valuechange",this.fieldChanged,this),this.urllink.on("valuechange",this.fieldChanged,this),this.fieldChanged()},fieldChanged:function(){var e,t;e=this.courselink.get("value"),t=this.urllink.get("value"),e?(this.urllink.set("value",""),this.urllink.set("disabled",!0),this.openurlinnewwindow.set("disabled",!0),this.openurlinnewwindow.set("checked",!1)):t?(this.courselink.set("value",null),this.courselink.set("disabled",!0),this.openurlinnewwindow.set("disabled",!1)):(this.urllink.set("disabled",!1),this.courselink.set("disabled",!1),this.openurlinnewwindow.set("disabled",!1))}}},"@VERSION@",{requires:["node","event-valuechange"]});
