_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[45],{ewmg:function(e,t,n){"use strict";n.r(t);var r=n("rePB"),a=n("nKUr"),c=n("Ff2n"),o=(n("q1tI"),n("yE/o")),u=n("gaPq"),i=n("wx14"),s=n("h4VS"),O=n("eHHv"),b=n("lTCR"),g=n.n(b),j=n("DI+Y"),p=n("20a2"),f=n("hePV"),l=n.n(f),w=n("gmoh"),d=n.n(w),y=n("fjVX"),h=n.n(y),P=n("oB+O"),v=n.n(P),m=n("7zkD"),_=n("PaXs");function S(){var e=Object(s.a)(["\n      mutation createLanguage($language: CreateLanguageInput!) {\n        createLanguage(language: $language) {\n          _id\n        }\n      }\n    "]);return S=function(){return e},e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=Object(O.a)(p.withRouter,Object(j.graphql)(g()(S()),{name:"createLanguage",options:{refetchQueries:["languages"]}}),Object(m.a)({isoCode:{type:String,optional:!1,label:"ISO Sprachcode"}}),Object(O.f)({onSubmitSuccess:function(e){var t=e.router;return function(e){var n=e.data.createLanguage;t.replace({pathname:"/languages/edit",query:{_id:n._id}})}},onSubmit:function(e){var t=e.createLanguage,n=e.schema;return function(e){var r=Object(i.a)({},e);return t({variables:{language:n.clean(r)}})}}}),_.a,Object(O.d)((function(e){e.createLanguage;return D({},Object(c.a)(e,["createLanguage"]))})),O.e)((function(e){return Object(a.jsxs)(v.a,D(D({},e),{},{children:[Object(a.jsx)(l.a,{name:"isoCode"}),Object(a.jsx)(h.a,{}),Object(a.jsx)(d.a,{value:"Add language",className:"primary"})]}))})),L=n("PZVx");function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=Object(L.a)((function(e){e.onSuccess;var t=Object(c.a)(e,["onSuccess"]);return Object(a.jsx)(u.a,k(k({},t),{},{children:Object(a.jsxs)(o.a,{children:[Object(a.jsx)("p",{children:"Add Language"}),Object(a.jsx)(E,{})]})}))}))},luF5:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/languages/new",function(){return n("ewmg")}])}},[["luF5",0,2,3,1,4,5,6,7]]]);