(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{"3oBh":function(e,a,n){"use strict";var t=n("pLtp"),u=n.n(t),r=n("eHHv");a.a=function(e){return Object(r.g)(function(a){return{model:function e(a){var n={};return u()(a).forEach(function(t){var u=a[t];u&&"object"===typeof u&&(n[t]=e(u)),null!==u&&(n[t]=u)}),n}(e(a))}})}},"U+1f":function(e,a,n){"use strict";n.r(a);var t=n("qNsG"),u=n("q1tI"),r=n.n(u),c=n("nOHt"),o=n("yE/o"),g=n("gaPq"),i=n("zrwo"),l=n("kOwS"),d=n("ln6h"),s=n.n(d),f=n("O40h"),m=n("rt45"),v=n("GGqY"),b=n("eHHv"),p=n("3mGJ"),O=n("QetY"),j=n("lTCR"),I=n.n(j),h=n("4KRT"),E=n("hePV"),w=n.n(E),S=n("gmoh"),y=n.n(S),L=n("fjVX"),_=n.n(L),k=n("oB+O"),C=n.n(k),D=n("7zkD"),$=n("3oBh"),P=n("PaXs");function q(){var e=Object(m.a)(["\n      mutation removeLanguage($languageId: ID!) {\n        removeLanguage(languageId: $languageId) {\n          _id\n        }\n      }\n    "]);return q=function(){return e},e}function T(){var e=Object(m.a)(["\n      mutation updateLanguage(\n        $language: UpdateLanguageInput!\n        $languageId: ID!\n      ) {\n        updateLanguage(language: $language, languageId: $languageId) {\n          _id\n          isoCode\n          isActive\n        }\n      }\n    "]);return T=function(){return e},e}function A(){var e=Object(m.a)(["\n    query language($languageId: ID!) {\n      language(languageId: $languageId) {\n        _id\n        isoCode\n        isActive\n        name\n      }\n    }\n  "]);return A=function(){return e},e}var H=Object(b.a)(c.withRouter,Object(h.c)(I()(A())),Object(h.c)(I()(T()),{options:{refetchQueries:["languages","language"]}}),Object(h.c)(I()(q()),{name:"removeLanguage",options:{refetchQueries:["languages"]}}),Object(D.a)({isoCode:{type:String,optional:!1,label:"ISO Sprachcode"},isActive:{type:Boolean,optional:!1,label:"Active"}}),Object($.a)(function(e){var a=e.data.language;return void 0===a?{}:a}),Object(b.f)({onSubmitSuccess:function(){return function(){Object(v.b)("Texts saved to database",{type:v.b.TYPE.SUCCESS})}},removeLanguage:function(e){var a=e.router,n=e.languageId,t=e.removeLanguage;return function(){var e=Object(f.default)(s.a.mark(function e(u){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u.preventDefault(),a.replace({pathname:"/languages"}),e.next=4,t({variables:{languageId:n}});case 4:case"end":return e.stop()}},e)}));return function(a){return e.apply(this,arguments)}}()},onSubmit:function(e){var a=e.languageId,n=e.mutate,t=e.schema;return function(e){var u=Object(l.a)({},e);return n({variables:{language:t.clean(u),languageId:a}})}}}),P.a,Object(b.d)(function(e){e.languageId,e.mutate,e.data;var a=Object(t.a)(e,["languageId","mutate","data"]);return Object(i.a)({},a)}))(function(e){var a=e.removeLanguage,n=Object(t.a)(e,["removeLanguage"]);return r.a.createElement(o.a,null,r.a.createElement(C.a,n,r.a.createElement(p.a,{attached:"bottom"},r.a.createElement(w.a,{name:"isoCode"}),r.a.createElement(w.a,{name:"isActive"}),r.a.createElement(_.a,null),r.a.createElement(y.a,{value:"Save",className:"primary"}),r.a.createElement(O.a,{type:"normal",secondary:!0,floated:"right",onClick:a},"Delete"))))}),x=n("PZVx");a.default=Object(x.a)(Object(c.withRouter)(function(e){var a=e.router,n=Object(t.a)(e,["router"]);return r.a.createElement(g.a,n,r.a.createElement(o.a,null,r.a.createElement(H,{languageId:a.query._id})))}))},kSDg:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/languages/edit",function(){var e=n("U+1f");return{page:e.default||e}}])}},[["kSDg",1,0]]]);