_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[29],{TsDr:function(e,r,t){"use strict";t.r(r);var n=t("q1tI"),a=t.n(n),i=t("yE/o"),o=t("gaPq"),c=t("h4VS"),l=t("wx14"),u=t("lTCR"),s=t.n(u),d=t("ikXu"),f=t("D1pA"),b=t("YFqc"),p=t.n(b),O=t("YRLc"),m=a.a.createElement;function h(){var e=Object(c.a)(["\n    query currencies($limit: Int, $offset: Int) {\n      currencies(limit: $limit, offset: $offset, includeInactive: true) {\n        _id\n        isoCode\n        isActive\n      }\n    }\n  "]);return h=function(){return e},e}var j=Object(O.b)({queryName:"currencies",query:s()(h())})((function(e){var r=Object(l.a)({},e);return m(O.a,Object(l.a)({},r,{cols:2,createPath:"/currencies/new",rowRenderer:function(e){return m(d.a.Row,{key:e._id},m(d.a.Cell,null,m(p.a,{href:"/currencies/edit?_id=".concat(e._id)},m("a",{href:"/currencies/edit?_id=".concat(e._id)},e.isoCode))),m(d.a.Cell,null,e.isActive&&m(f.a,{color:"green",name:"checkmark",size:"large"})))}}),m(d.a.Row,null,m(d.a.HeaderCell,null,"Code"),m(d.a.HeaderCell,null,"Active")))})),w=t("PZVx"),y=a.a.createElement;r.default=Object(w.a)((function(e){return y(o.a,e,y(i.a,null,y("h2",null,"Currencies"),y(j,null)))}))},YRLc:function(e,r,t){"use strict";t.d(r,"b",(function(){return v}));var n=t("KQm4"),a=t("rePB"),i=t("wx14"),o=t("Ff2n"),c=t("eHHv"),l=t("0dmp"),u=t("q1tI"),s=t.n(u),d=t("ikXu"),f=t("QetY"),b=t("D1pA"),p=t("RotF"),O=t.n(p),m=t("YFqc"),h=t.n(m),j=s.a.createElement;function w(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function y(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?w(Object(t),!0).forEach((function(r){Object(a.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.items,t=e.cols,n=void 0===t?4:t,a=e.rowRenderer,c=e.createPath,l=(e.data,e.children),u=e.loadMoreEntries,s=(e.loading,e.limit),p=Object(o.a)(e,["items","cols","rowRenderer","createPath","data","children","loadMoreEntries","loading","limit"]);return j(d.a,Object(i.a)({celled:!0},p),j(d.a.Header,null,j(d.a.Row,null,j(d.a.HeaderCell,{colSpan:n},c&&j(h.a,{href:c},j(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:c},j(b.a,{name:"plus"}),"Add")))),l),r&&j(O.a,{pageStart:0,element:"tbody",loadMore:u,hasMore:null===s||void 0===s||s},r.map(a)),j(d.a.Footer,{fullWidth:!0},j(d.a.Row,null,j(d.a.HeaderCell,{colSpan:n},c&&j(h.a,{href:c},j(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:c},j(b.a,{name:"plus"})," Add"))))))};var v=function(e){var r=e.query,t=e.queryName,i=e.itemsPerPage,u=void 0===i?5:i;return Object(c.a)(Object(l.a)(r,{options:function(e){var r=e.queryOptions,t=Object(o.a)(e,["queryOptions"]);return y({variables:y({offset:0,limit:u},t)},r)},props:function(e){var r=e.data,i=r.loading,c=r.fetchMore,l=r.stopPolling,u=Object(o.a)(r,["loading","fetchMore","stopPolling"]);return{loading:i,items:u[t],loadMoreEntries:function(){return l(),c({variables:{offset:u[t].length},updateQuery:function(e,r){var i=r.fetchMoreResult;return i?y(y({},e),{},Object(a.a)({},t,[].concat(Object(n.a)(e[t]),Object(n.a)(i[t])))):e}})}}}}))}},dy9b:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/currencies",function(){return t("TsDr")}])}},[["dy9b",0,2,5,1,3,4,7]]]);