_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[35],{"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("UYTu"),s=r("20a2"),p=r("JznV"),f=r("hePV"),y=r.n(f),l=r("gmoh"),w=r.n(l),d=r("fjVX"),P=r.n(d),h=r("oB+O"),v=r.n(h),g=r("7zkD"),m=r("PaXs");function _(){var e=Object(O.a)(["\n      mutation create($country: CreateCountryInput!) {\n        createCountry(country: $country) {\n          _id\n        }\n      }\n    "]);return _=function(){return e},e}function C(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=Object(b.a)(s.withRouter,Object(p.a)(Object(j.a)(_()),{name:"createCountry",options:{refetchQueries:["countries"]}}),Object(g.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)}})}}}),m.a,Object(b.d)((function(e){e.createCountry;return N({},Object(a.a)(e,["createCountry"]))})))((function(e){return Object(c.jsxs)(v.a,N(N({},e),{},{children:[Object(c.jsx)(y.a,{name:"isoCode"}),Object(c.jsx)(P.a,{}),Object(c.jsx)(w.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 D(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,D(D({},e),{},{children:Object(c.jsxs)(o.a,{children:[Object(c.jsx)("p",{children:"New country"}),Object(c.jsx)(x,{})]})}))}))}},[["3Kj1",0,2,3,1,4,5,6,7]]]);