text: (this.webpackJsonpForgePC=this.webpackJsonpForgePC||[]).push([[16],{753:function(e,t,n){"use strict";function a(e,t,n,a,r,l,c){try{var i=e[l](c),o=i.value}catch(s){return void n(s)}i.done?t(o):Promise.resolve(o).then(a,r)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(r,l){var c=e.apply(t,n);function i(e){a(c,r,l,i,o,"next",e)}function o(e){a(c,r,l,i,o,"throw",e)}i(void 0)}))}}n.d(t,"a",(function(){return r}))},754:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(206);function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],a=!0,r=!1,l=void 0;try{for(var c,i=e[Symbol.iterator]();!(a=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);a=!0);}catch(o){r=!0,l=o}finally{try{a||null==i.return||i.return()}finally{if(r)throw l}}return n}}(e,t)||Object(a.a)(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.")}()}},796:function(e,t,n){"use strict";n.r(t);var a=n(42),r=n.n(a),l=n(206);function c(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=Object(l.a)(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r,c=!0,i=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return c=e.done,e},e:function(e){i=!0,r=e},f:function(){try{c||null==a.return||a.return()}finally{if(i)throw r}}}}var i=n(753),o=n(754),s=n(1),u=n.n(s),m=n(74),d=n(752),f=(n(207),n(91),n(54)),p=["component","image","selection","base","tax [%]","markup","actions"],v=["component","markup"],h=function(){return u.a.createElement("div",{className:"d-flex justify-content-center",style:{height:"100vh",flexDirection:"row",alignItems:"center"}},u.a.createElement("div",{className:"spinner-border text-primary",role:"status",style:{width:100,height:100}},u.a.createElement("span",{className:"sr-only"},"Loading...")))};t.default=Object(m.c)((function(e){return{isLoading:1===e.loadingIndicator.counter}}),(function(e){return{toast:function(t,n){return e(Object(f.b)(t,n))}}}))((function(e){var t=Object(m.e)((function(e){return e.List})),n=Object(s.useState)([]),a=Object(o.a)(n,2),l=a[0],f=a[1],E=Object(s.useState)("10"),g=Object(o.a)(E,2),y=g[0],b=(g[1],Object(s.useState)(0)),N=Object(o.a)(b,2),j=N[0],w=N[1];Object(s.useEffect)((function(){!function(){if(t&&t.products.length)f(t.products),S(t.products);else{var e=JSON.parse(sessionStorage.getItem("listItems"))?JSON.parse(sessionStorage.getItem("listItems")):[];f(e),S(e)}}()}),[]);var S=function(){var e=Object(i.a)(r.a.mark((function e(t){var n,a,l,i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0,a=c(t);try{for(a.s();!(l=a.n()).done;)i=l.value,n+=parseFloat(Math.floor(100*(parseFloat(i.price.split("$")[1])+parseFloat(i.price.split("$")[1]*y/100)))/100)}catch(r){a.e(r)}finally{a.f()}w(Math.round(100*n)/100);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return u.a.createElement(u.a.Fragment,null,u.a.createElement(d.R,null,u.a.createElement(d.m,{xs:"12",lg:"9"},!1===e.isLoading?u.a.createElement(d.h,null,u.a.createElement(d.l,null,"List"),u.a.createElement(d.i,null,u.a.createElement(d.p,{items:l,fields:p,itemsPerPage:10,scopedSlots:{component:function(e){return u.a.createElement("td",{className:"v-align",style:{verticalAlign:"middle"}},u.a.createElement(d.K,{to:"/products/"+e.component},u.a.createElement("u",null,e.component)))},image:function(e){return u.a.createElement("td",{className:"text-left v-align",style:{verticalAlign:"middle"}},u.a.createElement("div",{className:"c-avatar"},u.a.createElement("img",{src:e.image,className:"c-avatar-img",style:{borderRadius:"none!important"},alt:"avatar"})))},selection:function(e){return u.a.createElement("td",{className:"v-align",style:{verticalAlign:"middle"}},u.a.createElement("div",{className:"h6"},e.name))},base:function(e){return u.a.createElement("td",{className:"v-align",style:{verticalAlign:"middle"}},u.a.createElement("div",{className:"h6"},e.price))},"tax [%]":function(e){return u.a.createElement("td",{className:"v-align",style:{verticalAlign:"middle"}},u.a.createElement("div",{className:"h6"},y))},markup:function(e){return u.a.createElement("td",{className:"v-align",style:{verticalAlign:"middle"}},u.a.createElement(d.x,{style:{marginBottom:0}},u.a.createElement(d.E,{id:"name",placeholder:"Enter your name",defaultValue:e.price})))},actions:function(e){return u.a.createElement("td",{className:"v-align",style:{verticalAlign:"middle"}},u.a.createElement(d.e,{active:!0,variant:"ghost",color:"success","aria-pressed":"true",size:"sm",className:"btn-pill",onClick:function(){return function(e){console.log(e)}(e)}},"Change"),"\xa0")}}}))):u.a.createElement(h,null)),u.a.createElement(d.m,{xs:"12",lg:"3"},u.a.createElement(d.h,null,u.a.createElement(d.l,null,"Total Price"),u.a.createElement(d.i,null,u.a.createElement(d.p,{items:l,fields:v,itemsPerPage:10,sorter:!0,scopedSlots:{component:function(e){return u.a.createElement("td",{className:"v-align"},u.a.createElement("div",{className:"h6"},e.component))},markup:function(e){return u.a.createElement("td",{className:"v-align"},u.a.createElement("div",{className:"h6"},"$ \xa0 ",Math.floor(100*(parseFloat(e.price.split("$")[1])+parseFloat(e.price.split("$")[1]*y/100)))/100))}}}),u.a.createElement("hr",null),u.a.createElement("div",{className:"h3 justify-content-around d-flex"},u.a.createElement("h3",null,"Total Price"),u.a.createElement("h3",null,"$ \xa0",j)),u.a.createElement("hr",null),u.a.createElement("div",null,u.a.createElement(d.e,{className:"btn btn-danger",size:"xs",style:{width:"100%"}},"Build Now")))))))}))}}]);
  //# sourceMappingURL=16.9ad0275a.chunk.js.map