_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[32],{SIsR:function(e,t,r){"use strict";r.r(t);var n=r("rePB"),c=r("nKUr"),o=r("Ff2n"),s=(r("q1tI"),r("yE/o")),a=r("gaPq"),i=r("wx14"),u=r("h4VS"),b=r("eHHv"),O=r("UYTu"),j=r("20a2"),p=r("JznV"),f=r("hePV"),l=r.n(f),m=r("gmoh"),y=r.n(m),w=r("fjVX"),d=r.n(w),P=r("oB+O"),h=r.n(P),v=r("7zkD"),g=r("PaXs");function S(){var e=Object(u.a)(["\n      mutation create($assortment: CreateAssortmentInput!) {\n        createAssortment(assortment: $assortment) {\n          _id\n        }\n      }\n    "]);return S=function(){return e},e}function _(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?_(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=Object(b.a)(j.withRouter,Object(p.a)(Object(O.a)(S()),{name:"createAssortment",options:{refetchQueries:["assortments"]}}),Object(v.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)}})}}}),g.a,Object(b.d)((function(e){e.createAssortment;return x({},Object(o.a)(e,["createAssortment"]))})))((function(e){return Object(c.jsxs)(h.a,x(x({},e),{},{children:[Object(c.jsx)(d.a,{}),Object(c.jsx)(l.a,{name:"title"}),Object(c.jsx)(l.a,{name:"isRoot"}),Object(c.jsx)(y.a,{value:"Add assortment",className:"primary"})]}))})),D=r("PZVx");function A(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?A(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.default=Object(D.a)((function(e){e.onSuccess;var t=Object(o.a)(e,["onSuccess"]);return Object(c.jsx)(a.a,N(N({},t),{},{children:Object(c.jsxs)(s.a,{children:[Object(c.jsx)("p",{children:"New assortment"}),Object(c.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]]]);