_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[31],{TsDr:function(e,r,t){"use strict";t.r(r);var n=t("q1tI"),a=t.n(n),o=t("yE/o"),i=t("gaPq"),c=t("h4VS"),l=t("wx14"),u=t("lTCR"),s=t.n(u),d=t("ikXu"),f=t("D1pA"),p=t("YFqc"),b=t.n(p),O=t("YRLc"),h=a.a.createElement;function m(){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 m=function(){return e},e}var j=Object(O.b)({queryName:"currencies",query:s()(m())})((function(e){var r=Object(l.a)({},e);return h(O.a,Object(l.a)({},r,{cols:2,createPath:"/currencies/new",rowRenderer:function(e){return h(d.a.Row,{key:e._id},h(d.a.Cell,null,h(b.a,{href:"/currencies/edit?_id=".concat(e._id)},h("a",{href:"/currencies/edit?_id=".concat(e._id)},e.isoCode))),h(d.a.Cell,null,e.isActive&&h(f.a,{color:"green",name:"checkmark",size:"large"})))}}),h(d.a.Row,null,h(d.a.HeaderCell,null,"Code"),h(d.a.HeaderCell,null,"Active")))})),w=t("PZVx"),y=a.a.createElement;r.default=Object(w.a)((function(e){return y(i.a,e,y(o.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"),o=t("wx14"),i=t("Ff2n"),c=t("eHHv"),l=t("DI+Y"),u=t("q1tI"),s=t.n(u),d=t("ikXu"),f=t("QetY"),p=t("D1pA"),b=t("RotF"),O=t.n(b),h=t("YFqc"),m=t.n(h),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}var v=function(e){var r=e.query,t=e.queryName,o=e.itemsPerPage,u=void 0===o?5:o;return Object(c.a)(Object(l.graphql)(r,{options:function(e){var r=e.queryOptions,t=Object(i.a)(e,["queryOptions"]);return y({variables:y({offset:0,limit:u},t)},r)},props:function(e){var r=e.data,o=r.loading,c=r.fetchMore,l=r.stopPolling,u=Object(i.a)(r,["loading","fetchMore","stopPolling"]);return{loading:o,items:u[t],loadMoreEntries:function(){return l(),c({variables:{offset:u[t].length},updateQuery:function(e,r){var o=r.fetchMoreResult;return o?y(y({},e),{},Object(a.a)({},t,[].concat(Object(n.a)(e[t]),Object(n.a)(o[t])))):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.searchComponent,u=(e.data,e.children),s=e.loadMoreEntries,b=(e.loading,e.limit),h=Object(i.a)(e,["items","cols","rowRenderer","createPath","searchComponent","data","children","loadMoreEntries","loading","limit"]);return j(d.a,Object(o.a)({celled:!0},h),j(d.a.Header,null,j(d.a.Row,null,j(d.a.HeaderCell,{colSpan:n},l&&l,c&&j(m.a,{href:c},j(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:c},j(p.a,{name:"plus"}),"Add")))),u),r&&j(O.a,{pageStart:0,element:"tbody",loadMore:s,hasMore:null===b||void 0===b||b},r.map(a)),j(d.a.Footer,{fullWidth:!0},j(d.a.Row,null,j(d.a.HeaderCell,{colSpan:n},c&&j(m.a,{href:c},j(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:c},j(p.a,{name:"plus"})," Add"))))))}},dy9b:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/currencies",function(){return t("TsDr")}])}},[["dy9b",0,2,3,1,4,5,8]]]);