(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{SIsR:function(t,e,n){"use strict";n.r(e);var r=n("Ff2n"),a=n("q1tI"),o=n.n(a),s=n("yE/o"),c=n("gaPq"),u=n("rePB"),i=n("wx14"),l=n("h4VS"),b=n("eHHv"),m=n("lTCR"),p=n.n(m),f=n("nOHt"),O=n("0dmp"),j=n("hePV"),w=n.n(j),d=n("gmoh"),y=n.n(d),v=n("fjVX"),P=n.n(v),h=n("oB+O"),S=n.n(h),g=n("7zkD"),_=n("PaXs"),A=o.a.createElement;function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(){var t=Object(l.a)(["\n      mutation create($assortment: CreateAssortmentInput!) {\n        createAssortment(assortment: $assortment) {\n          _id\n        }\n      }\n    "]);return R=function(){return t},t}var B=Object(b.a)(f.withRouter,Object(O.a)(p()(R()),{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(t){var e=t.router;return function(t){var n=t.data.createAssortment;e.replace({pathname:"/assortments/edit",query:{_id:n._id}})}},onSubmit:function(t){var e=t.createAssortment,n=t.schema;return function(t){var r=Object(i.a)({},t);return e({variables:{assortment:n.clean(r)}})}}}),_.a,Object(b.d)((function(t){t.createAssortment;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){Object(u.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(r.a)(t,["createAssortment"]))})))((function(t){return A(S.a,t,A(P.a,null),A(w.a,{name:"title"}),A(w.a,{name:"isRoot"}),A(y.a,{value:"Add assortment",className:"primary"}))})),D=n("PZVx"),V=o.a.createElement;e.default=Object(D.a)((function(t){t.onSuccess;var e=Object(r.a)(t,["onSuccess"]);return V(c.a,e,V(s.a,null,V("p",null,"New assortment"),V(B,null)))}))},rBSb:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/assortments/new",function(){return n("SIsR")}])}},[["rBSb",0,2,5,1,3,4,6]]]);