tabexseriescomponents 0.0.7 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3,21 +3,20 @@ import React, { useState, useEffect } from 'react';
3
3
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import 'react-router-dom';
6
- import { css as css$1 } from 'glamor';
6
+ import { css } from 'glamor';
7
7
  import Dropdown from 'react-bootstrap/Dropdown';
8
8
  import { AiOutlineLogin, AiOutlineUserAdd, AiOutlineHeart, AiFillStar } from 'react-icons/ai';
9
9
  import { CgShoppingBag } from 'react-icons/cg';
10
10
  import { BiUser, BiLogOutCircle } from 'react-icons/bi';
11
- import { FiShoppingBag, FiShoppingCart } from 'react-icons/fi';
12
- import { MdOutlineShoppingCart, MdOutlinePolicy } from 'react-icons/md';
11
+ import { FiShoppingBag, FiShoppingCart, FiFilter } from 'react-icons/fi';
12
+ import { MdOutlineShoppingCart, MdOutlinePolicy, MdOutlineLayersClear } from 'react-icons/md';
13
13
  import { IKImage } from 'imagekitio-react';
14
- import { BsTelephone, BsSearch, BsBag, BsHandbag } from 'react-icons/bs';
14
+ import { BsTelephone, BsSearch, BsBag, BsHandbag, BsFillArrowRightCircleFill, BsFillArrowLeftCircleFill } from 'react-icons/bs';
15
15
  import { HiMenuAlt4 } from 'react-icons/hi';
16
-
17
- var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
18
-
19
- var css = ".buttonComponent {\n\tborder-radius: 3px;\n\tpadding: 0.3rem 0.5rem;\n\ttransition: all 0.3s ease-out;\n\tbox-shadow: #272727b0 1px 1px 1px, #272727b0 -1px -1px 1px;\n}\n.buttonComponent:hover {\n\tbox-shadow: #272727b0 1px 1px 3px, #272727b0 -1px -1px 3px;\n}\n.buttonComponent:active {\n\topacity: 0.8;\n}\n";
20
- n(css,{});
16
+ import _extends from '@babel/runtime/helpers/extends';
17
+ import { useInView } from 'react-intersection-observer';
18
+ import 'axios';
19
+ import { ScrollMenu } from 'react-horizontal-scrolling-menu';
21
20
 
22
21
  var AwesomeButton = function AwesomeButton(props) {
23
22
  var _useState = useState(null),
@@ -44,12 +43,15 @@ var AwesomeButton = function AwesomeButton(props) {
44
43
  style: {
45
44
  backgroundColor: color
46
45
  }
47
- }, "ssdadadad", children.toUpperCase());
46
+ }, "sdasdasdadsd", children.toUpperCase());
48
47
  };
49
48
 
50
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
49
+ var IKurlEndpoint = 'https://ik.imagekit.io/kcrbhhnh0';
50
+ var IKpublicKey = 'public_ro8Tmo5Nlgw12YIFkn9MNUQLvQE=';
51
51
 
52
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
52
+ function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
53
+
54
+ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
53
55
  // import { Contexthandlerscontext } from '../../../../../../../Contexts/Contexthandlerscontext';
54
56
 
55
57
  var Header8 = function Header8(props) {
@@ -68,6 +70,9 @@ var Header8 = function Header8(props) {
68
70
  // templateproperties_context,
69
71
  // } = useContext(FetchingContext);
70
72
  // const { routingcountext, StaticPagesLinksContext } = useContext(TemplateRoutingContext);
73
+ var LogoutMutationContext = props.actions.LogoutMutationContext;
74
+ var setsidecartnavshowcontext = props.actions.setsidecartnavshowcontext;
75
+ var setSearchHeaderInputContext = props.actions.setSearchHeaderInputContext;
71
76
  var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
72
77
  var lang = props.actions.lang;
73
78
  var langdetect = props.actions.langdetect;
@@ -76,8 +81,9 @@ var Header8 = function Header8(props) {
76
81
  var fetchAuthorizationQueryContext = props.actions.fetchAuthorizationQueryContext;
77
82
  var fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
78
83
  var templateproperties_context = props.actions.templateproperties_context;
79
- var StaticPagesLinksContext = props.actions.StaticPagesLinkxwsContext;
80
84
  var favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
85
+ var routingcountext = props.actions.routingcountext;
86
+ var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
81
87
 
82
88
  var _useState = useState(''),
83
89
  _useState2 = _slicedToArray(_useState, 2),
@@ -109,17 +115,17 @@ var Header8 = function Header8(props) {
109
115
  });
110
116
  }
111
117
 
112
- setsectionproperties(_objectSpread({}, secpropobj));
118
+ setsectionproperties(_objectSpread$3({}, secpropobj));
113
119
  }, [StatePagePropertiesContext]);
114
120
  var header_cssstyles = {
115
- headercontainer: css$1({
121
+ headercontainer: css({
116
122
  position: sectionproperties.headerstyles_position == 'absolute' ? 'absolute' : 'relative',
117
123
  width: sectionproperties.header_width + 'vw',
118
124
  background: sectionproperties.uppersection_bgcolor,
119
125
  zIndex: 1000,
120
126
  transition: 'all 0.2s'
121
127
  }),
122
- upperheadersection: css$1({
128
+ upperheadersection: css({
123
129
  background: sectionproperties.uppersection_bgcolor,
124
130
  paddingLeft: langdetect == 'en' ? sectionproperties.uppersection_paddingleft + 'px' : sectionproperties.uppersection_paddingright + 'px',
125
131
  paddingRight: langdetect == 'en' ? sectionproperties.uppersection_paddingright + 'px' : sectionproperties.uppersection_paddingleft + 'px',
@@ -130,7 +136,7 @@ var Header8 = function Header8(props) {
130
136
  borderBottomLeftRadius: sectionproperties.uppersection_bblradius + 'px',
131
137
  borderBottomRightRadius: sectionproperties.uppersection_bbrradius + 'px'
132
138
  }),
133
- lowerheadercontainer: css$1({
139
+ lowerheadercontainer: css({
134
140
  backgroundColor: sectionproperties.lowersection_bgcolortransparent == 'Transparent' ? 'transparent' : sectionproperties.lowersection_backgroundColor,
135
141
  borderBottomLeftRadius: sectionproperties.lowersection_borderBottomLeftRadius + 'px',
136
142
  borderBottomRightRadius: sectionproperties.lowersection_BorderBottomRightRadius + 'px',
@@ -141,11 +147,11 @@ var Header8 = function Header8(props) {
141
147
  paddingTop: sectionproperties.lowersection_paddingtop + 'px',
142
148
  paddingBottom: sectionproperties.lowersection_paddingbottom + 'px'
143
149
  }),
144
- header_logo: css$1({
150
+ header_logo: css({
145
151
  width: templateproperties_context.logo_width + 'px',
146
152
  height: templateproperties_context.logo_height + 'px'
147
153
  }),
148
- navbar_item_text: css$1({
154
+ navbar_item_text: css({
149
155
  color: sectionproperties.lowersection_fontColor,
150
156
  fontSize: sectionproperties.lowersection_fontsize + 'px',
151
157
  textTransform: sectionproperties.lowersection_textTransform,
@@ -156,10 +162,10 @@ var Header8 = function Header8(props) {
156
162
  color: sectionproperties.lowersection_fontColoronhover
157
163
  }
158
164
  }),
159
- navbar_item_active: css$1({
165
+ navbar_item_active: css({
160
166
  color: sectionproperties.lowersection_fontColoronhover
161
167
  }),
162
- dropdownitem: css$1({
168
+ dropdownitem: css({
163
169
  padding: '0 0.1rem',
164
170
  transition: '.3s',
165
171
  fontSize: sectionproperties.dropdown_fontsize + 'px',
@@ -167,21 +173,21 @@ var Header8 = function Header8(props) {
167
173
  fontWeight: sectionproperties.dropdown_fontweight,
168
174
  textTransform: sectionproperties.dropdown_texttransform
169
175
  }),
170
- dropdownicon: css$1({
176
+ dropdownicon: css({
171
177
  color: sectionproperties.dropdowniconcolor
172
178
  }),
173
- dropdownitemcontainer: css$1({
179
+ dropdownitemcontainer: css({
174
180
  ':hover .dropdownitem': {
175
181
  color: sectionproperties.dropdown_hovercolor
176
182
  }
177
183
  }),
178
- divider: css$1({
184
+ divider: css({
179
185
  height: sectionproperties.vl_height + 'px',
180
186
  width: sectionproperties.vl_width + '%',
181
187
  backgroundColor: sectionproperties.vl_bg,
182
188
  zIndex: 100
183
189
  }),
184
- searchbarcont: css$1({
190
+ searchbarcont: css({
185
191
  position: 'relative',
186
192
  transition: '.3s',
187
193
  height: sectionproperties.searchbarcont_height + 'px',
@@ -190,7 +196,7 @@ var Header8 = function Header8(props) {
190
196
  borderRadius: sectionproperties.searchbarcont_borderRadius + 'px',
191
197
  border: sectionproperties.searchbarcontinput_borderwidth + 'px solid' + sectionproperties.searchbarcontinput_bordercolor
192
198
  }),
193
- searchbar_icon_cont: css$1({
199
+ searchbar_icon_cont: css({
194
200
  width: sectionproperties.searchbaricon_width + 'px',
195
201
  height: sectionproperties.searchbaricon_height + 'px',
196
202
  borderRadius: sectionproperties.searchbaricon_borderRadius + 'px',
@@ -205,7 +211,7 @@ var Header8 = function Header8(props) {
205
211
  top: 0,
206
212
  margin: 'auto'
207
213
  }),
208
- searchbarcont_input: css$1({
214
+ searchbarcont_input: css({
209
215
  height: '100%',
210
216
  width: '100%',
211
217
  outline: 'none',
@@ -220,7 +226,7 @@ var Header8 = function Header8(props) {
220
226
  borderColor: sectionproperties.searchbarcontinput_bordercoloronfocus
221
227
  }
222
228
  }),
223
- wishlist_btn: css$1({
229
+ wishlist_btn: css({
224
230
  width: sectionproperties.favBtnWidth + 'px',
225
231
  height: sectionproperties.favBtnHeight + 'px',
226
232
  background: sectionproperties.favbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.favBtnbgColor,
@@ -233,11 +239,11 @@ var Header8 = function Header8(props) {
233
239
  color: sectionproperties.favBtnTextcoloronhover
234
240
  }
235
241
  }),
236
- wishlistbadge: css$1({
242
+ wishlistbadge: css({
237
243
  top: sectionproperties.wishlistbadgetop + 'px',
238
244
  right: sectionproperties.wishlistbadgeright + 'px'
239
245
  }),
240
- user_btn: css$1({
246
+ user_btn: css({
241
247
  background: sectionproperties.userbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.userBtnbgColor,
242
248
  width: sectionproperties.userBtnWidth + 'px',
243
249
  height: sectionproperties.userBtnHeight + 'px',
@@ -251,7 +257,7 @@ var Header8 = function Header8(props) {
251
257
  borderColor: sectionproperties.userbtn_transparentbgcoloronhover == 'Transparent' ? sectionproperties.userBtnTextcoloronhover : sectionproperties.userBtnbgColoronhover
252
258
  }
253
259
  }),
254
- loggedinusername: css$1({
260
+ loggedinusername: css({
255
261
  fontWeight: sectionproperties.userBtnTextfontweight,
256
262
  textTransform: sectionproperties.userBtnTexttransform,
257
263
  color: sectionproperties.userBtnTextcolor,
@@ -259,7 +265,7 @@ var Header8 = function Header8(props) {
259
265
  lineHeight: sectionproperties.userBtntextfontsize + 'px',
260
266
  transition: '.3s'
261
267
  }),
262
- user_btnContainer: css$1({
268
+ user_btnContainer: css({
263
269
  ':hover .user_btnbg': {
264
270
  background: sectionproperties.userbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.userBtnbgColoronhover,
265
271
  color: sectionproperties.userBtnTextcoloronhover
@@ -268,7 +274,7 @@ var Header8 = function Header8(props) {
268
274
  color: sectionproperties.userBtnTextcoloronhover
269
275
  }
270
276
  }),
271
- loggedinuserbtn: css$1({
277
+ loggedinuserbtn: css({
272
278
  width: sectionproperties.loggedinuserbtn_width + 'px',
273
279
  height: sectionproperties.loggedinuserbtn_height + 'px',
274
280
  border: sectionproperties.userlogginbtnborderwidth + 'px solid ' + sectionproperties.userlogginbtnbordercolor,
@@ -277,7 +283,7 @@ var Header8 = function Header8(props) {
277
283
  color: sectionproperties.userBtniconcolor_loggedin,
278
284
  transition: '.3s'
279
285
  }),
280
- loggedinuserbtnContainer: css$1({
286
+ loggedinuserbtnContainer: css({
281
287
  ':hover .loggedinuserbtn': {
282
288
  borderColor: sectionproperties.userbtn_loggedin_iconcoloronhover,
283
289
  color: sectionproperties.userBtnTextcoloronhover_loggedin
@@ -287,7 +293,7 @@ var Header8 = function Header8(props) {
287
293
  color: sectionproperties.userbtn_loggedin_iconcoloronhover
288
294
  }
289
295
  }),
290
- cart_btn: css$1((_css = {
296
+ cart_btn: css((_css = {
291
297
  width: sectionproperties.cartBtnWidth + 'px',
292
298
  height: sectionproperties.cartBtnHeight + 'px',
293
299
  background: sectionproperties.cartbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColor,
@@ -298,11 +304,11 @@ var Header8 = function Header8(props) {
298
304
  background: sectionproperties.cartbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColoronhover,
299
305
  color: sectionproperties.cartBtnTextcoloronhover
300
306
  }), _css)),
301
- cartbadge: css$1({
307
+ cartbadge: css({
302
308
  top: sectionproperties.cartbadgetop + 'px',
303
309
  right: sectionproperties.cartbadgeright + 'px'
304
310
  }),
305
- badge_counter_header_notifications: css$1({
311
+ badge_counter_header_notifications: css({
306
312
  display: 'flex',
307
313
  justifyContent: 'center',
308
314
  alignItems: 'center',
@@ -316,7 +322,7 @@ var Header8 = function Header8(props) {
316
322
  borderRadius: sectionproperties.badge_borderradius + 'px',
317
323
  fontSize: sectionproperties.badge_fontsize + 'px'
318
324
  }),
319
- categorybtn: css$1({
325
+ categorybtn: css({
320
326
  background: sectionproperties.generalbtn_bgColor,
321
327
  width: sectionproperties.generalbtn_width + 'px',
322
328
  height: sectionproperties.generalbtn_height + 'px',
@@ -330,7 +336,7 @@ var Header8 = function Header8(props) {
330
336
  background: sectionproperties.generalbtn_bgColoronhover
331
337
  }
332
338
  }),
333
- btntextcontainer: css$1({
339
+ btntextcontainer: css({
334
340
  color: sectionproperties.generalbtn_textColor,
335
341
  fontSize: sectionproperties.generalbtn_fontsize + 'px',
336
342
  textTransform: sectionproperties.generalbtn_texttransform,
@@ -339,7 +345,7 @@ var Header8 = function Header8(props) {
339
345
  color: sectionproperties.generalbtn_textColoronhover
340
346
  }
341
347
  }),
342
- languagecontainer: css$1({
348
+ languagecontainer: css({
343
349
  cursor: 'pointer',
344
350
  transition: '.3s',
345
351
  color: sectionproperties.language_container_color,
@@ -443,8 +449,8 @@ var Header8 = function Header8(props) {
443
449
  routingcountext('home');
444
450
  }
445
451
  }, /*#__PURE__*/React.createElement(IKImage, {
446
- urlEndpoint: 'https://ik.imagekit.io/kcrbhhnh0',
447
- publicKey: "public_ro8Tmo5Nlgw12YIFkn9MNUQLvQE=",
452
+ urlEndpoint: IKurlEndpoint,
453
+ publicKey: IKpublicKey,
448
454
  path: langdetect == 'en' ? (_logoarrayofobjects$ = logoarrayofobjects[0]) === null || _logoarrayofobjects$ === void 0 ? void 0 : _logoarrayofobjects$.englishlogo : (_logoarrayofobjects$2 = logoarrayofobjects[0]) === null || _logoarrayofobjects$2 === void 0 ? void 0 : _logoarrayofobjects$2.arabiclogo,
449
455
  style: {
450
456
  maxWidth: '100%',
@@ -565,9 +571,7 @@ var Header8 = function Header8(props) {
565
571
  className: "".concat(header_cssstyles.dropdownitemcontainer) + ' d-flex align-items-center m-0 p-0 '
566
572
  }, /*#__PURE__*/React.createElement("p", {
567
573
  className: "".concat(header_cssstyles.dropdownitem) + ' d-flex align-items-center dropdownitem m-0 p-0 '
568
- }, /*#__PURE__*/React.createElement(AiOutlineLogin, null), /*#__PURE__*/React.createElement("span", {
569
- className: "ml-2 mr-2"
570
- }, lang.login)))), /*#__PURE__*/React.createElement(Dropdown.Divider, {
574
+ }, /*#__PURE__*/React.createElement(AiOutlineLogin, null)))), /*#__PURE__*/React.createElement(Dropdown.Divider, {
571
575
  style: {
572
576
  marginBottom: 0,
573
577
  marginTop: 0
@@ -830,11 +834,1276 @@ var Header8 = function Header8(props) {
830
834
  }))));
831
835
  };
832
836
 
837
+ var generalstyles = {"shadow_bottom":"general-module_shadow_bottom__YcJR3","overflowY_scroll":"general-module_overflowY_scroll__m5upZ","sub_scrollbar":"general-module_sub_scrollbar__mpHTI","badge":"general-module_badge__GTiMs","badge_secondary":"general-module_badge_secondary__p6ErJ","divider":"general-module_divider__WFV-A","verical_divider":"general-module_verical_divider__u5DxE","table":"general-module_table__hdcWN","mw-200":"general-module_mw-200__PaU8G","table_bordered":"general-module_table_bordered__JKIJp","table_borderless":"general-module_table_borderless__OF0cl","table_striped":"general-module_table_striped__wWBA6","table_hover":"general-module_table_hover__EiJha","table_responsive":"general-module_table_responsive__JPCKF","table_translation":"general-module_table_translation__x1Rpf","table_icon":"general-module_table_icon__EMMDI","image_table":"general-module_image_table__HqRaH","shownumber_cont":"general-module_shownumber_cont__34Y5j","card_input_table":"general-module_card_input_table__vVK0p","btn":"general-module_btn__FAb1b","btn_rounded":"general-module_btn_rounded__Rkb8o","focus":"general-module_focus__8-F6p","disabled":"general-module_disabled__PRzt-","btn_tranparent":"general-module_btn_tranparent__GFTRs","btn_circle":"general-module_btn_circle__lOyd4","btn_white":"general-module_btn_white__H0esd","btn_black":"general-module_btn_black__NcqLp","btn_primary":"general-module_btn_primary__C5oTz","btn_secondary":"general-module_btn_secondary__MbOCN","btn_success":"general-module_btn_success__iV5-t","btn_info":"general-module_btn_info__-ClLB","btn_danger":"general-module_btn_danger__b0QkM","btn_dark":"general-module_btn_dark__hSWyC","active":"general-module_active__MPpsF","btn_grey":"general-module_btn_grey__fGIYU","btn_cardheader":"general-module_btn_cardheader__vccWl","border_primary":"general-module_border_primary__Jqm8o","border_secondary":"general-module_border_secondary__xiHt3","border_success":"general-module_border_success__kWv6N","border_info":"general-module_border_info__wfOF-","border_warning":"general-module_border_warning__mSIRm","border_danger":"general-module_border_danger__U7veI","border":"general-module_border__Pvp44","border_top":"general-module_border_top__0-KRU","border_right":"general-module_border_right__7QXHH","border_bottom":"general-module_border_bottom__Xyy95","border_left":"general-module_border_left__90qSD","border_0":"general-module_border_0__YO9qY","border_top_0":"general-module_border_top_0__KFIha","border_right_0":"general-module_border_right_0__FaED6","border_bottom_0":"general-module_border_bottom_0__NZhJm","border_left_0":"general-module_border_left_0__gjITr","app_container":"general-module_app_container__-NNzK","app_main":"general-module_app_main__3s9rd","app_main_inner":"general-module_app_main_inner__OdEv-","app_main_inner_headertwo":"general-module_app_main_inner_headertwo__UkOlN","app_main_inner_headerfour":"general-module_app_main_inner_headerfour__slUk1","card":"general-module_card__KT-JI","card_border_10":"general-module_card_border_10__M-cl-","app_main_outer":"general-module_app_main_outer__gNSLc","app_main_outertranslated":"general-module_app_main_outertranslated__IZRx2","pill":"general-module_pill__gHCcE","fadeIn":"general-module_fadeIn__bUx2u","fadeOut":"general-module_fadeOut__R13Fc","fadeInButton":"general-module_fadeInButton__1daVD","fadeOutButton":"general-module_fadeOutButton__8BRUG","sectiontitlecont":"general-module_sectiontitlecont__F-e6k","homesectiontitlecont":"general-module_homesectiontitlecont__ZfXNm","sectiontitlecont2":"general-module_sectiontitlecont2__mfEaP"};
838
+
839
+ function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
840
+
841
+ function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
842
+ // import { Contexthandlerscontext } from '../../../../../../../../Contexts/Contexthandlerscontext';
843
+
844
+ var CardsSection = function CardsSection(props) {
845
+ var _useInView = useInView(),
846
+ ref = _useInView.ref,
847
+ inView = _useInView.inView; // const { lang, langdetect } = useContext(LanguageContext);
848
+ // const { TabexSectionsComponentsContext, StatePagePropertiesContext } = useContext(WebsiteDesignWorkPlaceContext);
849
+ // const { FetchQueriesEngineContext, setFetchQueriesEngineContext, SearchHeaderMutationContext, favoriteprojectscountContext, fetchcustomercartQueryContext } = useContext(FetchingContext);
850
+ // const { templatepropcontext } = useContext(Contexthandlerscontext);
851
+ // const { ProductFilterObjContext, setProductFilterObjContext } = useContext(ProductsCardsSectionContext);
852
+ // const { routingcountext, StaticPagesLinksContext } = useContext(TemplateRoutingContext);
853
+
854
+
855
+ var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
856
+ props.actions.lang;
857
+ var langdetect = props.actions.langdetect;
858
+ props.actions.setlang;
859
+ props.actions.templatepropcontext;
860
+ var fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
861
+ var favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
862
+ var routingcountext = props.actions.routingcountext;
863
+ var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
864
+ var ProductFilterObjContext = props.actions.ProductFilterObjContext;
865
+ var setProductFilterObjContext = props.actions.setProductFilterObjContext;
866
+ var TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
867
+ var FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
868
+ var setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
869
+ var SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
870
+ props.actions.serverbaselink;
871
+ props.actions.instapikey;
872
+ props.actions.fetchcollections_API;
873
+ var fetchProductsQuery = props.actions.fetchProductsQuery;
874
+ var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
875
+ var setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
876
+ props.actions.ParentCollectionsForCollectionQueryArr;
877
+ var setfetchingtype = props.actions.setfetchingtype;
878
+ var fetchingtype = props.actions.fetchingtype;
879
+
880
+ var _useState = useState(''),
881
+ _useState2 = _slicedToArray(_useState, 2),
882
+ sectionproperties = _useState2[0],
883
+ setsectionproperties = _useState2[1];
884
+
885
+ var _useState3 = useState([]),
886
+ _useState4 = _slicedToArray(_useState3, 2);
887
+ _useState4[0];
888
+ _useState4[1];
889
+
890
+ var _useState5 = useState([]),
891
+ _useState6 = _slicedToArray(_useState5, 2),
892
+ cardsarray = _useState6[0],
893
+ setcardsarray = _useState6[1];
894
+
895
+ var _useState7 = useState(''),
896
+ _useState8 = _slicedToArray(_useState7, 2),
897
+ searchinput = _useState8[0];
898
+ _useState8[1]; // const [ParentCollectionsForCollectionQueryArr, setParentCollectionsForCollectionQueryArr] = useState('');
899
+ // const fetchcollectionsQueryContext = useQuery(
900
+ // ['fetchcollections_API' + JSON.stringify(ParentCollectionsForCollectionQueryArr)],
901
+ // () => fetchcollections_API({ parentcollectionid: ParentCollectionsForCollectionQueryArr }),
902
+ // {
903
+ // keepPreviousData: true,
904
+ // staleTime: Infinity,
905
+ // enabled: instapikey().length != 0 && ParentCollectionsForCollectionQueryArr.length != 0 ? true : false,
906
+ // },
907
+ // );
908
+ // const FetchProductsAxios = (axiosdatatemp) => {
909
+ // var tempProductFilterObjContext = { ...ProductFilterObjContext };
910
+ // tempProductFilterObjContext.page = axiosdatatemp;
911
+ // if (templatepropcontext.instid == 'tabex') {
912
+ // tempProductFilterObjContext.instapikey = 'tabex';
913
+ // } else {
914
+ // tempProductFilterObjContext.instapikey = instapikey();
915
+ // }
916
+ // var serverbaselinktemp = window.location.hostname;
917
+ // if (serverbaselinktemp == 'localhost') {
918
+ // serverbaselinktemp = 'https://tabex-co.com';
919
+ // } else {
920
+ // serverbaselinktemp = 'https://' + serverbaselinktemp;
921
+ // }
922
+ // const axiosfetch = axios({
923
+ // method: 'post',
924
+ // url: serverbaselinktemp + '/customer/webapp/fetchproducts',
925
+ // headers: {
926
+ // Accept: 'application/json',
927
+ // 'Content-Type': 'application/json',
928
+ // },
929
+ // data: tempProductFilterObjContext,
930
+ // });
931
+ // return axiosfetch;
932
+ // };
933
+ // const fetchProductsQuery = useInfiniteQuery(['fetchproducts_API' + JSON.stringify(ProductFilterObjContext)], ({ pageParam = 0 }) => FetchProductsAxios(pageParam), {
934
+ // keepPreviousData: true,
935
+ // staleTime: Infinity,
936
+ // enabled:
937
+ // instapikey().length != 0 && fetchingtype == 'products' && ProductFilterObjContext.ProductFetchingType != undefined && ProductFilterObjContext.ProductFetchingType.length != 0
938
+ // ? true
939
+ // : false,
940
+ // initialPageParam: 0,
941
+ // getNextPageParam: (lastPage, allPages) => {
942
+ // var currentpagefrombackend = lastPage.data.page;
943
+ // if (currentpagefrombackend == 'full') {
944
+ // return undefined;
945
+ // } else {
946
+ // var nextpage = parseInt(currentpagefrombackend) + 1;
947
+ // return nextpage;
948
+ // }
949
+ // },
950
+ // getPreviousPageParam: (firstPage, allPages) => firstPage.data.page - 1,
951
+ // });
952
+
953
+
954
+ React.useEffect(function () {
955
+ if (inView) {
956
+ fetchProductsQuery.fetchNextPage();
957
+ }
958
+ }, [inView]);
959
+
960
+ var _useState9 = useState({
961
+ productfetchingtype: 'Random',
962
+ collectionid: ''
963
+ }),
964
+ _useState10 = _slicedToArray(_useState9, 2),
965
+ ProductsFetchingTypeSectionObj = _useState10[0],
966
+ setProductsFetchingTypeSectionObj = _useState10[1];
967
+
968
+ useEffect(function () {
969
+ StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
970
+ if (sectionitem.sectionid == props.sectionidprops) {
971
+ var secpropobj = {};
972
+ sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
973
+ secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
974
+ });
975
+ setsectionproperties(_objectSpread$2({}, secpropobj));
976
+
977
+ if (props.srcfromprops == 'GeneralProductsComponent') {
978
+ setfetchingtype('products');
979
+ setProductsFetchingTypeSectionObj({
980
+ productfetchingtype: 'Random',
981
+ collectionid: props.collectionidprops
982
+ });
983
+ } else {
984
+ setfetchingtype(sectionitem.fetchingtype);
985
+ setProductsFetchingTypeSectionObj({
986
+ productfetchingtype: sectionitem.productsfetchingtype,
987
+ collectionid: sectionitem.productsfetchingtypeCollectioncollectionid
988
+ });
989
+ }
990
+ }
991
+ });
992
+ }, [StatePagePropertiesContext]);
993
+ useEffect(function () {
994
+ SearchHeaderMutationContext.reset();
995
+ var delayDebounceFn = setTimeout(function () {
996
+ if (searchinput.length != 0) {
997
+ SearchHeaderMutationContext.mutate({
998
+ SearchHeaderValue: searchinput
999
+ });
1000
+ }
1001
+ }, 1000);
1002
+ return function () {
1003
+ return clearTimeout(delayDebounceFn);
1004
+ };
1005
+ }, [searchinput]);
1006
+ useEffect(function () {
1007
+ if (sectionproperties.length != 0) {
1008
+ if (cardsarray.length == 0) {
1009
+ if (fetchingtype == 'collections') {
1010
+ if (fetchcollectionsQueryContext.isSuccess) {
1011
+ cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
1012
+ }
1013
+ } else if (fetchingtype == 'products') {
1014
+ if (fetchProductsQuery.isSuccess) {
1015
+ var allpagesarr = [];
1016
+ fetchProductsQuery.data.pages.forEach(function (page) {
1017
+ page.data.products.forEach(function (productobj) {
1018
+ allpagesarr.push(productobj);
1019
+ });
1020
+ });
1021
+ cardobjassigner(allpagesarr);
1022
+ }
1023
+ }
1024
+ }
1025
+ }
1026
+ }, [sectionproperties]);
1027
+ useEffect(function () {
1028
+ if (fetchingtype.length != 0) {
1029
+ var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
1030
+
1031
+ if (fetchingtype == 'collections') {
1032
+ // tempFetchQueriesEngineContext.collections = true;
1033
+ if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
1034
+ setParentCollectionsForCollectionQueryArr('all');
1035
+ } else {
1036
+ setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
1037
+ }
1038
+ }
1039
+
1040
+ if (fetchingtype == 'products') {
1041
+ var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
1042
+ tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
1043
+ tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
1044
+ setProductFilterObjContext(_objectSpread$2({}, tempfetchproductsfilerobjcontext));
1045
+ }
1046
+
1047
+ setFetchQueriesEngineContext(_objectSpread$2({}, tempFetchQueriesEngineContext));
1048
+ }
1049
+ }, [fetchingtype, ProductsFetchingTypeSectionObj]);
1050
+ useEffect(function () {
1051
+ if (fetchingtype == 'products') {
1052
+ if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
1053
+ var allpagesarr = [];
1054
+ fetchProductsQuery.data.pages.forEach(function (page) {
1055
+ page.data.products.forEach(function (productobj) {
1056
+ allpagesarr.push(productobj);
1057
+ });
1058
+ });
1059
+ cardobjassigner(allpagesarr);
1060
+ }
1061
+ }
1062
+ }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
1063
+ useEffect(function () {
1064
+ if (fetchingtype == 'collections') {
1065
+ if (fetchcollectionsQueryContext.isSuccess) {
1066
+ cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
1067
+ }
1068
+ }
1069
+ }, [fetchcollectionsQueryContext.isSuccess]);
1070
+ useEffect(function () {
1071
+ favassigner();
1072
+ }, [favoriteprojectscountContext]);
1073
+
1074
+ var favassigner = function favassigner() {
1075
+ if (fetchingtype == 'products') {
1076
+ if (cardsarray.length != 0) {
1077
+ if (favoriteprojectscountContext != undefined && Array.isArray(favoriteprojectscountContext)) {
1078
+ var tempcardsarray = _toConsumableArray(cardsarray);
1079
+
1080
+ tempcardsarray.forEach(function (arrayItem, arrayindex) {
1081
+ arrayItem.IsFavExists = false;
1082
+ });
1083
+ tempcardsarray.forEach(function (arrayItem, arrayindex) {
1084
+ favoriteprojectscountContext.forEach(function (favitem, favindex) {
1085
+ if (arrayItem.productid == favitem) {
1086
+ arrayItem.IsFavExists = true;
1087
+ }
1088
+ });
1089
+ });
1090
+ setcardsarray(_toConsumableArray(tempcardsarray));
1091
+ }
1092
+ }
1093
+ }
1094
+ };
1095
+
1096
+ var cardobjassigner = function cardobjassigner(fetchedarray) {
1097
+ var temparray = [];
1098
+ fetchedarray.forEach(function (arrayItem, arrayindex) {
1099
+ var cardobj = {
1100
+ name: '',
1101
+ image: ''
1102
+ };
1103
+
1104
+ if (fetchingtype == 'products') {
1105
+ var itemquantity = 0;
1106
+
1107
+ if (langdetect == 'en') {
1108
+ cardobj.name = arrayItem.productinfo.name_en;
1109
+ } else {
1110
+ cardobj.name = arrayItem.productinfo.name_ar;
1111
+ }
1112
+
1113
+ if (langdetect == 'en') {
1114
+ cardobj.description = arrayItem.productinfo.description_en;
1115
+ } else {
1116
+ cardobj.description = arrayItem.productinfo.description_ar;
1117
+ }
1118
+
1119
+ if (arrayItem.productinfo.hasvariants == 0) {
1120
+ fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
1121
+ if (cartitem.productid == arrayItem.productinfo.productid) {
1122
+ itemquantity = cartitem.quantity;
1123
+ }
1124
+ });
1125
+ }
1126
+
1127
+ cardobj.image = arrayItem.productinfo.productmainimage;
1128
+ cardobj.hassale = arrayItem.productinfo.hassale;
1129
+ cardobj.productid = arrayItem.productinfo.productid;
1130
+ cardobj.hasvariants = arrayItem.productinfo.hasvariants;
1131
+ cardobj.description_en = arrayItem.productinfo.description_en;
1132
+ cardobj.description_ar = arrayItem.productinfo.description_ar;
1133
+ cardobj.defaultprice = arrayItem.productinfo.defaultprice;
1134
+ cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
1135
+ cardobj.productimages = arrayItem.productinfo.productimages;
1136
+ cardobj.quantity = itemquantity;
1137
+ cardobj.timestamp = arrayItem.productinfo.timestamp;
1138
+
1139
+ if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
1140
+ favoriteprojectscountContext.forEach(function (favitem, favindex) {
1141
+ if (arrayItem.productinfo.productid == favitem) {
1142
+ cardobj.IsFavExists = true;
1143
+ }
1144
+ });
1145
+ }
1146
+ } else if (fetchingtype == 'collections') {
1147
+ cardobj.collectionid = arrayItem.collectionid;
1148
+
1149
+ if (langdetect == 'en') {
1150
+ cardobj.name = arrayItem.title_en;
1151
+ cardobj.description = arrayItem.description_en;
1152
+ } else if (langdetect == 'ar') {
1153
+ cardobj.name = arrayItem.title_ar;
1154
+ cardobj.description = arrayItem.description_ar;
1155
+ }
1156
+
1157
+ cardobj.image = arrayItem.collectionlogo;
1158
+ } else ;
1159
+
1160
+ temparray.push(cardobj);
1161
+ });
1162
+ setcardsarray([].concat(temparray));
1163
+ };
1164
+
1165
+ var section_cssstyles = {
1166
+ sectiontitlespan: css({
1167
+ ':after': {
1168
+ height: '5px',
1169
+ width: sectionproperties.sectitle_lineafterwidth + '%',
1170
+ backgroundColor: sectionproperties.linebgcolor
1171
+ }
1172
+ }),
1173
+ line_left: css({
1174
+ height: '1px',
1175
+ position: 'relative',
1176
+ flex: '1 1 auto',
1177
+ minWidth: '10%',
1178
+ background: sectionproperties.linebgcolor
1179
+ }),
1180
+ line_right: css({
1181
+ height: '1px',
1182
+ position: 'relative',
1183
+ flex: '1 1 auto',
1184
+ minWidth: '10%',
1185
+ background: sectionproperties.linebgcolor
1186
+ }),
1187
+ cards_sections: css({
1188
+ marginTop: sectionproperties.marginTop + 'px',
1189
+ marginBottom: sectionproperties.marginBottom + 'px',
1190
+ paddingLeft: langdetect == 'en' ? sectionproperties.paddingLeft + 'px' : sectionproperties.paddingRight + 'px',
1191
+ paddingRight: langdetect == 'en' ? sectionproperties.paddingRight + 'px' : sectionproperties.paddingLeft + 'px',
1192
+ paddingTop: sectionproperties.paddingTop + 'px',
1193
+ paddingBottom: sectionproperties.paddingBottom + 'px',
1194
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
1195
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
1196
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
1197
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
1198
+ boxShadow: sectionproperties.sectioncardshadow == 'Show' ? '0 0 10px ' + sectionproperties.sectioncardshadowcolor : 'none',
1199
+ borderColor: sectionproperties.sectioncardbordercolor,
1200
+ border: sectionproperties.sectioncardborderwidth + 'px solid'
1201
+ }),
1202
+ filterbtn: css({
1203
+ width: sectionproperties.filterbtn_Width + 'px',
1204
+ height: sectionproperties.filterbtn_Height + 'px',
1205
+ background: sectionproperties.filterbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.filterbtn_bgColor,
1206
+ borderBottomLeftRadius: sectionproperties.filterbtn_borderBottomLeftRadius + 'px',
1207
+ borderBottomRightRadius: sectionproperties.filterbtn_borderBottomRightRadius + 'px',
1208
+ borderTopLeftRadius: sectionproperties.filterbtn_borderTopLeftRadius + 'px',
1209
+ borderTopRightRadius: sectionproperties.filterbtn_borderTopRightRadius + 'px',
1210
+ color: sectionproperties.filterbtn_Textcolor,
1211
+ boxShadow: sectionproperties.filterbtn_showshadow == 'Show' ? '0 0 10px ' + sectionproperties.filterbtn_shadowcolor : '',
1212
+ marginTop: sectionproperties.filterbtn_marginTop + 'px',
1213
+ marginBottom: sectionproperties.filterbtn_marginBottom + 'px',
1214
+ marginLeft: sectionproperties.filterbtn_marginLeft + 'px',
1215
+ marginRight: sectionproperties.filterbtn_marginRight + 'px',
1216
+ transition: '.3s',
1217
+ ':hover': {
1218
+ background: sectionproperties.filterbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.filterbtn_bgColoronhover,
1219
+ color: sectionproperties.filterbtn_Textcoloronhover
1220
+ }
1221
+ }),
1222
+ viewmorebtn: css({
1223
+ width: sectionproperties.viewmorebtn_Width + 'px',
1224
+ height: sectionproperties.viewmorebtn_Height + 'px',
1225
+ background: sectionproperties.viewmorebtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.viewmorebtn_bgColor,
1226
+ borderRadius: sectionproperties.viewmorebtn_borderBottomLeftRadius + 'px',
1227
+ color: sectionproperties.viewmorebtn_Textcolor,
1228
+ fontSize: sectionproperties.viewmorebtn_fontSize + 'px',
1229
+ fontWeight: sectionproperties.viewmorebtn_fontWeight,
1230
+ textDecoration: sectionproperties.viewmorebtn_bgtransparent == 'Transparent' ? 'underline' : 'none',
1231
+ transition: '.3s',
1232
+ ':hover': {
1233
+ background: sectionproperties.viewmorebtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.viewmorebtn_bgColoronhover,
1234
+ color: sectionproperties.viewmorebtn_Textcoloronhover
1235
+ }
1236
+ }),
1237
+ loadbtn: css({
1238
+ fontSize: sectionproperties.generaltext_fontSize + 'px',
1239
+ color: sectionproperties.generaltext_fontColor,
1240
+ fontWeight: sectionproperties.generaltext_fontWeight,
1241
+ textDecoration: 'underline',
1242
+ transition: '.3s',
1243
+ ':hover': {
1244
+ color: sectionproperties.text_secondarycolor
1245
+ }
1246
+ })
1247
+ };
1248
+
1249
+ var cardsrender = function cardsrender() {
1250
+ return /*#__PURE__*/React.createElement("div", {
1251
+ style: {
1252
+ background: sectionproperties.backgroundColor
1253
+ },
1254
+ className: sectionproperties.showFilter == 'show' && sectionproperties.filterdirection == 'Vertical' ? 'col-lg-9 p-sm-0' : 'row m-0 w-100'
1255
+ }, !fetchProductsQuery.isFetching && cardsarray.length == 0 && /*#__PURE__*/React.createElement("div", {
1256
+ className: "row m-0 w-100 d-flex align-items-center",
1257
+ style: {
1258
+ height: '50vh'
1259
+ }
1260
+ }, /*#__PURE__*/React.createElement("div", {
1261
+ className: "col-lg-12 text-light d-flex align-items-center justify-content-center flex-column"
1262
+ }, /*#__PURE__*/React.createElement(MdOutlineLayersClear, {
1263
+ style: {
1264
+ fontSize: sectionproperties.noprod_iconfontSize + 'px',
1265
+ color: sectionproperties.noprod_iconcolor
1266
+ }
1267
+ }), /*#__PURE__*/React.createElement("p", {
1268
+ style: {
1269
+ fontSize: sectionproperties.noprod_fontSize + 'px',
1270
+ fontWeight: sectionproperties.noprod_fontWeight,
1271
+ textTransform: sectionproperties.noprod_textTransform,
1272
+ color: sectionproperties.noprod_color
1273
+ }
1274
+ }, langdetect == 'en' ? 'No Products Found' : 'لا توجد منتجات'))), cardsarray.length != 0 && sectionproperties.length != 0 && /*#__PURE__*/React.createElement("div", {
1275
+ className: "row m-0 w-100 d-flex align-items-center p-sm-0"
1276
+ }, /*#__PURE__*/React.createElement("div", {
1277
+ className: "row ml-0 mr-0 w-100 pl-md-2 pr-md-2 pl-sm-2 pr-sm-2",
1278
+ style: {
1279
+ marginTop: sectionproperties.sectionTitleMarginTop + 'px',
1280
+ marginBottom: sectionproperties.sectionTitleMarginBottom + 'px',
1281
+ paddingLeft: sectionproperties.sectionTitleMarginLeft + 'px',
1282
+ paddingRight: sectionproperties.sectionTitleMarginRight + 'px'
1283
+ }
1284
+ }, sectionproperties.sectiontitleshow == 'Show' && /*#__PURE__*/React.createElement("div", {
1285
+ className: sectionproperties.viewmorebtnshow == 'Show' ? sectionproperties.sectiontitleposition == 'Centered' ? ' col-lg-12 col-md-12 col-sm-12 d-flex align-items-center p-0 ' : ' col-lg-7 col-md-7 col-sm-7 d-flex align-items-center p-0 ' : sectionproperties.showFilter == 'show' ? ' col-lg-12 col-md-7 col-sm-7 d-flex align-items-center p-0 ' : ' col-lg-12 col-md-12 col-sm-12 d-flex align-items-center p-0 '
1286
+ }, /*#__PURE__*/React.createElement("div", {
1287
+ // mb-auto
1288
+ className: "".concat(generalstyles.sectiontitlecont) + ' col-lg-12 p-0 d-flex align-items-center ',
1289
+ style: {
1290
+ justifyContent: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : 'start'
1291
+ }
1292
+ }, /*#__PURE__*/React.createElement("div", {
1293
+ className: "d-flex align-items-center flex-row",
1294
+ style: {
1295
+ position: 'relative',
1296
+ justifyContent: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : '',
1297
+ width: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '100%' : ''
1298
+ }
1299
+ }, sectionproperties.sectiontitlestyle == 'Line Before Text' && /*#__PURE__*/React.createElement("span", {
1300
+ className: section_cssstyles.line_left
1301
+ }), /*#__PURE__*/React.createElement("p", {
1302
+ className: sectionproperties.sectiontitlefontfamily == 'Pacifico' ? "".concat(section_cssstyles.sectiontitlespan) + ' PacificoFont mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start ' : sectionproperties.sectiontitlefontfamily == 'Playfair' ? "".concat(section_cssstyles.sectiontitlespan) + ' PlayfairFont mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start ' : sectionproperties.sectiontitlefontfamily == 'Great Vibes' ? "".concat(section_cssstyles.sectiontitlespan) + ' GreatvibesFont mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start ' : "".concat(section_cssstyles.sectiontitlespan) + ' mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start ',
1303
+ style: {
1304
+ fontSize: sectionproperties.sectionTitleFontSize + 'px',
1305
+ color: sectionproperties.sectionTitleColor,
1306
+ fontWeight: sectionproperties.sectionTitleFontWeight,
1307
+ paddingLeft: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '12px' : 0,
1308
+ paddingRight: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '12px' : 0,
1309
+ textAlign: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : ''
1310
+ }
1311
+ }, langdetect == 'en' ? sectionproperties.sectionTitleContent : sectionproperties.sectionTitleContent_ar), sectionproperties.sectiontitlestyle == 'Line Before Text' && /*#__PURE__*/React.createElement("span", {
1312
+ className: section_cssstyles.line_right
1313
+ })))), sectionproperties.prodCatShow == 'Show' && /*#__PURE__*/React.createElement("div", {
1314
+ className: ' col-lg-12 d-flex align-items-center ',
1315
+ style: {
1316
+ justifyContent: sectionproperties.descriptionCentered == 'Centered' ? 'center' : 'start',
1317
+ marginBottom: sectionproperties.descriptionMarginBottom + 'px',
1318
+ paddingLeft: langdetect == 'en' ? sectionproperties.description_marginLeft + 'px' : sectionproperties.description_marginRight + 'px',
1319
+ paddingRight: langdetect == 'en' ? sectionproperties.description_marginRight + 'px' : sectionproperties.description_marginLeft + 'px'
1320
+ }
1321
+ }, /*#__PURE__*/React.createElement("p", {
1322
+ className: "m-0 p-0 wordbreak ",
1323
+ style: {
1324
+ fontSize: sectionproperties.prodCatFontSize + 'px',
1325
+ color: sectionproperties.prodCatColor,
1326
+ fontWeight: sectionproperties.prodCatFontWeight,
1327
+ textAlign: sectionproperties.descriptionCentered == 'Centered' ? 'center' : langdetect == 'en' ? 'left' : 'right'
1328
+ }
1329
+ }, langdetect == 'en' ? sectionproperties.descriptionContentEn : sectionproperties.descriptionContentAr)), /*#__PURE__*/React.createElement("div", {
1330
+ className: sectionproperties.sectiontitleposition == 'Centered' ? 'col-lg-12 col-md-12 col-sm-12 d-flex align-item-center justify-content-center p-0' : 'col-lg-5 col-md-5 col-sm-5 d-flex align-item-center justify-content-end justify-content-sm-center p-0',
1331
+ style: {
1332
+ marginTop: sectionproperties.sectiontitleposition == 'Centered' ? '10px' : 0
1333
+ }
1334
+ }, /*#__PURE__*/React.createElement("div", {
1335
+ className: sectionproperties.sectiontitleposition == 'Centered' ? ' row m-0 w-100 d-flex align-item-center justify-content-center ' : ' row m-0 w-100 d-flex align-item-center justify-content-end '
1336
+ }, sectionproperties.viewmorebtnshow == 'Show' && /*#__PURE__*/React.createElement("button", {
1337
+ className: sectionproperties.sectiontitleposition == 'Centered' ? "".concat(section_cssstyles.viewmorebtn) + ' m-sm-0 allcentered mt-auto mb-auto ' : "".concat(section_cssstyles.viewmorebtn) + ' w-sm-auto btn-circle-resp m-sm-0 mt-auto mb-auto ',
1338
+ onClick: function onClick() {
1339
+ if (fetchingtype == 'products') {
1340
+ if (ProductsFetchingTypeSectionObj.productfetchingtype == 'Collection') {
1341
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, ProductsFetchingTypeSectionObj.collectionid);
1342
+ } else {
1343
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
1344
+ }
1345
+ } else {
1346
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
1347
+ }
1348
+ }
1349
+ }, /*#__PURE__*/React.createElement("span", {
1350
+ className: sectionproperties.sectiontitleposition == 'Centered' ? 'd-flex justify-content-center align-items-center' : 'd-flex justify-content-center align-items-center d-md-none'
1351
+ }, langdetect == 'en' ? sectionproperties.viewmorebtn_text : sectionproperties.viewmorebtn_text_ar), /*#__PURE__*/React.createElement("span", {
1352
+ className: sectionproperties.sectiontitleposition == 'Centered' ? 'd-none align-items-center justify-content-center' : 'd-none d-md-flex align-items-center justify-content-center'
1353
+ }, /*#__PURE__*/React.createElement("i", {
1354
+ className: "h-100 d-flex align-items-center justify-content-center"
1355
+ }, langdetect == 'en' ? /*#__PURE__*/React.createElement(BsFillArrowRightCircleFill, null) : /*#__PURE__*/React.createElement(BsFillArrowLeftCircleFill, null)))), sectionproperties.showFilter == 'show' && /*#__PURE__*/React.createElement("button", {
1356
+ className: sectionproperties.searchbar_show == 'Show' ? ' col-lg-3 col-md-3 pl-0 pr-0 d-none d-md-flex justify-content-end ml-1 ' : ' col-lg-12 col-sm-12 pl-0 pr-0 d-none d-md-flex justify-content-end ml-1 ',
1357
+ onClick: function onClick() {
1358
+ var element = document.getElementById('filterslider');
1359
+ element.classList.add(filterstyles.filterslider_container_opened);
1360
+ }
1361
+ }, /*#__PURE__*/React.createElement("div", {
1362
+ className: "".concat(section_cssstyles.filterbtn) + ' btn-circle-resp '
1363
+ }, /*#__PURE__*/React.createElement("i", {
1364
+ className: "h-100 d-flex align-items-center justify-content-center"
1365
+ }, /*#__PURE__*/React.createElement(FiFilter, null)))))), sectionproperties.showseparator == 'Show' && /*#__PURE__*/React.createElement("div", {
1366
+ className: "col-lg-12 p-0"
1367
+ }, /*#__PURE__*/React.createElement("hr", {
1368
+ className: "mt-3 mb-2",
1369
+ style: {
1370
+ borderColor: sectionproperties.upperseparatorbgcolor
1371
+ }
1372
+ }))), StatePagePropertiesContext.pageobj.sections[props.sectionindexprops].childsections.map(function (item, index) {
1373
+ if (item.tabexsectioninfo != null) {
1374
+ if (item.sectionstructype == 'child' && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined) {
1375
+ var Sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
1376
+ return /*#__PURE__*/React.createElement("div", {
1377
+ className: sectionproperties.paddingLeft != 0 && sectionproperties.paddingRight != 0 ? section_cssstyles.cards_sections + ' row ml-0 mr-0 w-100 pl-md-2 pr-md-2 ' : sectionproperties.paddingRight != 0 ? section_cssstyles.cards_sections + ' row ml-0 mr-0 w-100 pr-md-2 ' : sectionproperties.paddingLeft != 0 ? section_cssstyles.cards_sections + ' row ml-0 mr-0 w-100 pl-md-2 ' : section_cssstyles.cards_sections + ' row ml-0 mr-0 w-100 '
1378
+ }, sectionproperties.view_as_slider_vertical == 'Slider (Horizontal)' && /*#__PURE__*/React.createElement("div", {
1379
+ className: langdetect == 'en' ? 'col-lg-12 p-0 pl-sm-2' : 'col-lg-12 p-0 pr-sm-2'
1380
+ }, /*#__PURE__*/React.createElement(ScrollMenu, {
1381
+ transitionBehavior: 'auto',
1382
+ wrapperClassName: '',
1383
+ itemClassName: item.tabexsectioninfo.sectioncompname == 'Productcard6' ? 'scrollmenuclassnameitemProductcard6' : item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover' ? 'scrollmenuclassnameitemProductcard_with_circularhover' : item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularbg' ? 'scrollmenuclassnameitemProductcard_with_circularbg' : item.tabexsectioninfo.sectioncompname == 'Categorycard_with_twolinestransition' ? 'scrollmenuclassnameitemCategorycard_with_twolinestransition' : item.tabexsectioninfo.sectioncompname == 'Productcard_with_slideanimation' ? 'scrollmenuclassnameitemProductcard_with_slideanimation' : item.tabexsectioninfo.sectioncompname == 'Categorycard_withtext' ? 'scrollmenuclassnameitemCategorycard_withtext' : item.tabexsectioninfo.sectioncompname == 'Productcard_animatedbuttons' ? 'scrollmenuclassnameitemProductcard_animatedbuttons' : item.tabexsectioninfo.sectioncompname == 'Productcard_with_variants' ? 'scrollmenuclassnameitemProductcard_with_variants' : item.tabexsectioninfo.sectioncompname == 'Productcarddefault' ? 'scrollmenuclassnameitemProductcarddefault' : item.tabexsectioninfo.sectioncompname == 'Simpleproductcard' ? 'scrollmenuclassnameitemSimpleproductcard' : item.tabexsectioninfo.sectioncompname == 'Categorycard_with_trianglebg' ? 'scrollmenuclassnameitemCategorycard_with_trianglebg' : item.tabexsectioninfo.sectioncompname == 'Productcard_with_textonhover' ? 'scrollmenuclassnameitemProductcard_with_textonhover' : item.tabexsectioninfo.sectioncompname == 'Categorycard_slidebgscaled' ? 'scrollmenuclassnameitemCategorycard_slidebgscaled' : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft' ? 'scrollmenuclassnameitemProductccard_with_imageontopleft' : item.tabexsectioninfo.sectioncompname == 'Productcard_with_zoominonhover' ? 'scrollmenuclassnameitemProductcard_with_zoominonhover' : item.tabexsectioninfo.sectioncompname == 'Horizontalcard' ? 'scrollmenuclassnameitemProductcard_Horizontalcard' : item.tabexsectioninfo.sectioncompname == 'Categorycard_fullimage' ? 'scrollmenuclassnameitemCategorycard_fullimage' : item.tabexsectioninfo.sectioncompname == 'Classiccategorycard' ? 'scrollmenuclassnameitemClassiccategorycard' : item.tabexsectioninfo.sectioncompname == 'ModernProductCard' ? 'scrollmenuclassnameitemModernProductCard' : item.tabexsectioninfo.sectioncompname == 'Simplecategorycardwithtextbelow' ? 'scrollmenuclassnameitemSimplecategorycardwithtextbelow' : item.tabexsectioninfo.sectioncompname == 'Productcard7' ? 'scrollmenuclassnameitemProductcard7' : item.tabexsectioninfo.sectioncompname == 'MenuCard' ? 'scrollmenuclassnameitemMenuCard' : 'scrollmenuclassnameitem',
1384
+ scrollContainerClassName: 'scrollmenuclasssubscrollbar'
1385
+ }, cardsarray.map(function (cardinfoitem, cardinfoindex) {
1386
+ return /*#__PURE__*/React.createElement("div", {
1387
+ className: ' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-12 w-100' // style={{
1388
+ // minWidth:
1389
+ // item.tabexsectioninfo.sectioncompname == 'Productcard_animatedbuttons' ||
1390
+ // item.tabexsectioninfo.sectioncompname == 'Horizontalcard'
1391
+ // ? sectionproperties.width + 'px'
1392
+ // : '',
1393
+ // maxWidth:
1394
+ // item.tabexsectioninfo.sectioncompname == 'Productcard_animatedbuttons' ||
1395
+ // item.tabexsectioninfo.sectioncompname == 'Horizontalcard'
1396
+ // ? sectionproperties.width + 'px'
1397
+ // : '',
1398
+ // }}
1399
+
1400
+ }, /*#__PURE__*/React.createElement(Sectioncomp, _extends({
1401
+ sectiontypeprops: 'horizontal',
1402
+ fetchingtypeprops: fetchingtype,
1403
+ cardinfoindexprops: cardinfoindex,
1404
+ cardinfoitemprops: cardinfoitem,
1405
+ sectionindexprops: index,
1406
+ sectionidprops: item.sectionid
1407
+ }, props)));
1408
+ }), fetchingtype == 'products' && fetchProductsQuery.isFetchingNextPage && /*#__PURE__*/React.createElement("button", {
1409
+ className: section_cssstyles.loadbtn + ' d-flex justify-content-end align-items-center ',
1410
+ ref: ref,
1411
+ onClick: function onClick() {
1412
+ return fetchProductsQuery.fetchNextPage();
1413
+ },
1414
+ disabled: !fetchProductsQuery.hasNextPage || fetchProductsQuery.isFetchingNextPage
1415
+ }, /*#__PURE__*/React.createElement(CircularProgress, {
1416
+ color: "#000",
1417
+ width: "20px",
1418
+ height: "20px",
1419
+ duration: "1s"
1420
+ })))), sectionproperties.view_as_slider_vertical != 'Slider (Horizontal)' && /*#__PURE__*/React.createElement("div", {
1421
+ className: "row m-0 w-100 "
1422
+ }, cardsarray.map(function (cardinfoitem, cardinfoindex) {
1423
+ return /*#__PURE__*/React.createElement("div", {
1424
+ className: sectionproperties.numberOfColsvertical == '1' ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover' ? ' col-xl-12 p-0 col-lg-12 col-md-4 p-0 d-flex justify-content-center col-sm-6 ' : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft' ? ' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'ModernProductCard' ? ' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-12 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'MenuCard' ? ' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-12 d-flex justify-content-center p-0 ' : ' col-xl-12 p-0 col-lg-12 col-md-6 col-sm-12 d-flex justify-content-center p-0 ' : sectionproperties.numberOfColsvertical == '2' ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover' ? ' col-xl-6 p-0 col-lg-6 col-md-4 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft ' ? ' col-xl-6 p-0 col-lg-6 col-md-6 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'ModernProductCard' ? ' col-xl-6 p-0 col-lg-6 col-md-6 col-sm-12 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'MenuCard' ? ' col-xl-6 p-0 col-lg-6 col-md-12 col-sm-12 d-flex justify-content-center p-0 ' : ' col-xl-6 p-0 col-lg-6 col-md-6 col-sm-12 d-flex justify-content-center p-0' : sectionproperties.numberOfColsvertical == '3' ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover' ? ' col-xl-4 col-lg-4 col-md-4 col-sm-6 p-0 d-flex justify-content-center ' : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft' ? ' col-xl-4 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'ModernProductCard' ? ' col-xl-4 p-0 col-lg-4 col-md-4 col-sm-12 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'MenuCard' ? ' col-xl-4 p-0 col-lg-4 col-md-12 col-sm-12 d-flex justify-content-center p-0 ' : ' col-xl-4 col-lg-4 col-md-6 col-sm-12 d-flex justify-content-center p-0 ' : sectionproperties.numberOfColsvertical == '4' ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover' ? ' col-xl-3 p-0 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft' ? ' col-xl-3 p-0 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'ModernProductCard' ? ' col-xl-3 p-0 col-lg-4 col-md-6 col-sm-12 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'MenuCard' ? ' col-xl-3 p-0 col-lg-3 col-md-12 col-sm-12 d-flex justify-content-center p-0 ' : ' col-xl-3 col-lg-4 col-md-4 col-sm-6 p-0 d-flex justify-content-center p-0 ' : sectionproperties.numberOfColsvertical == '12' ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover' ? ' col-xl-3 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft' ? ' col-xl-3 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'MenuCard' ? ' col-xl-3 p-0 col-lg-4 col-md-12 col-sm-12 d-flex justify-content-center p-0 ' : '' : sectionproperties.numberOfColsvertical == '6' ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover' ? ' col-xl-2 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft' ? ' col-xl-2 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 ' : item.tabexsectioninfo.sectioncompname == 'MenuCard' ? ' col-xl-2 p-0 col-lg-2 col-md-12 col-sm-12 d-flex justify-content-center p-0 ' : ' col-xl-2 col-lg-4 col-md-6 col-sm-12 d-flex justify-content-center p-0 ' : ''
1425
+ }, /*#__PURE__*/React.createElement(Sectioncomp, _extends({
1426
+ sectiontypeprops: 'horizontal',
1427
+ fetchingtypeprops: fetchingtype,
1428
+ cardinfoindexprops: cardinfoindex,
1429
+ cardinfoitemprops: cardinfoitem,
1430
+ sectionindexprops: index,
1431
+ sectionidprops: item.sectionid
1432
+ }, props)));
1433
+ }), fetchingtype == 'products' && /*#__PURE__*/React.createElement("div", {
1434
+ className: "w-100 col-lg-12 allcentered"
1435
+ }, /*#__PURE__*/React.createElement("button", {
1436
+ className: section_cssstyles.loadbtn + ' d-flex justify-content-end align-items-center ' // ref={ref}
1437
+ ,
1438
+ onClick: function onClick() {
1439
+ return fetchProductsQuery.fetchNextPage();
1440
+ },
1441
+ disabled: !fetchProductsQuery.hasNextPage || fetchProductsQuery.isFetchingNextPage
1442
+ }, fetchProductsQuery.isFetchingNextPage ? /*#__PURE__*/React.createElement(CircularProgress, {
1443
+ color: "#000",
1444
+ width: "20px",
1445
+ height: "20px",
1446
+ duration: "1s"
1447
+ }) : fetchProductsQuery.hasNextPage ? 'Load more' : /*#__PURE__*/React.createElement(CircularProgress, {
1448
+ color: "#000",
1449
+ width: "20px",
1450
+ height: "20px",
1451
+ duration: "1s"
1452
+ })))));
1453
+ }
1454
+ }
1455
+ })));
1456
+ };
1457
+
1458
+ return /*#__PURE__*/React.createElement("div", {
1459
+ className: sectionproperties.card_marginLeft != 0 && sectionproperties.card_marginRight != 0 ? // mb-md-4
1460
+ ' row m-0 d-flex w-100 justify-content-center align-items-center pl-md-2 pr-md-2 ' : sectionproperties.card_marginRight != 0 ? ' row m-0 d-flex w-100 justify-content-center align-items-center pr-md-2 ' : sectionproperties.card_marginLeft != 0 ? ' row m-0 d-flex w-100 justify-content-center align-items-center pl-md-2 ' : ' row m-0 d-flex w-100 justify-content-center align-items-center ',
1461
+ style: {
1462
+ zIndex: 2,
1463
+ paddingLeft: langdetect == 'en' ? sectionproperties.card_marginLeft + 'px' : sectionproperties.card_marginRight + 'px',
1464
+ paddingRight: langdetect == 'en' ? sectionproperties.card_marginRight + 'px' : sectionproperties.card_marginLeft + 'px'
1465
+ }
1466
+ }, sectionproperties.length != 0 && /*#__PURE__*/React.createElement("div", {
1467
+ className: ' row ml-0 mr-0 d-flex align-items-center justify-content-center w-md-100 h-md-100 w-100 '
1468
+ }, sectionproperties.showFilter == 'show' && /*#__PURE__*/React.createElement("div", {
1469
+ className: sectionproperties.filterdirection == 'Horizontal' ? ' col-lg-12 ' : 'col-lg-3'
1470
+ }, /*#__PURE__*/React.createElement(Filter, {
1471
+ sectionpropertiesprops: sectionproperties
1472
+ })), fetchingtype == 'custom' && /*#__PURE__*/React.createElement(React.Fragment, null, cardsrender()), fetchingtype != 'custom' && cardsrender()));
1473
+ };
1474
+
1475
+ var cardsstyles = {"productcard":"Productccard_with_zoominonhover-module_productcard__8ASdR","card_thumbnail":"Productccard_with_zoominonhover-module_card_thumbnail__xCWyB","wishlistbtn":"Productccard_with_zoominonhover-module_wishlistbtn__-9K6V","card_inner":"Productccard_with_zoominonhover-module_card_inner__-pVNl","product_details":"Productccard_with_zoominonhover-module_product_details__3SLId","card_informationcontainer":"Productccard_with_zoominonhover-module_card_informationcontainer__suyHK","price":"Productccard_with_zoominonhover-module_price__12djA"};
1476
+
1477
+ function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1478
+
1479
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1480
+
1481
+ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(props) {
1482
+ var _css;
1483
+
1484
+ // const { lang, langdetect } = useContext(LanguageContext);
1485
+ // const { fetch_inst_tabex_websitetemplatesQueryContext, sectionindexcontext, pageindexcontext, StatePagePropertiesContext } = useContext(WebsiteDesignWorkPlaceContext);
1486
+ // const { addtofavoritescontext, setShowProductInfoModalContext, ProductIdProdutInfoModalContext, setProductIdProdutInfoModalContext, AddtoCartContext, AddtoCartMutationContext } =
1487
+ // useContext(FetchingContext);
1488
+ var _useState = useState(''),
1489
+ _useState2 = _slicedToArray(_useState, 2),
1490
+ sectionproperties = _useState2[0],
1491
+ setsectionproperties = _useState2[1];
1492
+
1493
+ var _useState3 = useState(props.cardinfoitemprops),
1494
+ _useState4 = _slicedToArray(_useState3, 2),
1495
+ item = _useState4[0],
1496
+ setitem = _useState4[1];
1497
+
1498
+ var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
1499
+ var lang = props.actions.lang;
1500
+ var langdetect = props.actions.langdetect;
1501
+ var setShowProductInfoModalContext = props.actions.setShowProductInfoModalContext;
1502
+ var addtofavoritescontext = props.actions.addtofavoritescontext;
1503
+ var setProductIdProdutInfoModalContext = props.actions.setProductIdProdutInfoModalContext;
1504
+ var AddtoCartContext = props.actions.AddtoCartContext;
1505
+ var AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
1506
+ var NotificationManager = NotificationManager;
1507
+ useEffect(function () {
1508
+ if (props.srcfrom == 'addsectionform') {
1509
+ var secpropobj = {};
1510
+ props.defaultproperties.forEach(function (defaultpropobj, defaultpropindex) {
1511
+ secpropobj[defaultpropobj.property_css_name] = defaultpropobj.property_value;
1512
+ });
1513
+ setsectionproperties(_objectSpread$1({}, secpropobj));
1514
+ } else {
1515
+ var secpropobj = {};
1516
+ StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
1517
+ if (sectionitem.sectionid == props.sectionidprops) {
1518
+ sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
1519
+ secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
1520
+ });
1521
+ }
1522
+ });
1523
+ setsectionproperties(_objectSpread$1({}, secpropobj));
1524
+ }
1525
+ }, [StatePagePropertiesContext]);
1526
+ useEffect(function () {
1527
+ if (props.cardinfoitemprops != undefined) {
1528
+ setitem(props.cardinfoitemprops);
1529
+ }
1530
+ }, [props.cardinfoitemprops]);
1531
+
1532
+ var updatequantity = function updatequantity(type) {
1533
+ var tempitem = _objectSpread$1({}, item);
1534
+
1535
+ tempitem.quantity = parseInt(tempitem.quantity);
1536
+
1537
+ if (type == 'add') {
1538
+ tempitem.quantity = tempitem.quantity + 1;
1539
+ } else if (type == 'remove') {
1540
+ tempitem.quantity = tempitem.quantity - 1;
1541
+ }
1542
+
1543
+ if (tempitem.quantity <= 0) {
1544
+ tempitem.quantity = 0;
1545
+ }
1546
+
1547
+ setitem(_objectSpread$1({}, tempitem));
1548
+ };
1549
+
1550
+ var addtocartfunc = function addtocartfunc() {
1551
+ var addtocardpayloadobj = {
1552
+ functype: 'add',
1553
+ productid: item.productid,
1554
+ variantid: '',
1555
+ quantity: item.quantity
1556
+ };
1557
+ var runfunc = false;
1558
+
1559
+ if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
1560
+ if (item.hasvariants == 1) {
1561
+ if (addtocardpayloadobj.variantid.length != 0) {
1562
+ runfunc = true;
1563
+ } else {
1564
+ NotificationManager.warning('', 'Please Choose Product Options');
1565
+ }
1566
+ } else {
1567
+ runfunc = true;
1568
+ }
1569
+ } else {
1570
+ NotificationManager.warning('', 'Please Choose Quantity');
1571
+ }
1572
+
1573
+ if (runfunc == true) {
1574
+ AddtoCartContext(addtocardpayloadobj);
1575
+ }
1576
+ };
1577
+
1578
+ var cardsstyles2 = {
1579
+ productcard: css({
1580
+ background: sectionproperties.backgroundColortransparent == 'Transparent' ? 'transparent' : sectionproperties.backgroundColor,
1581
+ opacity: sectionproperties.cardbg_opacity,
1582
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
1583
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
1584
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
1585
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
1586
+ paddingTop: sectionproperties.paddingTop + 'px',
1587
+ paddingBottom: sectionproperties.paddingBottom + 'px',
1588
+ paddingLeft: sectionproperties.paddingLeft + 'px',
1589
+ paddingRight: sectionproperties.paddingRight + 'px',
1590
+ boxShadow: sectionproperties.sectioncardshadow == 'Show' ? '0 0 10px ' + sectionproperties.sectioncardshadowcolor : 'none',
1591
+ border: sectionproperties.sectioncardborderwidth + 'px solid ' + sectionproperties.sectioncardbordercolor,
1592
+ transition: '.3s',
1593
+ ':hover': {
1594
+ zIndex: 1000
1595
+ }
1596
+ }),
1597
+ productNameStyles: css({
1598
+ color: sectionproperties.prodNameColor,
1599
+ fontSize: sectionproperties.prodNameFontSize + 'px',
1600
+ textTransform: sectionproperties.prodNameTextTranform,
1601
+ fontWeight: sectionproperties.prodNameFontWeight,
1602
+ transition: '.3s',
1603
+ cursor: 'pointer',
1604
+ ':hover': {
1605
+ color: sectionproperties.prodNameColorOnHover
1606
+ }
1607
+ }),
1608
+ productDescStyles: css({
1609
+ color: sectionproperties.prodCatColor,
1610
+ fontSize: sectionproperties.prodCatFontSize + 'px',
1611
+ textTransform: sectionproperties.prodCatTextTranform,
1612
+ fontWeight: sectionproperties.prodCatFontWeight,
1613
+ transition: '.3s'
1614
+ }),
1615
+ productPricestyles: css({
1616
+ color: sectionproperties.prodPriceColor,
1617
+ fontSize: sectionproperties.prodpriceFontSize + 'px',
1618
+ fontWeight: sectionproperties.prodPriceFontWeight
1619
+ }),
1620
+ productSalePricestyles: css({
1621
+ color: sectionproperties.prodsalePriceColor,
1622
+ fontSize: sectionproperties.prodsalepriceFontSize + 'px',
1623
+ fontWeight: sectionproperties.prodsalePriceFontWeight
1624
+ }),
1625
+ producttotalstyles: css({
1626
+ color: sectionproperties.total_color,
1627
+ fontSize: sectionproperties.total_fontsize + 'px',
1628
+ fontWeight: 500
1629
+ }),
1630
+ wishlist_btn: css({
1631
+ width: sectionproperties.favBtnWidth + 'px',
1632
+ height: sectionproperties.favBtnHeight + 'px',
1633
+ background: sectionproperties.favbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.favBtnbgColor,
1634
+ borderRadius: sectionproperties.fav_btn_borderBottomLeftRadius + 'px',
1635
+ color: sectionproperties.favBtniconcolor,
1636
+ fontSize: sectionproperties.favBtnTextfontsize + 'px',
1637
+ textTransform: sectionproperties.favBtnTexttransform,
1638
+ fontWeight: sectionproperties.favBtnTextfontweight,
1639
+ transition: '.3s',
1640
+ border: sectionproperties.favbtnborderwidth + 'px solid ' + sectionproperties.favbtnbordercolor,
1641
+ ':hover': {
1642
+ background: sectionproperties.favbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.favBtnbgColoronhover,
1643
+ color: sectionproperties.favBtnTextcoloronhover
1644
+ }
1645
+ }),
1646
+ cart_btn: css({
1647
+ width: sectionproperties.cartBtnWidth + 'px',
1648
+ height: sectionproperties.cartBtnHeight + 'px',
1649
+ background: sectionproperties.cartbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColor,
1650
+ borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
1651
+ color: sectionproperties.cartBtnTextcolor,
1652
+ fontSize: sectionproperties.cartBtnTextfontsize + 'px',
1653
+ // fontSize: sectionproperties.cartBtn_iconFontSize + 'px',
1654
+ textTransform: sectionproperties.cartBtnTexttransform,
1655
+ fontWeight: sectionproperties.cartBtnTextfontweight,
1656
+ border: sectionproperties.cartbtnborderwidth + 'px solid ' + sectionproperties.cartbtnbordercolor,
1657
+ transition: '.3s',
1658
+ ':hover': {
1659
+ background: sectionproperties.cartbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColoronhover,
1660
+ color: sectionproperties.cartBtnTextcoloronhover
1661
+ }
1662
+ }),
1663
+ img_container: css({
1664
+ position: 'relative',
1665
+ height: sectionproperties.prodimage_height + 'px',
1666
+ border: sectionproperties.prodimage_borderwidth + 'px solid ' + sectionproperties.prodimage_color,
1667
+ borderBottomLeftRadius: sectionproperties.prodimage__borderBottomLeftRadius + 'px',
1668
+ borderBottomRightRadius: sectionproperties.prodimage__borderBottomRightRadius + 'px',
1669
+ borderTopLeftRadius: sectionproperties.prodimage__borderTopLeftRadius + 'px',
1670
+ borderTopRightRadius: sectionproperties.prodimage__borderTopRightRadius + 'px',
1671
+ background: sectionproperties.prodimage_bgcolor
1672
+ }),
1673
+ quantitybtn: css((_css = {
1674
+ flex: 1,
1675
+ border: sectionproperties.quantitybtnborderwidth + 'px solid ' + sectionproperties.quantitybtnbordercolor,
1676
+ height: sectionproperties.quantitybtn_height + 'px'
1677
+ }, _defineProperty(_css, "height", '40px'), _defineProperty(_css, "display", 'flex'), _defineProperty(_css, "flexDirection", 'row'), _defineProperty(_css, "overflow", 'hidden'), _defineProperty(_css, "borderRadius", sectionproperties.quantitybtn_borderradius + 'px'), _defineProperty(_css, "background", sectionproperties.quantitybtn_bgcolor), _defineProperty(_css, "alignItems", 'center'), _defineProperty(_css, "justifyContent", 'center'), _defineProperty(_css, "margin", 0), _defineProperty(_css, "position", 'relative'), _defineProperty(_css, "fontWeight", sectionproperties.quantitybtn_textfontweight), _defineProperty(_css, "color", sectionproperties.quantitybtn_textcolor), _defineProperty(_css, "fontSize", sectionproperties.quantitybtn_textfontsize + 'px'), _css)),
1678
+ quantitybtn_text: css({
1679
+ margin: 'auto'
1680
+ }),
1681
+ add_quantitybtn_icon_container: css({
1682
+ position: 'relative',
1683
+ width: sectionproperties.add_quantitybtn_width + 'px',
1684
+ height: sectionproperties.add_quantitybtn_height + 'px',
1685
+ background: sectionproperties.add_quantitybtn_bgcolor,
1686
+ display: 'flex',
1687
+ alignItems: 'center',
1688
+ justifyContent: 'center',
1689
+ borderRadius: sectionproperties.add_quantitybtn_borderradius + 'px',
1690
+ fontSize: sectionproperties.add_quantitybtn_textfontsize + 'px',
1691
+ color: sectionproperties.add_quantitybtn_textcolor,
1692
+ transition: '.3s',
1693
+ ':hover': {
1694
+ color: sectionproperties.add_quantitybtn_textcoloronhover,
1695
+ background: sectionproperties.add_quantitybtn_bgcoloronhover
1696
+ }
1697
+ }),
1698
+ minus_quantitybtn_icon_container: css({
1699
+ position: 'relative',
1700
+ width: sectionproperties.remove_quantitybtn_width + 'px',
1701
+ height: sectionproperties.remove_quantitybtn_height + 'px',
1702
+ background: sectionproperties.remove_quantitybtn_bgcolor,
1703
+ display: 'flex',
1704
+ alignItems: 'center',
1705
+ justifyContent: 'center',
1706
+ borderRadius: sectionproperties.remove_quantitybtn_borderradius + 'px',
1707
+ fontSize: sectionproperties.remove_quantitybtn_textfontsize + '25px',
1708
+ color: sectionproperties.remove_quantitybtn_textcolor,
1709
+ transition: '.3s',
1710
+ ':hover': {
1711
+ color: sectionproperties.remove_quantitybtn_textcoloronhover,
1712
+ background: sectionproperties.remove_quantitybtn_bgcoloronhover
1713
+ }
1714
+ })
1715
+ };
1716
+
1717
+ var addtocartbuttonrender = function addtocartbuttonrender() {
1718
+ if (AddtoCartMutationContext.isLoading) {
1719
+ var _AddtoCartMutationCon;
1720
+
1721
+ if ((AddtoCartMutationContext === null || AddtoCartMutationContext === void 0 ? void 0 : (_AddtoCartMutationCon = AddtoCartMutationContext.variables) === null || _AddtoCartMutationCon === void 0 ? void 0 : _AddtoCartMutationCon.productid) == item.productid) {
1722
+ return /*#__PURE__*/React.createElement("div", {
1723
+ className: ' d-flex align-items-center justify-content-center '
1724
+ }, /*#__PURE__*/React.createElement(CircularProgress, {
1725
+ color: "white",
1726
+ width: "20px",
1727
+ height: "20px",
1728
+ duration: "1s"
1729
+ }));
1730
+ } else {
1731
+ return lang.addtocart;
1732
+ }
1733
+ }
1734
+
1735
+ if (!AddtoCartMutationContext.isLoading) {
1736
+ return lang.addtocart;
1737
+ }
1738
+ };
1739
+
1740
+ return /*#__PURE__*/React.createElement("div", {
1741
+ className: "row ml-0 mr-0 w-100 mb-sm-5",
1742
+ style: {
1743
+ paddingLeft: sectionproperties.card_marginLeft + 'px',
1744
+ paddingRight: sectionproperties.card_marginRight + 'px',
1745
+ marginBottom: sectionproperties.marginBottom + 'px',
1746
+ minHeight: '370px'
1747
+ }
1748
+ }, sectionproperties.length != 0 && /*#__PURE__*/React.createElement("div", {
1749
+ className: "".concat(cardsstyles.productcard, " ").concat(cardsstyles2.productcard) + ' w-100 '
1750
+ }, /*#__PURE__*/React.createElement("div", {
1751
+ className: "".concat(cardsstyles.card_inner)
1752
+ }, /*#__PURE__*/React.createElement("div", {
1753
+ className: "".concat(cardsstyles.card_thumbnail)
1754
+ }, /*#__PURE__*/React.createElement("div", {
1755
+ className: "".concat(cardsstyles.img_container, " ").concat(cardsstyles2.img_container) + ' w-100 ',
1756
+ onClick: function onClick() {
1757
+ setShowProductInfoModalContext(true);
1758
+ setProductIdProdutInfoModalContext(item.productid);
1759
+ },
1760
+ style: {
1761
+ cursor: 'pointer',
1762
+ overflow: 'hidden'
1763
+ }
1764
+ }, /*#__PURE__*/React.createElement(IKImage, {
1765
+ urlEndpoint: IKurlEndpoint,
1766
+ publicKey: IKpublicKey,
1767
+ path: '/tr:w-300,h-300/' + item.image,
1768
+ style: {
1769
+ width: '100%',
1770
+ objectFit: 'contain',
1771
+ position: 'relative',
1772
+ borderBottomLeftRadius: sectionproperties.prodimage__borderBottomLeftRadius + 'px',
1773
+ borderBottomRightRadius: sectionproperties.prodimage__borderBottomRightRadius + 'px',
1774
+ borderTopLeftRadius: sectionproperties.prodimage__borderTopLeftRadius + 'px',
1775
+ borderTopRightRadius: sectionproperties.prodimage__borderTopRightRadius + 'px',
1776
+ marginBottom: 'auto'
1777
+ },
1778
+ loading: "lazy"
1779
+ })), sectionproperties.favBtnShow == 'Show' && /*#__PURE__*/React.createElement("div", {
1780
+ className: "".concat(cardsstyles.wishlistbtn),
1781
+ onClick: function onClick() {
1782
+ addtofavoritescontext(item.productid);
1783
+ }
1784
+ }, /*#__PURE__*/React.createElement("button", {
1785
+ className: " ".concat(cardsstyles2.wishlist_btn) + ' m-0 p-0 d-flex align-items-center justify-content-center ',
1786
+ style: {
1787
+ position: 'absolute',
1788
+ top: 10,
1789
+ right: 10,
1790
+ background: item.IsFavExists == true ? sectionproperties.activebgcolor : ''
1791
+ }
1792
+ }, item.IsFavExists && /*#__PURE__*/React.createElement("i", {
1793
+ className: "h-100 d-flex align-items-center justify-content-center"
1794
+ }, /*#__PURE__*/React.createElement(AiFillStar, {
1795
+ size: sectionproperties.favBtnIconfontsize,
1796
+ style: {
1797
+ color: sectionproperties.activefaviconcolor
1798
+ }
1799
+ })), !item.IsFavExists && /*#__PURE__*/React.createElement("i", {
1800
+ className: "h-100 d-flex align-items-center justify-content-center"
1801
+ }, /*#__PURE__*/React.createElement(AiFillStar, {
1802
+ size: sectionproperties.favBtnIconfontsize
1803
+ }))))), /*#__PURE__*/React.createElement("div", {
1804
+ className: "".concat(cardsstyles.product_details) + ' mb-2 '
1805
+ }, sectionproperties.prodNameShow == 'Show' && /*#__PURE__*/React.createElement("div", {
1806
+ className: "col-lg-12",
1807
+ style: {
1808
+ minHeight: '5vh'
1809
+ }
1810
+ }, /*#__PURE__*/React.createElement("p", {
1811
+ className: "".concat(cardsstyles2.productNameStyles) + ' m-0 p-0 wordbreak wordbreak2 ',
1812
+ style: {
1813
+ textAlign: langdetect == 'en' ? 'left' : 'right'
1814
+ }
1815
+ }, item.name)), /*#__PURE__*/React.createElement("div", {
1816
+ className: "col-lg-12 d-flex align-items-center"
1817
+ }, sectionproperties.prodPriceShow == 'Show' && /*#__PURE__*/React.createElement("p", {
1818
+ className: "".concat(cardsstyles2.productPricestyles) + ' m-0 p-0 wordbreak ',
1819
+ style: {
1820
+ textAlign: langdetect == 'en' ? 'left' : 'right'
1821
+ }
1822
+ }, langdetect == 'en' ? 'EGP' : '', " ", item.hassale == 1 ? item.defaultsaleprice : item.defaultprice, " ", langdetect == 'en' ? '' : 'ج.م'), item.hassale == 1 && /*#__PURE__*/React.createElement("p", {
1823
+ className: "".concat(cardsstyles2.productSalePricestyles) + ' linethrough mt-auto mb-0 p-0 wordbreak mr-1 ml-1 ',
1824
+ style: {
1825
+ textAlign: langdetect == 'en' ? 'left' : 'right'
1826
+ }
1827
+ }, langdetect == 'en' ? 'EGP' : '', " ", item.defaultprice, " ", langdetect == 'en' ? '' : 'ج.م'))), /*#__PURE__*/React.createElement("div", {
1828
+ className: "".concat(cardsstyles.card_informationcontainer)
1829
+ }, /*#__PURE__*/React.createElement("div", {
1830
+ className: "row m-0 w-100 d-flex align-items-center"
1831
+ }, /*#__PURE__*/React.createElement("button", {
1832
+ className: "".concat(cardsstyles2.quantitybtn) + ' p-0 d-flex align-items-center justify-content-center '
1833
+ }, langdetect == 'en' && /*#__PURE__*/React.createElement("span", {
1834
+ className: "".concat(cardsstyles2.minus_quantitybtn_icon_container) + ' m-1 ',
1835
+ style: {
1836
+ transform: ' rotate(-180deg)'
1837
+ },
1838
+ onClick: function onClick() {
1839
+ if (item.hasvariants == 0) {
1840
+ updatequantity('remove');
1841
+ } else {
1842
+ setShowProductInfoModalContext(true);
1843
+ setProductIdProdutInfoModalContext(item.productid);
1844
+ }
1845
+ }
1846
+ }, /*#__PURE__*/React.createElement("i", {
1847
+ className: "fa fa-chevron-up font-12"
1848
+ })), langdetect == 'ar' && /*#__PURE__*/React.createElement("span", {
1849
+ className: "".concat(cardsstyles2.add_quantitybtn_icon_container) + ' m-1 ',
1850
+ onClick: function onClick() {
1851
+ updatequantity('add');
1852
+ }
1853
+ }, /*#__PURE__*/React.createElement("i", {
1854
+ className: "fa fa-chevron-up font-12"
1855
+ })), /*#__PURE__*/React.createElement("span", {
1856
+ className: "".concat(cardsstyles2.quantitybtn_text) + ' d-flex align-items-center justify-content-center '
1857
+ }, item.quantity), langdetect == 'ar' && /*#__PURE__*/React.createElement("span", {
1858
+ className: "".concat(cardsstyles2.minus_quantitybtn_icon_container) + ' m-1 ',
1859
+ style: {
1860
+ transform: ' rotate(-180deg)'
1861
+ },
1862
+ onClick: function onClick() {
1863
+ updatequantity('remove');
1864
+ }
1865
+ }, /*#__PURE__*/React.createElement("i", {
1866
+ className: "fa fa-chevron-up font-12"
1867
+ })), langdetect == 'en' && /*#__PURE__*/React.createElement("span", {
1868
+ className: "".concat(cardsstyles2.add_quantitybtn_icon_container) + ' m-1 ',
1869
+ onClick: function onClick() {
1870
+ if (item.hasvariants == 0) {
1871
+ updatequantity('add');
1872
+ } else {
1873
+ setShowProductInfoModalContext(true);
1874
+ setProductIdProdutInfoModalContext(item.productid);
1875
+ }
1876
+ }
1877
+ }, /*#__PURE__*/React.createElement("i", {
1878
+ className: "fa fa-chevron-up font-12"
1879
+ }))), /*#__PURE__*/React.createElement("div", {
1880
+ className: "d-flex justify-content-start pl-2 pr-2",
1881
+ style: {
1882
+ flex: 1
1883
+ }
1884
+ }, /*#__PURE__*/React.createElement("p", {
1885
+ className: "".concat(cardsstyles2.producttotalstyles) + ' mb-0 ',
1886
+ style: {
1887
+ textAlign: langdetect == 'en' ? 'left' : 'right'
1888
+ }
1889
+ }, lang.total, ": ", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("span", {
1890
+ style: {
1891
+ color: sectionproperties.total_secondaryColor,
1892
+ fontWeight: sectionproperties.total_fontweight,
1893
+ textAlign: langdetect == 'en' ? 'left' : 'right'
1894
+ }
1895
+ }, langdetect == 'en' ? 'EGP' : '', " ", item.hassale == 1 ? item.quantity * item.defaultsaleprice : item.quantity * item.defaultprice, ' ', langdetect == 'en' ? '' : 'ج.م')))), /*#__PURE__*/React.createElement("div", {
1896
+ className: "col-lg-12 d-flex align-items-center justify-content-center p-0 mb-2 mt-2"
1897
+ }, sectionproperties.cartBtnShow == 'Show' && /*#__PURE__*/React.createElement("p", {
1898
+ className: "".concat(cardsstyles2.cart_btn) + ' font-md-13 m-0 p-0 d-flex align-items-center justify-content-center cursor-pointer ',
1899
+ onClick: function onClick() {
1900
+ if (item.hasvariants == 0) {
1901
+ addtocartfunc();
1902
+ } else {
1903
+ setShowProductInfoModalContext(true);
1904
+ setProductIdProdutInfoModalContext(item.productid);
1905
+ }
1906
+ },
1907
+ disabled: AddtoCartMutationContext.isLoading
1908
+ }, /*#__PURE__*/React.createElement("i", {
1909
+ className: langdetect == 'en' ? 'h-100 mr-2 d-flex align-items-center justify-content-center' : 'h-100 ml-2 d-flex align-items-center justify-content-center'
1910
+ }, /*#__PURE__*/React.createElement(FiShoppingCart, {
1911
+ size: sectionproperties.cartBtn_iconFontSize
1912
+ })), addtocartbuttonrender()))))));
1913
+ };
1914
+
1915
+ var cardstyles = {"categoryCard":"categorycard3-module_categoryCard__3mSQo"};
1916
+
1917
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1918
+
1919
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1920
+
1921
+ var Categorycard_with_twolinestransition = function Categorycard_with_twolinestransition(props) {
1922
+ var _css;
1923
+
1924
+ // const { lang, setlang, langdetect } = useContext(LanguageContext);
1925
+ // const { fetch_inst_tabex_websitetemplatesQueryContext, sectionindexcontext, pageindexcontext, StatePagePropertiesContext } = React.useContext(WebsiteDesignWorkPlaceContext);
1926
+ // const { routingcountext, StaticPagesLinksContext } = useContext(TemplateRoutingContext);
1927
+ var _useState = useState(''),
1928
+ _useState2 = _slicedToArray(_useState, 2),
1929
+ sectionproperties = _useState2[0],
1930
+ setsectionproperties = _useState2[1];
1931
+
1932
+ var _useState3 = useState(props.cardinfoitemprops),
1933
+ _useState4 = _slicedToArray(_useState3, 2),
1934
+ item = _useState4[0];
1935
+ _useState4[1];
1936
+
1937
+ var _useState5 = useState(props.cardinfoindexprops),
1938
+ _useState6 = _slicedToArray(_useState5, 2);
1939
+ _useState6[0];
1940
+ _useState6[1];
1941
+
1942
+ var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
1943
+ props.actions.lang;
1944
+ var langdetect = props.actions.langdetect;
1945
+ useEffect(function () {
1946
+ if (props.srcfrom == 'addsectionform') {
1947
+ var secpropobj = {};
1948
+ props.defaultproperties.forEach(function (defaultpropobj, defaultpropindex) {
1949
+ secpropobj[defaultpropobj.property_css_name] = defaultpropobj.property_value;
1950
+ });
1951
+ setsectionproperties(_objectSpread({}, secpropobj));
1952
+ } else {
1953
+ var secpropobj = {};
1954
+ StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
1955
+ if (sectionitem.sectionid == props.sectionidprops) {
1956
+ sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
1957
+ secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
1958
+ });
1959
+ }
1960
+ });
1961
+ setsectionproperties(_objectSpread({}, secpropobj));
1962
+ }
1963
+ }, [StatePagePropertiesContext]);
1964
+
1965
+ var plainString = function plainString(html) {
1966
+ var divContainer = document.createElement('div');
1967
+ divContainer.innerHTML = html;
1968
+ return divContainer.textContent || divContainer.innerText || '';
1969
+ };
1970
+
1971
+ var categorycard_cssstyles = {
1972
+ categoryCard: css((_css = {
1973
+ background: sectionproperties.backgroundColortransparent == 'Transparent' ? sectionproperties.backgroundColor : '',
1974
+ border: sectionproperties.sectioncardborderwidth + 'px solid ' + sectionproperties.sectioncardbordercolor,
1975
+ height: sectionproperties.height + 'px',
1976
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
1977
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
1978
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
1979
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px'
1980
+ }, _defineProperty(_css, "border", sectionproperties.sectioncardborderwidth + 'px solid ' + sectionproperties.sectioncardbordercolor), _defineProperty(_css, "marginTop", sectionproperties.marginTop + 'px'), _defineProperty(_css, "marginBottom", sectionproperties.marginBottom + 'px'), _defineProperty(_css, "paddingLeft", sectionproperties.paddingLeft + 'px'), _defineProperty(_css, "paddingRight", sectionproperties.paddingRight + 'px'), _defineProperty(_css, "paddingTop", sectionproperties.paddingTop + 'px'), _defineProperty(_css, "paddingBottom", sectionproperties.paddingBottom + 'px'), _defineProperty(_css, "transition", '0.3s'), _defineProperty(_css, "cursor", 'pointer'), _defineProperty(_css, ':after', {
1981
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
1982
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
1983
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
1984
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
1985
+ content: 's',
1986
+ fontSize: 0,
1987
+ position: 'absolute',
1988
+ top: 0,
1989
+ bottom: 0,
1990
+ left: 0,
1991
+ width: '100%',
1992
+ height: '100%',
1993
+ zIndex: 1,
1994
+ transition: ' 0.3s',
1995
+ background: sectionproperties.transitionbg_color,
1996
+ opacity: sectionproperties.cardtransition_opacity
1997
+ }), _defineProperty(_css, ':hover:after', {
1998
+ opacity: sectionproperties.cardtransitionbgopacityonhover
1999
+ }), _css)),
2000
+ caption: css({
2001
+ zIndex: 2,
2002
+ ':before': {
2003
+ borderTop: sectionproperties.bordertransitionbg_colorwidth + 'px solid ' + sectionproperties.bordertransitionbg_color,
2004
+ borderBottom: sectionproperties.bordertransitionbg_colorwidth + 'px solid ' + sectionproperties.bordertransitionbg_color,
2005
+ opacity: sectionproperties.bordertransitionopacityonhover
2006
+ }
2007
+ }),
2008
+ categorycardtext: css({
2009
+ fontSize: sectionproperties.generaltext_fontSize + 'px',
2010
+ color: sectionproperties.generaltext_fontColor,
2011
+ textTransform: sectionproperties.generaltext_textTransform,
2012
+ fontWeight: sectionproperties.generaltext_fontWeight,
2013
+ opacity: 1,
2014
+ transitionDelay: '0.3s'
2015
+ }),
2016
+ categorydescription: css({
2017
+ fontSize: sectionproperties.prodCatFontSize + 'px',
2018
+ color: sectionproperties.prodCatColor,
2019
+ fontWeight: sectionproperties.prodCatFontWeight,
2020
+ opacity: 1,
2021
+ transitionDelay: '0.3s'
2022
+ }),
2023
+ cardbtn: css({
2024
+ transition: '0.3s',
2025
+ color: sectionproperties.generalbtn_textColor,
2026
+ fontSize: sectionproperties.generalbtn_fontsize + 'px',
2027
+ height: sectionproperties.generalbtn_height + 'px',
2028
+ width: sectionproperties.generalbtn_width + 'px',
2029
+ background: sectionproperties.generalbtn_bgColortransparent == 'Transparent' ? 'transparent' : sectionproperties.generalbtn_bgColor,
2030
+ borderTopLeftRadius: sectionproperties.generalbtn_bordertopleftradius + 'px',
2031
+ borderTopRightRadius: sectionproperties.generalbtn_bordertoprightradius + 'px',
2032
+ borderBottomLeftRadius: sectionproperties.generalbtn_borderbottomleftradius + 'px',
2033
+ borderBottomRightRadius: sectionproperties.generalbtn_borderbottomrightradius + 'px',
2034
+ fontWeight: sectionproperties.generalbtn_fontweight,
2035
+ zIndex: 100,
2036
+ ':hover': {
2037
+ background: sectionproperties.generalbtn_bgColortransparentonhover == 'Transparent' ? 'transparent' : sectionproperties.generalbtn_bgColoronhover,
2038
+ color: sectionproperties.generalbtn_textColoronhover
2039
+ }
2040
+ })
2041
+ };
2042
+ return /*#__PURE__*/React.createElement("div", {
2043
+ className: "row m-0 w-100",
2044
+ style: {
2045
+ paddingLeft: sectionproperties.card_marginLeft + 'px',
2046
+ paddingRight: sectionproperties.card_marginRight + 'px'
2047
+ }
2048
+ }, /*#__PURE__*/React.createElement("div", {
2049
+ className: "".concat(categorycard_cssstyles.categoryCard, " ").concat(cardstyles.categoryCard) + ' col-lg-12 ',
2050
+ onClick: function onClick() {
2051
+ if (props.fetchingtypeprops == 'collections') {
2052
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, item.collectionid);
2053
+ }
2054
+ }
2055
+ }, /*#__PURE__*/React.createElement(IKImage, {
2056
+ urlEndpoint: IKurlEndpoint,
2057
+ publicKey: IKpublicKey,
2058
+ path: item.image,
2059
+ loading: "lazy",
2060
+ style: {
2061
+ height: '100%',
2062
+ width: '100%',
2063
+ objectFit: 'cover'
2064
+ }
2065
+ }), /*#__PURE__*/React.createElement("figcaption", {
2066
+ className: "".concat(categorycard_cssstyles.caption) + ' row w-100 m-0 d-flex align-items-center justify-content-center ',
2067
+ style: {
2068
+ position: 'absolute',
2069
+ top: 0,
2070
+ left: 0
2071
+ }
2072
+ }, /*#__PURE__*/React.createElement("div", {
2073
+ clas: "col-lg-12 m-0 d-flex align-items-center justify-content-start w-100 h-100 ",
2074
+ style: {
2075
+ width: '100%',
2076
+ height: '100%'
2077
+ }
2078
+ }, /*#__PURE__*/React.createElement("div", {
2079
+ className: "row m-0 w-100 h-100",
2080
+ style: {
2081
+ position: 'relative',
2082
+ height: '100%'
2083
+ }
2084
+ }, /*#__PURE__*/React.createElement("div", {
2085
+ className: "col-lg-12 d-flex justify-content-center align-items-center flex-column"
2086
+ }, sectionproperties.general_showtext == 'Show' && /*#__PURE__*/React.createElement("p", {
2087
+ className: "".concat(categorycard_cssstyles.categorycardtext) + ' m-0 p-0 text-center '
2088
+ }, item.name), sectionproperties.prodCatShow == 'Show' && /*#__PURE__*/React.createElement("p", {
2089
+ className: "".concat(categorycard_cssstyles.categorydescription) + ' PacificoFont m-0 p-0 text-center '
2090
+ }, plainString(item.description)), sectionproperties.generalbtn_show == 'Show' && /*#__PURE__*/React.createElement("button", {
2091
+ className: "".concat(categorycard_cssstyles.cardbtn, " "),
2092
+ onClick: function onClick() {
2093
+ if (props.fetchingtypeprops == 'collections') {
2094
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, item.collectionid);
2095
+ }
2096
+ }
2097
+ }, langdetect == 'en' ? sectionproperties.slideshow_btn_text : sectionproperties.slideshow_btn_text_ar)))))));
2098
+ };
2099
+
833
2100
  var returnLibrary = function returnLibrary() {
834
2101
  return {
835
2102
  AwesomeButton: AwesomeButton,
836
- Header8: Header8 // you can add here other components that you want to export
837
-
2103
+ Header8: Header8,
2104
+ CardsSection: CardsSection,
2105
+ Categorycard_with_twolinestransition: Categorycard_with_twolinestransition,
2106
+ Productcard_with_zoominonhover: Productcard_with_zoominonhover
838
2107
  };
839
2108
  };
840
2109