text: (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{3:function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"e",(function(){return i})),r.d(t,"h",(function(){return s})),r.d(t,"g",(function(){return d.a})),r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return m})),r.d(t,"m",(function(){return p})),r.d(t,"c",(function(){return g})),r.d(t,"f",(function(){return w})),r.d(t,"l",(function(){return _})),r.d(t,"k",(function(){return N})),r.d(t,"j",(function(){return S})),r.d(t,"n",(function(){return x})),r.d(t,"o",(function(){return T})),r.d(t,"i",(function(){return X}));var n=r(1),a=r.n(n);function l(e){var t=e.action,r=void 0===t?null:t,n=e.children,l=e.classes,c=void 0===l?"":l,o=e.disabled,i=void 0!==o&&o,u=e.type,s=void 0===u?"button":u,d=e.id,m=void 0===d?"":d,p=c;return i&&(p="".concat(c," disabled")),a.a.createElement("button",{disabled:i,type:s,className:"btn ".concat(p),id:m,onClick:function(e){e.preventDefault(),r&&r()}},n)}var c=r(53);function o(e){var t=e.message,r=function(){return a.a.createElement("p",{className:"error-message"},a.a.createElement("span",null,a.a.createElement(c.a,null)),t)},n=function(){return null};switch(e.type){case"error":return a.a.createElement(r,null);case"popup":return a.a.createElement(n,null);default:return null}}function i(e){var t=e.label,r=e.placeholder,n=e.type,l=void 0===n?"text":n,c=e.icon,i=e.id,u=void 0===i?"":i,s=e.size,d=void 0===s?"":s,m=e.controlled,p=void 0!==m&&m,f=e.value,b=void 0===f?"":f,v=e.handleChange,g=e.name,h=void 0===g?null:g,y=e.error,E=e.disabled,O=void 0!==E&&E,j=e.rounded,w=void 0!==j&&j;return a.a.createElement("div",{className:"file"===l?"input-group ".concat(d," input-file-group"):"input-group ".concat(d)},t&&a.a.createElement("label",{htmlFor:h},t),p?a.a.createElement("input",{type:l,name:h,id:u,placeholder:r,value:b,onChange:v,className:w?"input-rounded":null,disabled:O}):a.a.createElement("input",{type:l,name:h,id:h,placeholder:r,ref:v,className:w?"input-rounded":null,disabled:O}),c&&a.a.createElement("span",{className:"input-icon"},c),y&&a.a.createElement(o,{message:y,type:"error"}))}var u=r(11);function s(e){var t=e.size,r=void 0===t?"lg":t,n=e.link,l=void 0===n?"/":n;return a.a.createElement("h1",{className:"logo ".concat(r)},a.a.createElement(u.b,{to:l,className:r},"sm"===r?"Pay":"PayMySchoolFees"))}var d=r(21);function m(e){var t=e.label,r=e.handleChange,n=e.name,l=void 0===n?null:n,c=e.disabled,o=void 0!==c&&c;return a.a.createElement("div",{className:"input-group checkbox"},a.a.createElement("input",{type:"checkBox",id:l,name:l,ref:r,disabled:o}),t&&a.a.createElement("label",{htmlFor:l,style:{display:"inline"}},t))}function p(e){var t=e.label,r=e.placeholder,n=e.icon,l=e.size,c=void 0===l?"":l,i=e.handleChange,u=e.name,s=void 0===u?null:u,d=e.error,m=e.disabled,p=void 0!==m&&m,f=e.options,b=e.rounded,v=e.newValue;return a.a.createElement("div",{className:"input-group ".concat(c)},t&&a.a.createElement("label",{htmlFor:s},t),a.a.createElement("select",{name:s,ref:i,disabled:p,className:b?"select-rounded":"",defaultValue:"placeholder"},r&&a.a.createElement("option",{disabled:!0},r),f?f.map((function(e){return a.a.createElement("option",{key:e.id,value:e[v]||e.id},e.name)})):null),n&&a.a.createElement("span",{className:"input-icon"},n),d&&a.a.createElement(o,{message:d,type:"error"}))}var f=r(69),b=r.n(f),v=r(8);function g(e){var t=e.figure,r=e.label,n=e.prefix,l=e.thousand,c=Object(f.useCountUp)({end:t,prefix:n}).countUp;return a.a.createElement("div",{className:"dashboard-card"},a.a.createElement("h3",null,l?Object(v.e)(c):a.a.createElement(b.a,{end:t,prefix:n||null})),a.a.createElement("div",{className:"line"}),a.a.createElement("h4",null,r))}var h=r(7),y=r.n(h);function E(e,t,r,n,a,l,c){try{var o=e[l](c),i=o.value}catch(e){return void r(e)}o.done?t(i):Promise.resolve(i).then(n,a)}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,l=void 0;try{for(var c,o=e[Symbol.iterator]();!(n=(c=o.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){a=!0,l=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw l}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e){var t=e.children,r=e.size,c=e.listItems,o=e.card,i=e.pagination,u=e.disableLoading,s=void 0!==u&&u,m=Object(v.c)().get;Object(n.useEffect)((function(){i&&i.status?Object.keys(c).length>0&&S(c):b(c)}),[c]);var p=O(Object(n.useState)([]),2),f=p[0],b=p[1],g=O(Object(n.useState)({current_page:"",last_page:"",next_page_url:"",prev_page_url:""}),2),h=g[0],j=g[1],w=O(Object(n.useState)(!1),2),_=w[0],N=w[1];function S(e){var t=e.current_page,r=e.last_page,n=e.next_page_url,a=e.prev_page_url,l=i.structure(f.length>0?f.concat(e.data):e.data);b(l),j({current_page:t,last_page:r,next_page_url:n,prev_page_url:a})}function x(){var e=function(){var e,t=(e=y.a.mark((function e(){var t,r,n;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,m(h.next_page_url,i.accessToken);case 3:t=e.sent,r=i.loadMoreDistructure?i.loadMoreDistructure(t.data):t.data,console.log(r),N(!1),S(r),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),n=e.t0.response,console.error(n);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})),function(){var t=this,r=arguments;return new Promise((function(n,a){var l=e.apply(t,r);function c(e){E(l,n,a,c,o,"next",e)}function o(e){E(l,n,a,c,o,"throw",e)}c(void 0)}))});return function(){return t.apply(this,arguments)}}();h.current_page!=h.last_page&&(N(!0),e())}return a.a.createElement("ul",{onScroll:function(e){e.target.scrollHeight-e.target.scrollTop===e.target.clientHeight&&x()},className:o?"list-group list-card":"list-group"},t,f&&f.length>0?f.map((function(e){var t=e.id,n=e.label,c=e.additionalData,o=e.button;return a.a.createElement("li",{className:"list-item ".concat(r),key:t},a.a.createElement("div",{className:"main"},n&&a.a.createElement("span",{className:"label"},n),o&&a.a.createElement(l,{classes:!0},o)),a.a.createElement("div",{className:"additional-data"},c?c.map((function(e,t){return a.a.createElement("span",{className:"additional-data-item",key:t},e)})):null))})):s?null:a.a.createElement(d.a,{color:"primary",size:"lg",relative:!0}),_&&a.a.createElement("li",{className:"loading-container"},a.a.createElement(d.a,{color:"primary",size:"md",relative:!0})))}function _(e){var t=e.children;return a.a.createElement("h1",{className:"page-heading"},t)}function N(e){var t=e.children;return a.a.createElement("div",{className:"page-header"},t)}function S(e){var t=e.children;return a.a.createElement("div",{className:"page-content"},t)}function x(e){var t=e.children;return a.a.createElement("h5",{className:"sub-heading"},t)}var k=r(6);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){A(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I(e,t,r,n,a,l,c){try{var o=e[l](c),i=o.value}catch(e){return void r(e)}o.done?t(i):Promise.resolve(i).then(n,a)}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,l=void 0;try{for(var c,o=e[Symbol.iterator]();!(n=(c=o.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){a=!0,l=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw l}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function T(e){var t=e.heading,r=e.body,c=e.search,o=e.url,u=e.pagination,s=Object(v.c)().get,m=Object(k.g)();Object(n.useEffect)((function(){u&&u.status?Object.keys(r).length>0&&_(r):b(r)}),[r]);var p=z(Object(n.useState)([]),2),f=p[0],b=p[1],g=z(Object(n.useState)({current_page:"",last_page:"",next_page_url:"",prev_page_url:""}),2),h=g[0],E=g[1],O=z(Object(n.useState)(!1),2),j=O[0],w=O[1];function _(e){var t=e.current_page,r=e.last_page,n=e.next_page_url,a=e.prev_page_url,l=u.structure(e.data);e.refresh?b(l):b(f.concat(l)),E({current_page:t,last_page:r,next_page_url:n,prev_page_url:a})}function N(){var e=function(){var e,t=(e=y.a.mark((function e(){var t,r;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s(h.next_page_url,u.accessToken);case 3:t=e.sent,r=t.data,w(!1),_(P(P({},r),{},{refresh:!1})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),console.error(e.t0.response);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})),function(){var t=this,r=arguments;return new Promise((function(n,a){var l=e.apply(t,r);function c(e){I(l,n,a,c,o,"next",e)}function o(e){I(l,n,a,c,o,"throw",e)}c(void 0)}))});return function(){return t.apply(this,arguments)}}();h.current_page!=h.last_page&&(w(!0),e())}var S=function(){return Object.keys(r).length>0&&(r.data.length>0||null)},x=function(e){var t=e.children,r=e.addClass;return a.a.createElement("tr",{className:r},t)},C=function(e){var t=e.heading,r=e.search;return a.a.createElement("thead",null,a.a.createElement(x,null,t?t.map((function(e,t){return a.a.createElement("th",{key:t},e)})):null,r&&a.a.createElement("th",{className:"table-search"},a.a.createElement(i,{rounded:!0,placeholder:r.placeholder}))))};return a.a.createElement("table",null,a.a.createElement(C,{heading:t,search:c}),a.a.createElement("tbody",{onScroll:function(e){e.target.scrollHeight-e.target.scrollTop===e.target.clientHeight&&N()}},S()?f.map((function(e){var t=e.id,r=e.name,n=e.picture,c=e.items,i=e.button,u=e.addClass;return a.a.createElement(x,{key:t,addClass:u},n&&a.a.createElement("td",{className:"table-picture-wrapper"},a.a.createElement("img",{className:"table-picture",src:n})),r&&a.a.createElement("td",{className:"table-name"},r),c&&c.map((function(e,t){return a.a.createElement("td",{key:t},e)})),i&&a.a.createElement("td",{className:"table-button"},a.a.createElement(l,{action:function(){return m.push(o+t+"/edit")}},i)))})):null===S()?a.a.createElement("tr",{className:"table-loading-row"},a.a.createElement("td",{className:"table-loading-data"},"No Data")):a.a.createElement("tr",{className:"table-loading-row"},a.a.createElement("td",{className:"table-loading-data"},a.a.createElement(d.a,{color:"primary",size:"md",relative:!0}))),j&&a.a.createElement("tr",{className:"table-loading-row"},a.a.createElement("td",{className:"table-loading-data"},a.a.createElement(d.a,{color:"primary",size:"md",relative:!0})))))}var M=r(10),F=r(155),U=r(178),B=r(54),H=r.n(B),$=r(180),J=r(166),V=r(167),L=r(168);function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,l=void 0;try{for(var c,o=e[Symbol.iterator]();!(n=(c=o.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){a=!0,l=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw l}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return G(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function K(){return(K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Q(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var R=function(e){return{root:{margin:0,padding:e.spacing(2)},closeButton:{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500]},img:(t={margin:"auto",display:"block",width:250},r="width",n=300,r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t)};var t,r,n},W=Object(M.a)(R)((function(e){var t=e.children,r=e.classes,n=e.onClose,l=(e.titleClass,Q(e,["children","classes","onClose","titleClass"]));return a.a.createElement(J.a,K({disableTypography:!0,className:r.root},l),a.a.createElement(F.a,{className:"modal-title",variant:"h4"},t),n?a.a.createElement($.a,{"aria-label":"close",className:r.closeButton,onClick:n},a.a.createElement(H.a,null)):null)})),X=Object(M.a)(R)((function(e){var t=e.title,r=e.handleClick,c=e.children,o=e.disabled,i=e.loading,u=e.confirmButton,s=q(Object(n.useState)(!1),2),m=s[0],p=s[1],f=function(){return p(!m)};return a.a.createElement(a.a.Fragment,null,a.a.createElement(U.a,{onClose:f,"aria-labelledby":"customized-dialog-title",open:m},a.a.createElement(W,{onClose:f},t),a.a.createElement(V.a,null,c),a.a.createElement(L.a,null,a.a.createElement(l,{classes:"modal-confirm-btn",disabled:o,action:r},i?a.a.createElement(d.a,{color:"default"}):u||"Confirm"))),a.a.createElement(l,{action:f,classes:"xl"},t))}))}}]);