(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{"3RP3":function(e,r,n){"use strict";n.r(r);var t=n("q1tI"),a=n.n(t),o=n("yE/o"),l=n("gaPq"),i=n("h4VS"),c=n("wx14"),u=n("lTCR"),d=n.n(u),s=n("ikXu"),f=n("D1pA"),p=n("YFqc"),b=n.n(p),v=n("YRLc"),h=a.a.createElement;function y(){var e=Object(i.a)(["\n    query deliveryProviders {\n      deliveryProviders {\n        _id\n        type\n        configurationError\n        interface {\n          _id\n          label\n          version\n        }\n      }\n    }\n  "]);return y=function(){return e},e}var O=Object(v.b)({queryName:"deliveryProviders",query:d()(y())})((function(e){var r=Object(c.a)({},e);return h(v.a,Object(c.a)({},r,{cols:4,createPath:"/delivery-providers/new",rowRenderer:function(e){return h(s.a.Row,{key:e._id},h(s.a.Cell,null,h(b.a,{href:"/delivery-providers/edit?_id=".concat(e._id)},h("a",{href:"/delivery-providers/edit?_id=".concat(e._id)},e._id))),h(s.a.Cell,null,e.type),e.interface?h(s.a.Cell,null,e.interface.label," ",e.interface.version):h(s.a.Cell,null,"Invalid Interface"),h(s.a.Cell,null,e.configurationError&&h("span",null,h(f.a,{color:"red",name:"close"}),"Configuration Errors")))}}),h(s.a.Row,null,h(s.a.HeaderCell,null,"Configuration"),h(s.a.HeaderCell,null,"Type"),h(s.a.HeaderCell,null,"Interface"),h(s.a.HeaderCell,null,"Problems")))})),w=n("PZVx"),m=a.a.createElement;r.default=Object(w.a)((function(e){return m(l.a,e,m(o.a,null,m("h2",null,"Delivery"),m(O,null)))}))},YRLc:function(e,r,n){"use strict";n.d(r,"b",(function(){return g}));var t=n("KQm4"),a=n("rePB"),o=n("wx14"),l=n("Ff2n"),i=n("eHHv"),c=n("0dmp"),u=n("q1tI"),d=n.n(u),s=n("ikXu"),f=n("QetY"),p=n("D1pA"),b=n("NrgV"),v=n("RotF"),h=n.n(v),y=n("YFqc"),O=n.n(y),w=d.a.createElement;function m(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function P(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?m(Object(n),!0).forEach((function(r){Object(a.a)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}r.a=function(e){var r=e.items,n=e.cols,t=void 0===n?4:n,a=e.rowRenderer,i=e.createPath,c=(e.data,e.children),u=e.loadMoreEntries,d=(e.updateHasMore,e.hasMore),v=(e.loading,Object(l.a)(e,["items","cols","rowRenderer","createPath","data","children","loadMoreEntries","updateHasMore","hasMore","loading"]));return w(s.a,Object(o.a)({celled:!0},v),w(s.a.Header,null,w(s.a.Row,null,w(s.a.HeaderCell,{colSpan:t},i&&w(O.a,{href:i},w(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:i},w(p.a,{name:"plus"}),"Add")))),c),r&&w(h.a,{pageStart:0,element:"tbody",loadMore:u,hasMore:d,loader:w(s.a.Row,null,w(s.a.Cell,{colSpan:t},w(b.a,{active:!0,inline:"centered"})))},r.map(a)),w(s.a.Footer,{fullWidth:!0},w(s.a.Row,null,w(s.a.HeaderCell,{colSpan:t},i&&w(O.a,{href:i},w(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:i},w(p.a,{name:"plus"})," Add"))))))},Array.prototype.diff=function(e){return this.filter((function(r){return-1!==e.indexOf(r)}))};var g=function(e){var r=e.query,n=e.queryName,a=e.queryOptions,o=e.itemsPerPage,u=void 0===o?5:o;return Object(i.a)(Object(i.h)("hasMore","updateHasMore",!0),Object(c.a)(r,{options:function(e){e.hasMore,e.updateHasMore;var r=Object(l.a)(e,["hasMore","updateHasMore"]);return P({variables:P({offset:0,limit:u},r)},a)},props:function(e){var r=e.data,a=r.loading,o=r.fetchMore,i=Object(l.a)(r,["loading","fetchMore"]),c=e.ownProps,d=c.updateHasMore,s=c.hasMore;return{loading:a,hasMore:!(i[n]&&u>i[n].length)&&s,items:i[n],loadMoreEntries:function(){return o({variables:{offset:Math.floor(i[n].length/u)*u,limit:u},updateQuery:function(e,r){var a=r.fetchMoreResult;if(!a||0===a[n].length)return d(!1),e;var o=e[n].map((function(e){return e._id})),l=a[n].filter((function(e){return-1===o.indexOf(e._id)}));if(0===l.length)return d(!1),e;var i={};return i[n]=[].concat(Object(t.a)(e[n]),Object(t.a)(l)),P({},e,{},i)}})}}}}))}},kZFp:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/delivery-providers",function(){return n("3RP3")}])}},[["kZFp",0,2,5,1,3,4,7]]]);