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