_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[33],{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("lTCR"),p=t.n(j),f=t("DI+Y"),y=t("hePV"),l=t.n(y),w=t("gmoh"),d=t.n(w),h=t("fjVX"),P=t.n(h),g=t("oB+O"),v=t.n(g),m=t("7zkD"),_=t("PaXs");function C(){var e=Object(s.a)(["\n      mutation createCurrency($currency: CreateCurrencyInput!) {\n        createCurrency(currency: $currency) {\n          _id\n        }\n      }\n    "]);return C=function(){return e},e}function D(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 S(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?D(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var x=Object(b.a)(O.withRouter,Object(f.graphql)(p()(C()),{name:"createCurrency",options:{refetchQueries:["currencies"]}}),Object(m.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)}})}}}),_.a,Object(b.d)((function(e){e.createCurrency;return S({},Object(o.a)(e,["createCurrency"]))})))((function(e){return Object(c.jsxs)(v.a,S(S({},e),{},{children:[Object(c.jsx)(l.a,{name:"isoCode"}),Object(c.jsx)(P.a,{}),Object(c.jsx)(d.a,{value:"Add currency",className:"primary"})]}))})),E=t("PZVx");function N(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 k(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?N(Object(t),!0).forEach((function(r){Object(n.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.default=Object(E.a)((function(e){e.onSuccess;var r=Object(o.a)(e,["onSuccess"]);return Object(c.jsx)(a.a,k(k({},r),{},{children:Object(c.jsxs)(u.a,{children:[Object(c.jsx)("p",{children:"New currency"}),Object(c.jsx)(x,{})]})}))}))},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]]]);