_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[27],{SIsR:function(e,t,r){"use strict";r.r(t);var n=r("rePB"),o=r("nKUr"),c=r("Ff2n"),s=(r("q1tI"),r("yE/o")),a=r("gaPq"),i=r("wx14"),u=r("h4VS"),b=r("eHHv"),O=r("lTCR"),j=r.n(O),p=r("20a2"),f=r("DI+Y"),l=r("hePV"),m=r.n(l),y=r("gmoh"),w=r.n(y),d=r("fjVX"),P=r.n(d),h=r("oB+O"),v=r.n(h),g=r("7zkD"),S=r("PaXs");function _(){var e=Object(u.a)(["\n      mutation create($assortment: CreateAssortmentInput!) {\n        createAssortment(assortment: $assortment) {\n          _id\n        }\n      }\n    "]);return _=function(){return e},e}function x(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?x(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=Object(b.a)(p.withRouter,Object(f.graphql)(j()(_()),{name:"createAssortment",options:{refetchQueries:["assortments"]}}),Object(g.a)({title:{type:String,optional:!1,label:"Title"},isRoot:{type:Boolean,optional:!1,defaultValue:!0,label:"Root node"}}),Object(b.f)({onSubmitSuccess:function(e){var t=e.router;return function(e){var r=e.data.createAssortment;t.replace({pathname:"/assortments/edit",query:{_id:r._id}})}},onSubmit:function(e){var t=e.createAssortment,r=e.schema;return function(e){var n=Object(i.a)({},e);return t({variables:{assortment:r.clean(n)}})}}}),S.a,Object(b.d)((function(e){e.createAssortment;return D({},Object(c.a)(e,["createAssortment"]))})))((function(e){return Object(o.jsxs)(v.a,D(D({},e),{},{children:[Object(o.jsx)(P.a,{}),Object(o.jsx)(m.a,{name:"title"}),Object(o.jsx)(m.a,{name:"isRoot"}),Object(o.jsx)(w.a,{value:"Add assortment",className:"primary"})]}))})),A=r("PZVx");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 R(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}t.default=Object(A.a)((function(e){e.onSuccess;var t=Object(c.a)(e,["onSuccess"]);return Object(o.jsx)(a.a,R(R({},t),{},{children:Object(o.jsxs)(s.a,{children:[Object(o.jsx)("p",{children:"New assortment"}),Object(o.jsx)(E,{})]})}))}))},rBSb:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/assortments/new",function(){return r("SIsR")}])}},[["rBSb",0,2,3,1,4,5,6,7]]]);