text: parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"d6sW":[function(require,module,exports) {
  var e=document.getElementById("todos-form"),t=document.getElementById("item-input"),n=document.querySelector("[type='submit']"),i=document.getElementById("clear-list"),l=document.getElementById("item-list");console.log(l);var c=[];function o(e,t,n){e.preventDefault(),t.value&&(n.push(t.value),t.value="",r(n,l))}function r(e,t){t.innerHTML="",e.forEach(function(e){t.insertAdjacentHTML("afterbegin","<div class='item my-3'><h5 class='item-name text-capitalize'>"+e+"</h5><div class='item-icons'><button class='btn btn-primary complete-btn'>Complete</button><button class='btn btn-warning edit-btn'>Edit</button><button class='btn btn-danger delete-btn'>Delete</button></div></div>"),u(e,t)})}n.addEventListener("click",function(e){return o(e,t,c)});var u=function(e,n){n.querySelectorAll(".item").forEach(function(i){i.querySelector(".item-name").textContent===e&&(i.querySelector(".complete-btn").addEventListener("click",function(){i.querySelector(".item-name").classList.toggle("completed"),this.classList.toggle("visibility")}),i.querySelector(".edit-btn").addEventListener("click",function(){t.value=e,n.removeChild(i),c=c.filter(function(t){return t!==e})}),i.querySelector(".delete-btn").addEventListener("click",function(){n.removeChild(i),c=c.filter(function(t){return t!==e})}))})};
  },{}]},{},["d6sW"], null)
  //# sourceMappingURL=/main.3e6a303d.js.map