text: (this.webpackJsonptodo=this.webpackJsonptodo||[]).push([[0],{36:function(n,t,e){n.exports=e(63)},62:function(n,t,e){n.exports=e.p+"static/media/empty.acafca83.png"},63:function(n,t,e){"use strict";e.r(t);var r=e(0),a=e.n(r),o=e(31),i=e.n(o),c=e(5),l=e(2),u=e(11),s=e(1);function m(){var n=Object(l.a)(["\n    border-radius: 0.8rem;\n    color: white;\n    font-size: 1.6rem;\n    padding: 0.7rem 1rem;\n    text-decoration: none;\n    background: var(--color-primary);\n    transition: all 0.4s ease-in-out;\n\n    &:hover {\n        color: white;\n        background: var(--color-primary-light);\n    }\n"]);return m=function(){return n},n}function d(){var n=Object(l.a)(["\n    color: var(--color-text);\n    font-size: 1.6rem;\n    text-decoration: none;\n\n    &.active {\n        color: var(--color-primary);\n    }\n"]);return d=function(){return n},n}function f(){var n=Object(l.a)(["\n    &:not(:first-child) {\n        margin-left: 4rem;\n    }\n\n    &:last-child {\n        margin-left: auto;\n    }\n"]);return f=function(){return n},n}function h(){var n=Object(l.a)(["\n    list-style: none;\n    padding: 0;\n    margin: 0;\n    display: flex;\n    justify-content: flex-start;\n    align-items: center;\n"]);return h=function(){return n},n}function g(){var n=Object(l.a)(["\n    max-width: 1150px;\n    width: 1150px;\n    margin: 0 auto;\n    padding: 0 3rem;\n"]);return g=function(){return n},n}function b(){var n=Object(l.a)(["\n    min-height: 8vh;\n    display: flex;\n    justify-content: flex-start;\n    align-items: center;\n    background: white;\n    box-shadow: var(--shadow-light);\n"]);return b=function(){return n},n}var p=s.c.nav(b()),v=s.c.div(g()),x=s.c.ul(h()),w=s.c.li(f()),k=Object(s.c)(c.c).attrs({activeClassName:"active"})(d()),E=Object(s.c)(c.b)(m()),j=function(){return a.a.createElement(p,null,a.a.createElement(v,null,a.a.createElement(x,null,a.a.createElement(w,null,a.a.createElement(k,{to:"/tarefas"},"Tarefas")),a.a.createElement(w,null,a.a.createElement(k,{to:"/completas"},"Completas")),a.a.createElement(w,null,a.a.createElement(E,{to:"/tarefas/adicionar"},"Nova tarefa")))))};function y(){var n=Object(l.a)(["\n    max-width: 1150px;\n    margin: auto;\n"]);return y=function(){return n},n}var O=s.c.div(y()),C=function(n){var t=n.children;return a.a.createElement(O,null,t)},z=e(10),_=e(4),A=e.n(_);function S(){var n=Object(l.a)(["\n    color: var(--color-text-dark);\n    padding: 1rem;\n    text-align: center;\n    transition: all 0.4s ease-in-out;\n    outline: none;\n    font-weight: 600;\n    font-size: 1.4rem;\n\n    &:hover {\n        color: var(--color-primary-light);\n    }\n"]);return S=function(){return n},n}function T(){var n=Object(l.a)(["\n    color: var(--color-text-dark);\n    padding: 1rem;\n    text-align: center;\n    transition: all 0.4s ease-in-out;\n    outline: none;\n    font-weight: 600;\n    font-size: 1.4rem;\n\n    &:hover {\n        color: var(--color-primary-light);\n    }\n"]);return T=function(){return n},n}function F(){var n=Object(l.a)(["\n    color: var(--color-primary);\n    padding: 1rem;\n    text-align: center;\n    transition: all 0.4s ease-in-out;\n    outline: none;\n    font-weight: 600;\n    font-size: 1.4rem;\n\n    &:hover {\n        color: var(--color-primary-light);\n    }\n"]);return F=function(){return n},n}function B(){var n=Object(l.a)(["\n    color: var(--color-text-dark);\n    padding: 1rem;\n    text-align: center;\n    transition: all 0.4s ease-in-out;\n    outline: none;\n    font-weight: 600;\n    font-size: 1.4rem;\n\n    &:hover {\n        color: var(--color-primary-light);\n    }\n"]);return B=function(){return n},n}function J(){var n=Object(l.a)(["\n    color: var(--color-primary);\n    padding: 1rem;\n    text-align: center;\n    transition: all 0.4s ease-in-out;\n    outline: none;\n    font-weight: 600;\n    font-size: 1.4rem;\n\n    &:hover {\n        color: var(--color-primary-light);\n    }\n"]);return J=function(){return n},n}function L(){var n=Object(l.a)(["\n    color: white;\n    padding: 1rem;\n    text-align: center;\n    transition: all 0.4s ease-in-out;\n    outline: none;\n    font-weight: 600;\n    font-size: 1.4rem;\n    transition: all 0.4s ease-in-out;\n    width: 100%;\n    border-radius: 0 0 0.8rem 0.8rem;\n\n    &:hover {\n        color: white;\n        background: var(--color-primary-light);\n    }\n"]);return L=function(){return n},n}function M(){var n=Object(l.a)(["\n    display: flex;\n    justify-content: space-around;\n    align-items: center;\n    position: absolute;\n    padding: 0;\n    background: ",";\n    border-radius: 0 0 0.8rem 0.8rem;\n    bottom: 0;\n    left: 0%;\n    width: 100%;\n"]);return M=function(){return n},n}var N=s.c.div(M(),(function(n){return n.adicionar?"var(--color-primary)":"rgba(0, 0, 0, 0.06)"})),R=Object(s.c)(c.b)(L()),D=Object(s.c)(c.b)(J()),I=Object(s.c)(c.b)(B()),P=Object(s.c)(c.b)(F()),Y=Object(s.c)(c.b)(T()),q=Object(s.c)(c.b)(S());function G(){var n=Object(l.a)(["\n    margin: 0;\n    font-size: 1.6rem;\n    font-weight: 500;\n    color: var(--color-text);\n    overflow: hidden;\n    text-overflow: ellipsis;\n    -webkit-line-clamp: 5;\n    display: -webkit-box;\n    -webkit-box-orient: vertical;\n"]);return G=function(){return n},n}function H(){var n=Object(l.a)(["\n    color: var(--color-text-dark);\n    font-size: 1.8rem;\n    font-weight: 600;\n    margin: 0 0 1rem 0;\n    padding: 0;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    -webkit-line-clamp: 1;\n    display: -webkit-box;\n    -webkit-box-orient: vertical;\n"]);return H=function(){return n},n}function K(){var n=Object(l.a)(["\n    padding: 2rem;\n"]);return K=function(){return n},n}function Q(){var n=Object(l.a)(["\n    box-shadow: var(--shadow-light);\n    border-radius: 0.8rem;\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n    background: white;\n    transition: all 0.6s ease-in-out;\n    position: relative;\n    height: 25rem;\n\n    &:hover {\n        transform: translateY(-0.8rem);\n        box-shadow: var(--shadow-dark);\n    }\n"]);return Q=function(){return n},n}var U=s.c.div(Q()),V=Object(s.c)(c.b)(K()),W=s.c.h2(H()),X=s.c.p(G()),Z=function(n){var t=n.task;return a.a.createElement(U,null,a.a.createElement(V,{to:t.estado+"/detalhe/"+t.id},a.a.createElement(W,null,t.titulo),a.a.createElement(X,null,t.texto)),a.a.createElement(N,null,"completas"===t.estado?a.a.createElement(I,{onClick:function(n){A.a.delete("/tasksCompletas/"+t.id),window.location.reload()}},"Eliminar"):a.a.createElement(N,null,a.a.createElement(D,{onClick:function(n){A.a.post("/tasksCompletas",{id:t.id,titulo:t.titulo,texto:t.texto,estado:"completas"}),A.a.delete("/tasks/"+t.id),window.location.reload()}},"Completar"),a.a.createElement(I,{onClick:function(n){A.a.delete("/tasks/"+t.id),window.location.reload()}},"Eliminar"))))};function $(){var n=Object(l.a)(["\n    font-size: 2.4rem;\n    font-weight: 600;\n    color: var(--color-text-dark);\n    padding: 0 3rem;\n    margin: 4rem 0;\n"]);return $=function(){return n},n}var nn=s.c.h2($()),tn=function(n){var t=n.style,e=n.children;return a.a.createElement(nn,{style:t},e)};function en(){var n=Object(l.a)(["\n    width: 100%;\n    height: 100%;\n    border-radius: 6rem;\n    object-fit: cover;\n"]);return en=function(){return n},n}function rn(){var n=Object(l.a)(["\n    height: 25rem;\n    width: 25rem;\n    margin: 6rem auto;\n"]);return rn=function(){return n},n}var an=s.c.div(rn()),on=s.c.img(en()),cn=function(){return a.a.createElement(an,null,a.a.createElement(on,{src:e(62)}))};function ln(){var n=Object(l.a)(["\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));\n    gap: 3rem;\n    padding: 3rem;\n"]);return ln=function(){return n},n}var un=s.c.div(ln()),sn=function(n){var t=Object(r.useState)({tasks:[]}),e=Object(z.a)(t,2),o=e[0],i=e[1];return Object(r.useEffect)((function(){"tarefas"===n.match.params.estado&&A.a.get("/tasks").then((function(n){i({tasks:n.data})})),"completas"===n.match.params.estado&&A.a.get("/tasksCompletas").then((function(n){i({tasks:n.data})}))}),[n.match.params.estado]),a.a.createElement(C,null,"tarefas"===n.match.params.estado&&a.a.createElement(tn,null,"Listagem de todas as tarefas por completar"),"completas"===n.match.params.estado&&a.a.createElement(tn,null,"Listagem de todas as tarefas completas"),o.tasks.length>0?a.a.createElement(un,null,o.tasks.map((function(n){return a.a.createElement(Z,{task:n,key:n.id})}))):a.a.createElement(cn,null),console.log(o.tasks.length))},mn=e(16);function dn(){var n=Object(l.a)(["\n    height: 100%;\n    font-family: inherit;\n"]);return dn=function(){return n},n}function fn(){var n=Object(l.a)(["\n    font-size: 1.6rem;\n    color: var(--color-text);\n    width: 100%;\n    height: 4.5rem;\n    border-radius: 0.8rem;\n    border: 1px solid rgba(0, 0, 0, 0.15);\n    margin-top: 1rem;\n    font-size: 1.6rem;\n    padding: 1rem;\n    outline: none;\n    transition: all 0.6s ease-in-out;\n\n    &:hover {\n        border-color: var(--color-primary-light);\n    }\n"]);return fn=function(){return n},n}function hn(){var n=Object(l.a)(["\n    margin: 1rem 0 0 0;\n    font-size: 1.6rem;\n    color: var(--color-text);\n"]);return hn=function(){return n},n}function gn(){var n=Object(l.a)(["\n    font-size: 1.6rem;\n    font-weight: 600;\n    color: var(--color-text-dark);\n"]);return gn=function(){return n},n}function bn(){var n=Object(l.a)(["\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n    margin-bottom: 3rem;\n    width: 100%;\n\n    &:nth-child(2) {\n        padding-bottom: 4rem;\n    }\n"]);return bn=function(){return n},n}function pn(){var n=Object(l.a)(["\n    box-shadow: var(--shadow-light);\n    border-radius: 0.8rem;\n    width: 50rem;\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n    background: white;\n    position: relative;\n    padding: 3rem;\n    margin: 7rem auto;\n\n    @media (max-width: 31.25em) {\n        width: auto;\n        margin: 0 3rem;\n    }\n"]);return pn=function(){return n},n}var vn=s.c.form(pn()),xn=s.c.div(bn()),wn=s.c.label(gn()),kn=s.c.p(hn()),En=s.c.input.attrs({type:"text"})(fn()),jn=Object(s.c)(En).attrs({as:"textarea"})(dn()),yn=function(n){var t=Object(r.useState)({task:{}}),e=Object(z.a)(t,2),o=e[0],i=e[1],c=Object(r.useState)(!1),l=Object(z.a)(c,2),u=l[0],s=l[1];Object(r.useEffect)((function(){"tarefas"===n.match.params.estado&&A.a.get("/tasks/"+n.match.params.id).then((function(n){i({task:n.data})})),"completas"===n.match.params.estado&&A.a.get("/tasksCompletas/"+n.match.params.id).then((function(n){i({task:n.data})}))}),[n.match.params.estado,n.match.params.id]);return a.a.createElement(a.a.Fragment,null,u?a.a.createElement(tn,{style:{textAlign:"center"}},"Editar a tarefa"):a.a.createElement(tn,{style:{textAlign:"center"}},"Detalhe completo da tarefa"),a.a.createElement(vn,null,a.a.createElement(xn,null,a.a.createElement(wn,null,"T\xedtulo"),u?a.a.createElement(En,{value:o.task.titulo,onChange:function(n){return i({task:Object(mn.a)(Object(mn.a)({},o.task),{},{titulo:n.target.value})})}}):a.a.createElement(kn,null,o.task.titulo)),a.a.createElement(xn,null,a.a.createElement(wn,null,"Texto"),u?a.a.createElement(jn,{rows:"8",value:o.task.texto,onChange:function(n){return i({task:Object(mn.a)(Object(mn.a)({},o.task),{},{texto:n.target.value})})}}):a.a.createElement(kn,null,o.task.texto)),a.a.createElement(N,null,"completas"===o.task.estado?a.a.createElement(I,{to:"/completas",onClick:function(t){A.a.delete("/tasksCompletas/"+n.match.params.id)}},"Eliminar"):u?a.a.createElement(a.a.Fragment,null,a.a.createElement(P,{to:"#",onClick:function(){A.a.put("/tasks/"+n.match.params.id,o.task),s(!1)}},"Atualizar"),a.a.createElement(Y,{to:"#",onClick:function(){return s(!1)}},"Cancelar")):a.a.createElement(a.a.Fragment,null,a.a.createElement(D,{to:"/tarefas",onClick:function(t){A.a.post("/tasksCompletas",{id:o.task.id,titulo:o.task.titulo,texto:o.task.texto,estado:"completas"}),A.a.delete("/tasks/"+n.match.params.id)}},"Completar"),a.a.createElement(q,{to:"#",onClick:function(){return s(!0)}},"Editar"),a.a.createElement(I,{to:"/tarefas",onClick:function(){A.a.delete("/tasks/"+n.match.params.id)},w50:!0},"Eliminar")))))},On=e(65);function Cn(){var n=Object(l.a)(["\n    height: 100%;\n    font-family: inherit;\n"]);return Cn=function(){return n},n}function zn(){var n=Object(l.a)(["\n    font-size: 1.6rem;\n    color: var(--color-text);\n    width: 100%;\n    height: 4.5rem;\n    border-radius: 0.8rem;\n    border: 1px solid rgba(0, 0, 0, 0.15);\n    margin-top: 1rem;\n    padding: 1rem;\n    outline: none;\n    transition: all 0.6s ease-in-out;\n\n    &:hover {\n        border-color: var(--color-primary-light);\n    }\n"]);return zn=function(){return n},n}function _n(){var n=Object(l.a)(["\n    font-size: 1.6rem;\n    font-weight: 600;\n    color: var(--color-text-dark);\n"]);return _n=function(){return n},n}function An(){var n=Object(l.a)(["\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n    margin-bottom: 3rem;\n    width: 100%;\n\n    &:nth-child(2) {\n        padding-bottom: 4rem;\n    }\n"]);return An=function(){return n},n}function Sn(){var n=Object(l.a)(["\n    box-shadow: var(--shadow-light);\n    border-radius: 0.8rem;\n    width: 50rem;\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n    background: white;\n    position: relative;\n    padding: 3rem;\n    margin: 7rem auto;\n\n    @media (max-width: 31.25em) {\n        width: auto;\n        margin: 0 3rem;\n    }\n"]);return Sn=function(){return n},n}var Tn=s.c.form(Sn()),Fn=s.c.div(An()),Bn=s.c.label(_n()),Jn=s.c.input.attrs({type:"text"})(zn()),Ln=Object(s.c)(Jn).attrs({as:"textarea"})(Cn()),Mn=function(){var n=Object(r.useState)(""),t=Object(z.a)(n,2),e=t[0],o=t[1],i=Object(r.useState)(""),c=Object(z.a)(i,2),l=c[0],u=c[1];return a.a.createElement(a.a.Fragment,null,a.a.createElement(tn,{style:{textAlign:"center"}},"Adicionar uma nova tarefa"),a.a.createElement(Tn,null,a.a.createElement(Fn,null,a.a.createElement(Bn,null,"T\xedtulo"),a.a.createElement(Jn,{value:e,onChange:function(n){return o(n.target.value)}})),a.a.createElement(Fn,null,a.a.createElement(Bn,null,"Texto"),a.a.createElement(Ln,{rows:"8",value:l,onChange:function(n){return u(n.target.value)}})),a.a.createElement(N,{adicionar:!0},a.a.createElement(R,{to:"/tarefas",onClick:function(n){A.a.post("/tasks",{id:Object(On.a)(),titulo:e,texto:l,estado:"tarefas"}),window.location.href="/tarefas"}},"Adicionar"))))};function Nn(){var n=Object(l.a)(["\n    background: var(--color-bg);\n"]);return Nn=function(){return n},n}var Rn=s.c.div(Nn()),Dn=function(){return a.a.createElement(Rn,null,a.a.createElement(j,null),a.a.createElement(C,null,a.a.createElement(u.d,null,a.a.createElement(u.b,{path:"/",exact:!0,render:function(){return a.a.createElement(u.a,{to:"/tarefas"})}}),a.a.createElement(u.b,{path:"/:estado",exact:!0,component:sn}),a.a.createElement(u.b,{path:"/:estado/detalhe/:id",exact:!0,component:yn}),a.a.createElement(u.b,{path:"/tarefas/adicionar",exact:!0,component:Mn}))))},In={colors:{text:"#5b6f82",text_light:"#92a2b1",text_dark:"#202b36",bg:"#f6f6f6",bg_light:"#fbfafb",bg_dark:"#0A101B",primary:"#6c5ce7",primary_light:"#7b88ff",secondary:"#fdcb6e",secondary_light:"#fff3b1",success:"#28b859",error:"#ff6b76",warning:"#fabd42"},responsive:{smallest:"only screen and (max-width: 25em)",smaller:"only screen and (max-width: 31.25em)",small:"only screen and (max-width: 37.5em)",medium:"only screen and (max-width: 56.25em)",large:"only screen and (max-width: 80em)",larger:"only screen and (max-width: 90em)",largest:"only screen and (max-width: 97em)"},typo:{roboto:"'Roboto', sans-serif;",montserrat:"'Montserrat', sans-serif;",raleway:"'Raleway', sans-serif;",poppins:"'Poppins', sans-serif;"}};function Pn(){var n=Object(l.a)(["\n    * {\n      margin: 0;\n      padding: 0;\n    }\n\n    button {\n      cursor: pointer;\n    }\n\n    *,\n    *::before,\n    *::after {\n      box-sizing: inherit;\n      -webkit-font-smoothing: antialiased;\n      -moz-osx-font-smoothing: grayscale;\n    }\n\n    html {\n      font-size: 62.5%;\n      box-sizing: border-box;\n      --color-text: ",";\n      --color-text-light: ",";\n      --color-text-dark: ",";\n      --color-bg: ",";\n      --color-bg-light: ",";\n      --color-bg-dark: ",";\n      --color-primary: ",";\n      --color-primary-light: ",";\n      --color-secondary: ",";\n      --color-secondary-light: ",";\n      --color-success: ",";\n      --color-error: ",";\n      --color-warning: ",";\n      --shadow-light: 0 0.45rem 0.65rem #eee;\n      --shadow-dark: 0 0.3rem 0.5rem rgba(0, 0, 0, 0.1);\n\n      @media (min-width: 112.5em) {\n        font-size: 70%;\n      }\n\n      @media (max-width: 25em) {\n        font-size: 55%;\n      }\n    }\n\n    body {\n      font-family: ",";\n      font-weight: 400;\n      line-height: 1.6;\n      background: ",";\n    }\n\n    form,\n    input,\n    textarea,\n    button,\n    select,\n    a {\n      -webkit-tap-highlight-color: rgba(0,0,0,0);\n    }\n\n    a{\n      text-decoration: none;\n    }\n\n    a:hover{\n      transition: all 0.6s;\n      color: var(--color-primary-light);\n    }\n"]);return Pn=function(){return n},n}var Yn=Object(s.b)(Pn(),(function(n){return n.theme.colors.text}),(function(n){return n.theme.colors.text_light}),(function(n){return n.theme.colors.text_dark}),(function(n){return n.theme.colors.bg}),(function(n){return n.theme.colors.bg_light}),(function(n){return n.theme.colors.bg_dark}),(function(n){return n.theme.colors.primary}),(function(n){return n.theme.colors.primary_light}),(function(n){return n.theme.colors.secondary}),(function(n){return n.theme.colors.secondary_light}),(function(n){return n.theme.colors.success}),(function(n){return n.theme.colors.error}),(function(n){return n.theme.colors.warning}),(function(n){return n.theme.typo.montserrat}),(function(n){return n.theme.colors.bg}));i.a.render(a.a.createElement(a.a.StrictMode,null,a.a.createElement(s.a,{theme:In},a.a.createElement(c.a,null,a.a.createElement(Dn,null),a.a.createElement(Yn,null)))),document.getElementById("root"))}},[[36,1,2]]]);
  //# sourceMappingURL=main.6a9c096c.chunk.js.map