text: (this["webpackJsonptodo-list-react"]=this["webpackJsonptodo-list-react"]||[]).push([[0],[,,,,,function(e,t,n){e.exports=n(12)},,,,,function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(0),a=n.n(o),c=n(4),r=n.n(c),l=(n(10),n(2)),i=n(1);n(11);var u=function(e){var t=e.todo,n=e.index,o=e.DeleteTodo,c=e.CompleteTodo;return a.a.createElement("div",{className:"todo"},a.a.createElement("h2",null,t.task),a.a.createElement("p",null,t.description),a.a.createElement("button",{onClick:function(){o(n)}},"Delete"),a.a.createElement("button",{onClick:function(){c(n)}},"Complete"))};var s=function(e){var t=e.AddTodo,n=Object(o.useState)(""),c=Object(i.a)(n,2),r=c[0],l=c[1],u=Object(o.useState)(""),s=Object(i.a)(u,2),d=s[0],m=s[1];return a.a.createElement("form",{onSubmit:function(e){e.preventDefault(),t({task:r,description:d,completed:!1}),l(""),m("")}},a.a.createElement("p",null,"Todo:"),a.a.createElement("input",{type:"text",value:r,onChange:function(e){l(e.target.value)}}),a.a.createElement("p",null,"Description:"),a.a.createElement("input",{type:"text",value:d,onChange:function(e){m(e.target.value)}}),a.a.createElement("button",{type:"submit"},"Add Todo"))};var d=function(){var e=Object(o.useState)([{task:"get groceries",description:"go to kroger to get a gallon of milk",completed:!1}]),t=Object(i.a)(e,2),n=t[0],c=t[1];function r(e){var t=Object(l.a)(n);t.splice(e,1),c(t)}function d(e){var t=Object(l.a)(n);t[e].completed=!0,c(t),alert(n[e].task+" completed")}return a.a.createElement("div",{className:"container"},a.a.createElement("h1",null,"TODO List"),a.a.createElement(s,{AddTodo:function(e){var t=Object(l.a)(n);t.push(e),c(t)}}),a.a.createElement("div",{className:"todo-container"},n.map((function(e,t){return a.a.createElement(u,{key:t.toString(),todo:e,index:t,DeleteTodo:r,CompleteTodo:d})}))))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));r.a.render(a.a.createElement(d,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}],[[5,1,2]]]);
  //# sourceMappingURL=main.061a8fa9.chunk.js.map