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