(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{SIsR:function(e,t,n){"use strict";n.r(t);var a=n("qNsG"),r=n("q1tI"),o=n.n(r),s=n("yE/o"),c=n("gaPq"),u=n("zrwo"),i=n("kOwS"),l=n("rt45"),m=n("eHHv"),b=n("lTCR"),f=n.n(b),p=n("nOHt"),d=n("4KRT"),w=n("hePV"),O=n.n(w),v=n("gmoh"),j=n.n(v),E=n("fjVX"),S=n.n(E),_=n("oB+O"),h=n.n(_),A=n("7zkD"),R=n("PaXs");function P(){var e=Object(l.a)(["\n      mutation create($assortment: CreateAssortmentInput!) {\n        createAssortment(assortment: $assortment) {\n          _id\n        }\n      }\n    "]);return P=function(){return e},e}var y=Object(m.a)(p.withRouter,Object(d.c)(f()(P()),{name:"createAssortment",options:{refetchQueries:["assortments"]}}),Object(A.a)({title:{type:String,optional:!1,label:"Title"},isRoot:{type:Boolean,optional:!1,defaultValue:!0,label:"Root node"}}),Object(m.f)({onSubmitSuccess:function(e){var t=e.router;return function(e){var n=e.data.createAssortment;t.replace({pathname:"/assortments/edit",query:{_id:n._id}})}},onSubmit:function(e){var t=e.createAssortment,n=e.schema;return function(e){var a=Object(i.a)({},e);return t({variables:{assortment:n.clean(a)}})}}}),R.a,Object(m.d)(function(e){e.createAssortment;var t=Object(a.a)(e,["createAssortment"]);return Object(u.a)({},t)}))(function(e){return o.a.createElement(h.a,e,o.a.createElement(S.a,null),o.a.createElement(O.a,{name:"title"}),o.a.createElement(O.a,{name:"isRoot"}),o.a.createElement(j.a,{value:"Add assortment",className:"primary"}))}),N=n("PZVx");t.default=Object(N.a)(function(e){e.onSuccess;var t=Object(a.a)(e,["onSuccess"]);return o.a.createElement(c.a,t,o.a.createElement(s.a,null,o.a.createElement("p",null,"New assortment"),o.a.createElement(y,null)))})},rBSb:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/assortments/new",function(){var e=n("SIsR");return{page:e.default||e}}])}},[["rBSb",1,0]]]);