// BackToNormalView(){ // // console.log(this.msgListCheckbox); // // this.sldMsgTemplate=[] // // this.msgListCheckbox = []; // console.log(this.sldMsgTemplate); // this.isTextAreaActive=false // this.renderer.removeClass(document.body, 'add-template'); // this.isviewtext = false; // this.isEditTemplate=false; // //this.isActiveEdit // this.isnewtext=false // this.isActiveDelete=false; // this.isActiveEdit=false; // this.isActiveAdd=false; // // this.typeList="List View" // this.sldMessageCustomTemplateId=null // if (this.msgListCheckbox.length === 1) { // this.isActiveEdit = true; // Enable Edit for exactly 1 selection // this.isActiveDelete = true; // } else if (this.msgListCheckbox.length > 1) { // this.isActiveEdit = false; // Disable Edit when multiple are selected // this.isActiveDelete = true; // } else { // this.isActiveEdit = false; // Disable Edit when nothing is selected // this.isActiveDelete = false; // } // // Check if there are messages before modifying the first one // if (this.msgListCheckbox.length > 0) { // this.msgListCheckbox[0] = { // ...this.msgListCheckbox[0], // Message: this.boldify(this.msgListCheckbox[0].Message || "").replace(/<[^>]*>/g, '') // }; // } // console.log("After Update:", this.msgListCheckbox); // // // Reset all checkboxes after exiting edit mode // this.msgListCheckbox.forEach(msg => (msg.checked)); // // this.isSelectAllChecked = false; // // // Reset the 'checked' property // this.displayedTemplates.forEach(template => { // template.checked; // }); // // if (this.displayedTemplates.length === 1) { // // this.isActiveEdit = true; // Enable Edit for exactly 1 selection // // this.isActiveDelete = true; // // this.isActiveAdd=false // // } else if (this.displayedTemplates.length > 1) { // // this.isActiveEdit = false; // Disable Edit when multiple are selected // // this.isActiveDelete = true; // // this.isActiveAdd=false; // // } else { // // this.isActiveEdit = false; // Disable Edit when nothing is selected // // this.isActiveDelete = false; // // this.isActiveAdd=true; // // } // }