(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{"5pHj":function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/payment-providers",function(){return n("Y4bP")}])},Y4bP: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),h=n("YRLc"),y=a.a.createElement;function m(){var e=Object(i.a)(["\n    query paymentProviders {\n      paymentProviders {\n        _id\n        type\n        configurationError\n        interface {\n          _id\n          label\n          version\n        }\n      }\n    }\n  "]);return m=function(){return e},e}var O=Object(h.b)({queryName:"paymentProviders",query:d()(m())})((function(e){var r=Object(c.a)({},e);return y(h.a,Object(c.a)({},r,{cols:4,createPath:"/payment-providers/new",rowRenderer:function(e){return y(s.a.Row,{key:e._id},y(s.a.Cell,null,y(b.a,{href:"/payment-providers/edit?_id=".concat(e._id)},y("a",{href:"/payment-providers/edit?_id=".concat(e._id)},e._id))),y(s.a.Cell,null,e.type),y(s.a.Cell,null,e.interface&&e.interface.label,"\xa0",e.interface&&e.interface.version),y(s.a.Cell,null,e.configurationError&&y("span",null,y(f.a,{color:"red",name:"close"}),"Configuration Errors")))}}),y(s.a.Row,null,y(s.a.HeaderCell,null,"Configuration"),y(s.a.HeaderCell,null,"Type"),y(s.a.HeaderCell,null,"Interface"),y(s.a.HeaderCell,null,"Problems")))})),v=n("PZVx"),j=a.a.createElement;r.default=Object(v.a)((function(e){return j(l.a,e,j(o.a,null,j("h2",null,"Payments"),j(O,null)))}))},YRLc:function(e,r,n){"use strict";n.d(r,"b",(function(){return P}));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"),h=n("RotF"),y=n.n(h),m=n("YFqc"),O=n.n(m),v=d.a.createElement;function j(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 w(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?j(Object(n),!0).forEach((function(r){Object(a.a)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(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),h=(e.loading,Object(l.a)(e,["items","cols","rowRenderer","createPath","data","children","loadMoreEntries","updateHasMore","hasMore","loading"]));return v(s.a,Object(o.a)({celled:!0},h),v(s.a.Header,null,v(s.a.Row,null,v(s.a.HeaderCell,{colSpan:t},i&&v(O.a,{href:i},v(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:i},v(p.a,{name:"plus"}),"Add")))),c),r&&v(y.a,{pageStart:0,element:"tbody",loadMore:u,hasMore:d,loader:v(s.a.Row,null,v(s.a.Cell,{colSpan:t},v(b.a,{active:!0,inline:"centered"})))},r.map(a)),v(s.a.Footer,{fullWidth:!0},v(s.a.Row,null,v(s.a.HeaderCell,{colSpan:t},i&&v(O.a,{href:i},v(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:i},v(p.a,{name:"plus"})," Add"))))))},Array.prototype.diff=function(e){return this.filter((function(r){return-1!==e.indexOf(r)}))};var P=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 w({variables:w({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)),w({},e,{},i)}})}}}}))}}},[["5pHj",0,2,5,1,3,4,7]]]);