@lanaco/lnc-react-ui 4.0.169 → 4.0.171

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.
Files changed (173) hide show
  1. package/dist/Accordion.js +1 -1
  2. package/dist/AccordionSummary.js +1 -1
  3. package/dist/ActionsToolbar.js +1 -1
  4. package/dist/Alert.js +1 -1
  5. package/dist/Avatar.js +1 -1
  6. package/dist/Badge.js +1 -1
  7. package/dist/BannerSectionCarousel.cjs +9 -48
  8. package/dist/BannerSectionCarousel.js +208 -249
  9. package/dist/BannerSectionSimple.js +1 -1
  10. package/dist/BannerSectionWithList.js +1 -1
  11. package/dist/BlogCardsSponsoredSection.cjs +8 -8
  12. package/dist/BlogCardsSponsoredSection.js +67 -68
  13. package/dist/BlogCategoryCardsSection.cjs +1 -1
  14. package/dist/BlogCategoryCardsSection.js +22 -30
  15. package/dist/BlogExploreSection.js +9 -9
  16. package/dist/BlogListSection.cjs +11 -5
  17. package/dist/BlogListSection.js +187 -123
  18. package/dist/BlogProductCardsSection.cjs +1 -1
  19. package/dist/BlogProductCardsSection.js +28 -37
  20. package/dist/BlogShopCardsSection.cjs +1 -1
  21. package/dist/BlogShopCardsSection.js +40 -67
  22. package/dist/BlogSingleSection.cjs +16 -1
  23. package/dist/BlogSingleSection.js +47 -45
  24. package/dist/BlogsSectionDetailed.cjs +8 -27
  25. package/dist/BlogsSectionDetailed.js +111 -159
  26. package/dist/BlogsSectionLarge.cjs +19 -4
  27. package/dist/BlogsSectionLarge.js +73 -37
  28. package/dist/BlogsSectionSimple.cjs +9 -9
  29. package/dist/BlogsSectionSimple.js +81 -107
  30. package/dist/BlogsSectionSimpleCentered.cjs +25 -23
  31. package/dist/BlogsSectionSimpleCentered.js +103 -96
  32. package/dist/BlogsSectionWithFilters.cjs +31 -29
  33. package/dist/BlogsSectionWithFilters.js +173 -134
  34. package/dist/BrandHitsSection.cjs +10 -14
  35. package/dist/BrandHitsSection.js +93 -45
  36. package/dist/Breadcrumbs.js +1 -1
  37. package/dist/Button.js +1 -1
  38. package/dist/ButtonGroup.js +1 -1
  39. package/dist/CalorieCalculatorSection.js +1 -1
  40. package/dist/CategorySimpleCard-Qe5QStrs.cjs +47 -0
  41. package/dist/CategorySimpleCard-laAY-RUT.js +70 -0
  42. package/dist/CheckBoxInput.js +1 -1
  43. package/dist/Chip.js +1 -1
  44. package/dist/ColorInput.js +1 -1
  45. package/dist/ConfirmationForm.js +1 -1
  46. package/dist/CustomLoanMapSection.js +1 -1
  47. package/dist/{CustomStyles-SyQRnjuy.js → CustomStyles-ArAVZsIj.js} +1 -1
  48. package/dist/DateInput.js +1 -1
  49. package/dist/DecimalInput.js +1 -1
  50. package/dist/DecimalInputV2.js +1 -1
  51. package/dist/DetailedProductsInfinitiveSection.cjs +3 -3
  52. package/dist/DetailedProductsInfinitiveSection.js +35 -36
  53. package/dist/DetailedProductsSection.cjs +4 -4
  54. package/dist/DetailedProductsSection.js +62 -63
  55. package/dist/DetailsView.js +1 -1
  56. package/dist/DoubleRangeSlider.js +1 -1
  57. package/dist/DragAndDropFile.js +1 -1
  58. package/dist/DragDropFiles.js +1 -1
  59. package/dist/Drawer.js +1 -1
  60. package/dist/Dropdown.js +2 -2
  61. package/dist/DropdownItem.js +1 -1
  62. package/dist/DropdownLookup.js +1 -1
  63. package/dist/DropdownMenu.js +1 -1
  64. package/dist/EditableTable.js +1 -1
  65. package/dist/FeedbackSection.js +1 -1
  66. package/dist/FieldOfInterestsMasonrySection.cjs +20 -25
  67. package/dist/FieldOfInterestsMasonrySection.js +228 -154
  68. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +33 -24
  69. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +178 -113
  70. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -16
  71. package/dist/FieldOfInterestsWithTagsCardsSection.js +89 -93
  72. package/dist/FileInput.js +1 -1
  73. package/dist/FlexGridItem.js +1 -1
  74. package/dist/FormField.js +1 -1
  75. package/dist/FormView.js +1 -1
  76. package/dist/GeneralWithTagsCardsSection.cjs +11 -27
  77. package/dist/GeneralWithTagsCardsSection.js +87 -99
  78. package/dist/GiftCardsSection.cjs +18 -23
  79. package/dist/GiftCardsSection.js +146 -77
  80. package/dist/Icon.js +1 -1
  81. package/dist/IconButton.js +1 -1
  82. package/dist/Kanban.js +1 -1
  83. package/dist/KanbanActionsToolbar.js +1 -1
  84. package/dist/KanbanView.js +1 -1
  85. package/dist/Link.js +1 -1
  86. package/dist/LoanCalculatorSection.js +1 -1
  87. package/dist/LocationFinderSection.js +1 -1
  88. package/dist/LocationSearchSection.js +1 -1
  89. package/dist/MasonryGeneralCardsSection.cjs +33 -19
  90. package/dist/MasonryGeneralCardsSection.js +114 -68
  91. package/dist/MenuItem.js +1 -1
  92. package/dist/Modal.js +1 -1
  93. package/dist/MultiSelectDropdown.js +1 -1
  94. package/dist/MultiSelectDropdownLookup.js +1 -1
  95. package/dist/NestedDropdownItem.js +1 -1
  96. package/dist/NestedMenuItem.js +1 -1
  97. package/dist/NotificationContainer.js +1 -1
  98. package/dist/NotificationMessage.js +1 -1
  99. package/dist/NumberInput.js +1 -1
  100. package/dist/OverlayGeneralCardsSection.cjs +5 -5
  101. package/dist/OverlayGeneralCardsSection.js +54 -40
  102. package/dist/PasswordInput.js +1 -1
  103. package/dist/PopoverContent.js +1 -1
  104. package/dist/ProductsWithBannerSection.cjs +15 -20
  105. package/dist/ProductsWithBannerSection.js +176 -104
  106. package/dist/ProgressBar.js +1 -1
  107. package/dist/QuattroCardsSection.cjs +6 -6
  108. package/dist/QuattroCardsSection.js +42 -34
  109. package/dist/QuizSection.js +1 -1
  110. package/dist/RadioInput.js +1 -1
  111. package/dist/RangeSlider.js +1 -1
  112. package/dist/ReviewsSection.cjs +24 -30
  113. package/dist/ReviewsSection.js +170 -137
  114. package/dist/SalesCampaignsSection.cjs +46 -130
  115. package/dist/SalesCampaignsSection.js +354 -433
  116. package/dist/Separator.js +1 -1
  117. package/dist/ShopCardsSection.cjs +18 -5
  118. package/dist/ShopCardsSection.js +145 -88
  119. package/dist/Sidebar.js +1 -1
  120. package/dist/SimpleCategoriesSection.cjs +10 -4
  121. package/dist/SimpleCategoriesSection.js +79 -51
  122. package/dist/SimpleProductsSection.cjs +16 -3
  123. package/dist/SimpleProductsSection.js +172 -70
  124. package/dist/Spinner.js +1 -1
  125. package/dist/StatsSection.js +4 -4
  126. package/dist/Surface.js +1 -1
  127. package/dist/SwipeableDrawer.js +1 -1
  128. package/dist/TabItem.js +1 -1
  129. package/dist/Table.js +1 -1
  130. package/dist/TableView.js +1 -1
  131. package/dist/TextAreaInput.js +1 -1
  132. package/dist/TextInput.js +1 -1
  133. package/dist/ThemeProvider.js +1 -1
  134. package/dist/TimeInput.js +1 -1
  135. package/dist/Toggle.js +1 -1
  136. package/dist/TreeMenuSeparator.js +1 -1
  137. package/dist/UploadedFile.js +1 -1
  138. package/dist/UrgentSaleProductsSection.cjs +2 -2
  139. package/dist/UrgentSaleProductsSection.js +62 -61
  140. package/dist/index-BAJkosVg.cjs +11 -0
  141. package/dist/{index-dXWRbvgi.js → index-BMOLVn8O.js} +1 -1
  142. package/dist/{skeleton-5mO22c5S.js → index-BPntOicE.js} +55 -107
  143. package/dist/index-BSpdEGFd.js +42 -0
  144. package/dist/{index-CF3HhgvN.js → index-BbltNcou.js} +1 -1
  145. package/dist/index-BhBRZf4M.js +742 -0
  146. package/dist/index-BovNbKxB.js +54 -0
  147. package/dist/{skeleton-Ccd6EDeB.cjs → index-C5r__0lD.cjs} +4 -47
  148. package/dist/{index-DicTpiG0.cjs → index-CfT9e5O9.cjs} +2 -10
  149. package/dist/index-D-3I_Ppj.cjs +16 -0
  150. package/dist/index-D0IYt1s3.cjs +20 -0
  151. package/dist/{skeleton-CQPwIEP0.js → index-D69SKc-n.cjs} +7 -37
  152. package/dist/{index-C0SKNFzP.js → index-D8KPbcUf.js} +1 -1
  153. package/dist/index-DFdPWO4O.js +133 -0
  154. package/dist/index-DFyV_EK2.cjs +305 -0
  155. package/dist/index-DxwIu0Wn.js +84 -0
  156. package/dist/{index-y6sKgrZC.js → index-XYs5Cuh5.js} +21 -30
  157. package/dist/index.js +1 -1
  158. package/dist/style-BAcV7F53.cjs +64 -0
  159. package/dist/style-CXMUA6cI.js +74 -0
  160. package/dist/{style-DKAOBWn3.js → style-D3pIrH3v.js} +1 -1
  161. package/dist/{utils-BdsZgOUE.js → utils-DHfRApMf.js} +6 -6
  162. package/package.json +1 -1
  163. package/dist/index-1Dm1i6WK.js +0 -52
  164. package/dist/index-BGTtoLxz.cjs +0 -1
  165. package/dist/skeleton-BdbB-LdT.cjs +0 -97
  166. package/dist/suspense-categories-card-simple-BGj475Ca.js +0 -101
  167. package/dist/suspense-categories-card-simple-CjGtzfzp.cjs +0 -55
  168. package/dist/suspense-large-BMO7JH52.js +0 -26
  169. package/dist/suspense-large-CFmcSzX-.cjs +0 -1
  170. package/dist/suspense-product-card-detailed-CxiFuUOT.js +0 -653
  171. package/dist/suspense-product-card-detailed-IR4sh-l4.cjs +0 -330
  172. package/dist/suspense-product-card-simple-DJ8UYolb.cjs +0 -1
  173. package/dist/suspense-product-card-simple-ziy0XcLp.js +0 -26
@@ -1,4 +1,4 @@
1
- "use strict";const n=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./utils-Dl9xPH4c.cjs"),D=require("./consts-goSZX3xP.cjs"),ce=require("./motion-B_VPZaJq.cjs"),s=require("./index-BpbMKBf_.cjs"),de=require("./Icon.cjs"),te=require("./ShopAvatar-CV3lj34D.cjs"),je=require("./Badge.cjs"),J=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),se=require("./IconButton.cjs"),ge=require("./useDetectMobile-zkbzoOGV.cjs"),$e=require("./index-Be-_NM9Q.cjs"),Te=p.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),d=require("react"),S=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./utils-Dl9xPH4c.cjs"),L=require("./consts-goSZX3xP.cjs"),ie=require("./motion-B_VPZaJq.cjs"),s=require("./index-BpbMKBf_.cjs"),le=require("./Icon.cjs"),ne=require("./ShopAvatar-CV3lj34D.cjs"),Se=require("./Badge.cjs"),ce=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),te=require("./IconButton.cjs"),de=require("./useDetectMobile-zkbzoOGV.cjs"),je=require("./index-Be-_NM9Q.cjs"),c=require("./style-BAcV7F53.cjs"),Pe=S.styled.div`
2
2
  cursor: pointer;
3
3
  display: flex;
4
4
  gap: 1rem;
@@ -6,13 +6,13 @@
6
6
  border-radius: 1.25rem;
7
7
  border: 1px solid var(--gray-200, #e4e9f0);
8
8
 
9
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
9
+ @media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
10
10
  flex-direction: column;
11
11
  padding: 1rem;
12
12
  gap: 0;
13
13
  }
14
- `,Pe=p.styled.div`
15
- border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,"edged")};
14
+ `,_e=S.styled.div`
15
+ border-radius: ${n=>C.getBorderRadiusValueWithUnits(n.theme,"edged")};
16
16
  height: 13.75rem;
17
17
  width: 13.75rem;
18
18
  min-width: 13.75rem;
@@ -34,7 +34,7 @@
34
34
  transform: scale(1.25);
35
35
  }
36
36
  }
37
- `,Se=p.styled.div`
37
+ `,Te=S.styled.div`
38
38
  flex: 1;
39
39
  display: flex;
40
40
  flex-direction: column;
@@ -117,7 +117,7 @@
117
117
  color: var(--gray-600, #676e79);
118
118
  }
119
119
 
120
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
120
+ @media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
121
121
  padding: 1rem 0 0 0;
122
122
 
123
123
  & .campaign-title-text {
@@ -142,15 +142,15 @@
142
142
  gap: 0.25rem;
143
143
  }
144
144
  }
145
- `,ae=(e=!1,t=!1,a=!1)=>`
145
+ `,se=(n=!1,t=!1,o=!1)=>`
146
146
  display: flex;
147
147
  ${t?"flex-wrap: wrap;":""}
148
148
  ${t?"":"flex-wrap: nowrap;"}
149
- ${e?"align-items: center;":""}
150
- ${a?"justify-content: center;":""}
151
- `,Ie=p.styled(ce.motion.div)`
149
+ ${n?"align-items: center;":""}
150
+ ${o?"justify-content: center;":""}
151
+ `,ke=S.styled(ie.motion.div)`
152
152
  text-decoration: none;
153
- ${e=>e.hasPermission===!0&&"cursor: pointer"};
153
+ ${n=>n.hasPermission===!0&&"cursor: pointer"};
154
154
 
155
155
  &:focus,
156
156
  &:hover,
@@ -165,14 +165,14 @@
165
165
  text-decoration: none;
166
166
  }
167
167
 
168
- ${ae(!0)}
168
+ ${se(!0)}
169
169
  gap: 0.5rem;
170
170
  padding: 0.5rem;
171
171
  color: var(--gray-950, #14161a);
172
172
  font-weight: 500;
173
173
  font-size: 1rem;
174
174
  line-height: 1.5rem;
175
- border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,"slight")};
175
+ border-radius: ${n=>C.getBorderRadiusValueWithUnits(n.theme,"slight")};
176
176
  transition: all 0.25s ease;
177
177
  & .description {
178
178
  font-size: 0.85rem;
@@ -181,7 +181,7 @@
181
181
  font-weight: 400;
182
182
  }
183
183
  & .logo-wrapper {
184
- ${ae(!0,!1,!0)}
184
+ ${se(!0,!1,!0)}
185
185
  flex-shrink: 0;
186
186
  border-radius: 999px;
187
187
 
@@ -220,132 +220,33 @@
220
220
  background-color: var(--gray-95080, #14161acc);
221
221
  }
222
222
 
223
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
223
+ @media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
224
224
  padding: 0;
225
225
  font-size: 0.875rem;
226
226
  }
227
- `,Ce=p.styled.div`
227
+ `,Ie=S.styled.div`
228
228
  position: absolute;
229
229
  top: 0.5rem;
230
- ${e=>e.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
230
+ ${n=>n.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
231
231
  display: flex;
232
232
  gap: 0.25rem;
233
- `,ke=p.styled.div`
234
- border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
235
- background-color: ${e=>e==null?void 0:e.color};
233
+ `,$e=S.styled.div`
234
+ border-radius: ${n=>C.getBorderRadiusValueWithUnits(n.theme,n.borderRadius||"slight")};
235
+ background-color: ${n=>n==null?void 0:n.color};
236
236
  color: white;
237
237
  height: 1.5rem;
238
238
  min-width: 1.5rem;
239
- width: ${e=>e.fitContent===!0?"fit-content":"1.5rem"};
240
- ${e=>e.fitContent===!0&&"padding: 0 0.1rem;"};
239
+ width: ${n=>n.fitContent===!0?"fit-content":"1.5rem"};
240
+ ${n=>n.fitContent===!0&&"padding: 0 0.1rem;"};
241
241
  font-size: 0.75rem;
242
242
  display: flex;
243
243
  align-items: center;
244
244
  justify-content: center;
245
- padding: ${e=>e.padding};
245
+ padding: ${n=>n.padding};
246
246
  & i {
247
247
  font-size: 0.813rem;
248
248
  }
249
- `,De=c.forwardRef(({src:e,...t},a)=>{const o=c.useRef();return c.useEffect(()=>{var m;const d=i=>{i.target.src=te.DefaultShopImage,i.onerror=null};return(m=o==null?void 0:o.current)==null||m.addEventListener("error",d),()=>{var i;(i=o==null?void 0:o.current)==null||i.removeEventListener("error",d)}},[]),n.jsx(c.Fragment,{ref:a,children:w.isDefinedNotEmptyString(e)?n.jsx("img",{ref:o,src:e,...t}):n.jsx("img",{src:te.DefaultShopImage,...t})})}),pe=e=>{const{uuid:t,hasPermission:a=!0,isUser:o,image:d,imageComponent:m,name:i,notifications:h=0,color:l="primary",size:b="large",style:u,disabled:P,onClick:f=()=>{},isActive:v,className:S,shopCategory:I,themeData:j}=e,x={theme:J.useTheme(),color:l,size:b,style:u,disabled:P};return c.createElement(Ie,{onClick:$=>{$.stopPropagation(),a===!0&&(f==null||f())},...x,key:i,className:`profile-item ${S}`,hasPermission:a,isActive:v,themeColor:(j==null?void 0:j.code)||"transparent"},n.jsx("div",{className:"logo-wrapper",children:w.isDefined(m)?m:d}),n.jsxs("div",{children:[n.jsx("div",{className:"name",children:i}),!o&&n.jsx("div",{className:"description",children:I}),h>0&&n.jsx("div",{className:"notifications-number",children:n.jsx(je,{className:"badge",color:"danger",size:"small",children:h>99?"99+":h})})]}))};pe.propTypes={id:s.PropTypes.any,isUserProfile:s.PropTypes.bool,themeColor:s.PropTypes.string,image:s.PropTypes.any,name:s.PropTypes.string,notifications:s.PropTypes.number,style:s.PropTypes.object,className:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:s.PropTypes.oneOf(["large"]),onSelect:s.PropTypes.func,hasPermission:s.PropTypes.bool};const oe=(e,t)=>{if(!e||!t)return null;const a=e.getTime()-t.getTime(),o=24*60*60*1e3;return Math.floor(a/o)},ie=e=>{if(e!==void 0){const t=new Date(e),a=t.getFullYear(),o=t.getMonth()+1;return`${String(t.getDate()).padStart(2)}. ${o}. ${a}.`}},me=c.forwardRef((e,t)=>{var ne;const a=J.useTheme(),{shopUuid:o,title:d="",coverPhoto:m,onSelect:i,startDate:h,endDate:l,salesPackages:b,shopName:u,shopCategory:P,shopImage:f,shopImageComponent:v,className:S,onSelectCard:I=()=>{},onSelectShop:j=()=>{},upcoming:g=!1,upcomingCampaignText:x,campaignSingleText:$,salesCampaignTypes:T=[],startsInPrefixTextPlural:q,startsinSuffixTextPlural:W,startsInPrefixTextSingular:V,startsinSuffixTextSingular:K,endsInPrefixTextPlural:F,endsinSuffixTextPlural:X,endsInPrefixTextSingular:E,endsinSuffixTextSingular:Z,themeData:Q,numberOfListings:C,numberOfListingsTextSingular:A,numberOfListingsTextPlural:M,metadata:r,...G}=e,H=c.useRef(),z=h?new Date(h)<=new Date:!1,fe=oe(h?new Date(h):null,new Date),R=oe(l?new Date(l):null,new Date),xe=R!==null&&R<=2&&R>0,ee=l?new Date(l).getTime():null,ye=Date.now(),Y=ee!==null?ee-ye:null,L=Y!==null&&Y>0&&Y<24*60*60*1e3,re=(_,U,y,N,k)=>y===1?`${_} ${y} ${N}`:`${U} ${y} ${k}`,we=()=>{if(!l)return null;const _=be,y=new Date(l).getTime()-_.getTime();if(y<=0)return null;const N=Math.floor(y/(1e3*60*60)),k=Math.floor(y%(1e3*60*60)/(1e3*60)),_e=Math.floor(y%(1e3*60)/1e3);return{hours:N,minutes:k,seconds:_e}},[be,ve]=c.useState(new Date);c.useEffect(()=>{if(!L)return;const _=setInterval(()=>{ve(new Date)},1e3);return()=>clearInterval(_)},[L]);const O=L?we():null;return n.jsxs(Te,{ref:H,theme:a,className:S,name:r==null?void 0:r.name,"data-accessor":r==null?void 0:r.accessor,onClick:_=>I(_,H),...G,children:[n.jsxs(Pe,{theme:a,onClick:()=>i==null?void 0:i(),children:[n.jsx("img",{src:m}),n.jsx(Ce,{children:b==null?void 0:b.map((_,U)=>{var y,N;return n.jsx(ke,{color:(y=T==null?void 0:T.find(k=>k.value===_))==null?void 0:y.color,theme:a,children:n.jsx(de,{icon:(N=T==null?void 0:T.find(k=>k.value===_))==null?void 0:N.icon})},`package__${U}`)})})]}),n.jsxs(Se,{theme:a,children:[n.jsx("div",{className:"text-block-wrapper",children:n.jsxs("div",{className:"title-block-wrapper",children:[n.jsx("div",{className:"campaign-title",children:(ne=g?x:$)==null?void 0:ne.toUpperCase()}),n.jsx("div",{className:"campaign-title-text",children:d}),l&&h&&n.jsxs("div",{className:"campaign-date",children:[ie(h)," - ",ie(l)]}),n.jsxs("div",{className:"timestamp-text",children:[C>0&&n.jsxs("span",{className:"listings-text",children:[C," ",C===1?A:M," ","∙"," "]}),n.jsx("span",{className:`duration-text ${xe?"urgent":""} ${z?"":"starts-in"}`,children:L&&O?n.jsxs("div",{className:"countdown-timer",children:[E," ",O.hours.toString().padStart(2,"0"),":",O.minutes.toString().padStart(2,"0"),":",O.seconds.toString().padStart(2,"0")]}):z?re(E,F,R,Z,X):re(V,q,fe,K,W)})]})]})}),n.jsx(pe,{hasPermission:!0,image:n.jsx(De,{src:f}),imageComponent:v,themeData:Q,isActive:!0,isUser:!1,name:u,shopCategory:P,onClick:()=>j(o)})]})]})});me.propTypes={title:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.element]),numberOfListings:s.PropTypes.number,dropdown:s.PropTypes.any,color:s.PropTypes.string};p.styled.div`
250
- display: flex;
251
- flex-direction: column;
252
- gap: 1.5rem;
253
-
254
- & .arrow-icon {
255
- & i {
256
- transition: all 0.25s ease;
257
- transform: ${e=>e.expanded===!0?"rotate(-180deg)":"rotate(0)"};
258
- }
259
- }
260
-
261
- & .badge-button {
262
- white-space: nowrap;
263
- font-weight: 500;
264
- }
265
-
266
- & .gradient {
267
- background: transparent !important;
268
- }
269
-
270
- & .campaign-item {
271
- min-width: calc(50% - 0.87rem);
272
- width: calc(50% - 0.87rem);
273
- margin-right: 1rem;
274
-
275
- &:nth-child(${e=>e==null?void 0:e.lastItemIdx}) {
276
- margin-right: 0;
277
- }
278
- }
279
-
280
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
281
- & .campaign-item {
282
- min-width: 100%;
283
- width: 100%;
284
- margin-right: 0;
285
- }
286
- }
287
- `;const B=p.styled.div`
288
- width: ${e=>e.width||"100%"};
289
- height: ${e=>(e.heightCoeff||1)*1.125}rem;
290
- background-color: var(--gray-200, #dddfe4);
291
-
292
- ${w.linearGradientAnimation("-90deg")}
293
- `,Ne=p.styled.div`
294
- display: flex;
295
- flex-direction: ${e=>e!=null&&e.row?"row":"column"};
296
- gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
297
- width: ${e=>(e==null?void 0:e.width)??"100%"};
298
- `,le=p.styled.div`
299
- border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
300
- background: var(--gray-200, #dddfe4);
301
- position: relative;
302
- max-height: ${e=>(e==null?void 0:e.height)??"5rem"};
303
- max-width: ${e=>(e==null?void 0:e.width)??"5rem"};
304
- height: ${e=>(e==null?void 0:e.height)??"5rem"};
305
- width: ${e=>(e==null?void 0:e.width)??"5rem"};
306
- flex-shrink: 0;
307
-
308
- ${w.linearGradientAnimation()}
309
- `,Ee=p.styled.div`
310
- background: var(--white, #fff);
311
- border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,"edged")};
312
- box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
313
- border: 1px solid var(--gray-95012, #14161a1f);
314
-
315
- display: flex;
316
- gap: 1rem;
317
- padding: 1.25rem;
318
- width: 100%;
319
-
320
- & .campaign__left-section {
321
- position: relative;
322
- }
323
-
324
- & .campaign__right-section {
325
- display: flex;
326
- flex-direction: column;
327
- justify-content: space-between;
328
- max-width: 18rem;
329
- width: 100%;
330
- }
331
-
332
- & .campaign__user {
333
- display: flex;
334
- align-items: center;
335
- gap: 0.5rem;
336
- }
337
-
338
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
339
- flex-direction: column;
340
-
341
- & .campaign__user {
342
- margin-top: 1rem;
343
- }
344
- }
345
- `,Me=p.styled.div`
346
- display: flex;
347
- gap: 1.5rem;
348
- `,ze=c.forwardRef(({},e)=>{const t=J.useTheme();return n.jsxs(Ee,{ref:e,theme:t,children:[n.jsx("div",{className:"campaign__left-section",children:n.jsx(le,{theme:t,width:"15rem",height:"15rem",borderRadius:"edged"})}),n.jsxs("div",{className:"campaign__right-section",children:[n.jsxs(Ne,{theme:t,children:[n.jsx(B,{heightCoeff:.75,theme:t,width:"35%"}),n.jsx(B,{heightCoeff:1.25,theme:t}),n.jsx(B,{heightCoeff:3,theme:t})]}),n.jsxs("div",{className:"campaign__user",children:[n.jsx(le,{theme:t,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),n.jsx(B,{theme:t,width:"75%"})]})]})]})}),Re=({itemsCount:e=5,keyPrefix:t})=>n.jsx(Me,{children:Array.from({length:e},(a,o)=>n.jsx(ze,{},`${t}-skeleton-campaign-card-${o}`))}),Le=({children:e,fallbackComponent:t=n.jsx(n.Fragment,{}),isLoading:a=!1,itemsCount:o=5,keyPrefix:d})=>n.jsx(c.Suspense,{fallback:t,children:a===!0?n.jsx(Re,{itemsCount:o,keyPrefix:d}):e}),Oe=p.styled.div`
249
+ `,Ce=d.forwardRef(({src:n,...t},o)=>{const a=d.useRef();return d.useEffect(()=>{var h;const g=i=>{i.target.src=ne.DefaultShopImage,i.onerror=null};return(h=a==null?void 0:a.current)==null||h.addEventListener("error",g),()=>{var i;(i=a==null?void 0:a.current)==null||i.removeEventListener("error",g)}},[]),r.jsx(d.Fragment,{ref:o,children:C.isDefinedNotEmptyString(n)?r.jsx("img",{ref:a,src:n,...t}):r.jsx("img",{src:ne.DefaultShopImage,...t})})}),pe=n=>{const{uuid:t,hasPermission:o=!0,isUser:a,image:g,imageComponent:h,name:i,notifications:m=0,color:l="primary",size:w="large",style:u,disabled:T,onClick:f=()=>{},isActive:b,className:k,shopCategory:I,themeData:j}=n,x={theme:ce.useTheme(),color:l,size:w,style:u,disabled:T};return d.createElement(ke,{onClick:P=>{P.stopPropagation(),o===!0&&(f==null||f())},...x,key:i,className:`profile-item ${k}`,hasPermission:o,isActive:b,themeColor:(j==null?void 0:j.code)||"transparent"},r.jsx("div",{className:"logo-wrapper",children:C.isDefined(h)?h:g}),r.jsxs("div",{children:[r.jsx("div",{className:"name",children:i}),!a&&r.jsx("div",{className:"description",children:I}),m>0&&r.jsx("div",{className:"notifications-number",children:r.jsx(Se,{className:"badge",color:"danger",size:"small",children:m>99?"99+":m})})]}))};pe.propTypes={id:s.PropTypes.any,isUserProfile:s.PropTypes.bool,themeColor:s.PropTypes.string,image:s.PropTypes.any,name:s.PropTypes.string,notifications:s.PropTypes.number,style:s.PropTypes.object,className:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:s.PropTypes.oneOf(["large"]),onSelect:s.PropTypes.func,hasPermission:s.PropTypes.bool};const oe=(n,t)=>{if(!n||!t)return null;const o=n.getTime()-t.getTime(),a=24*60*60*1e3;return Math.floor(o/a)},ae=n=>{if(n!==void 0){const t=new Date(n),o=t.getFullYear(),a=t.getMonth()+1;return`${String(t.getDate()).padStart(2)}. ${a}. ${o}.`}},ge=d.forwardRef((n,t)=>{var re;const o=ce.useTheme(),{shopUuid:a,title:g="",coverPhoto:h,onSelect:i,startDate:m,endDate:l,salesPackages:w,shopName:u,shopCategory:T,shopImage:f,shopImageComponent:b,className:k,onSelectCard:I=()=>{},onSelectShop:j=()=>{},upcoming:p=!1,upcomingCampaignText:x,campaignSingleText:P,salesCampaignTypes:_=[],startsInPrefixTextPlural:B,startsinSuffixTextPlural:W,startsInPrefixTextSingular:V,startsinSuffixTextSingular:J,endsInPrefixTextPlural:F,endsinSuffixTextPlural:X,endsInPrefixTextSingular:E,endsinSuffixTextSingular:Z,themeData:K,numberOfListings:D,numberOfListingsTextSingular:G,numberOfListingsTextPlural:z,metadata:e,...A}=n,H=d.useRef(),M=m?new Date(m)<=new Date:!1,ue=oe(m?new Date(m):null,new Date),R=oe(l?new Date(l):null,new Date),fe=R!==null&&R<=2&&R>0,Q=l?new Date(l).getTime():null,xe=Date.now(),Y=Q!==null?Q-xe:null,O=Y!==null&&Y>0&&Y<24*60*60*1e3,ee=(v,q,y,N,$)=>y===1?`${v} ${y} ${N}`:`${q} ${y} ${$}`,ye=()=>{if(!l)return null;const v=we,y=new Date(l).getTime()-v.getTime();if(y<=0)return null;const N=Math.floor(y/(1e3*60*60)),$=Math.floor(y%(1e3*60*60)/(1e3*60)),ve=Math.floor(y%(1e3*60)/1e3);return{hours:N,minutes:$,seconds:ve}},[we,be]=d.useState(new Date);d.useEffect(()=>{if(!O)return;const v=setInterval(()=>{be(new Date)},1e3);return()=>clearInterval(v)},[O]);const U=O?ye():null;return r.jsxs(Pe,{ref:H,theme:o,className:k,name:e==null?void 0:e.name,"data-accessor":e==null?void 0:e.accessor,onClick:v=>I(v,H),...A,children:[r.jsxs(_e,{theme:o,onClick:()=>i==null?void 0:i(),children:[r.jsx("img",{src:h}),r.jsx(Ie,{children:w==null?void 0:w.map((v,q)=>{var y,N;return r.jsx($e,{color:(y=_==null?void 0:_.find($=>$.value===v))==null?void 0:y.color,theme:o,children:r.jsx(le,{icon:(N=_==null?void 0:_.find($=>$.value===v))==null?void 0:N.icon})},`package__${q}`)})})]}),r.jsxs(Te,{theme:o,children:[r.jsx("div",{className:"text-block-wrapper",children:r.jsxs("div",{className:"title-block-wrapper",children:[r.jsx("div",{className:"campaign-title",children:(re=p?x:P)==null?void 0:re.toUpperCase()}),r.jsx("div",{className:"campaign-title-text",children:g}),l&&m&&r.jsxs("div",{className:"campaign-date",children:[ae(m)," - ",ae(l)]}),r.jsxs("div",{className:"timestamp-text",children:[D>0&&r.jsxs("span",{className:"listings-text",children:[D," ",D===1?G:z," ","∙"," "]}),r.jsx("span",{className:`duration-text ${fe?"urgent":""} ${M?"":"starts-in"}`,children:O&&U?r.jsxs("div",{className:"countdown-timer",children:[E," ",U.hours.toString().padStart(2,"0"),":",U.minutes.toString().padStart(2,"0"),":",U.seconds.toString().padStart(2,"0")]}):M?ee(E,F,R,Z,X):ee(V,B,ue,J,W)})]})]})}),r.jsx(pe,{hasPermission:!0,image:r.jsx(Ce,{src:f}),imageComponent:b,themeData:K,isActive:!0,isUser:!1,name:u,shopCategory:T,onClick:()=>j(a)})]})]})});ge.propTypes={title:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.element]),numberOfListings:s.PropTypes.number,dropdown:s.PropTypes.any,color:s.PropTypes.string};const De=S.styled.div`
349
250
  margin: 0 auto;
350
251
  display: flex;
351
252
  flex-direction: column;
@@ -384,7 +285,7 @@
384
285
  right: 0;
385
286
  }
386
287
 
387
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
288
+ @media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
388
289
  gap: 1.25rem;
389
290
 
390
291
  & .scrollable-section__header {
@@ -396,13 +297,13 @@
396
297
  }
397
298
  }
398
299
  }
399
- `,Ue=p.styled(ce.motion.div)`
300
+ `,Ne=S.styled(ie.motion.div)`
400
301
  display: grid;
401
- grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumns}, 1fr);
302
+ grid-template-columns: repeat(${n=>n==null?void 0:n.numOfColumns}, 1fr);
402
303
  gap: 1.5rem;
403
304
  width: 100%;
404
305
 
405
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
306
+ @media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
406
307
  display: flex;
407
308
  flex-wrap: nowrap;
408
309
  overflow-x: scroll;
@@ -424,11 +325,11 @@
424
325
  /* Safari and Chrome */
425
326
  }
426
327
  }
427
- `,he=c.forwardRef(({icon:e,title:t,numOfSlides:a=2,showNavigation:o=!0,hasNextPage:d=!1,handleFetchNextPage:m=()=>{},children:i},h)=>{const[l,b]=c.useState(0),[u,P]=c.useState(1),f=ge.useDetectMobile(),v=(i==null?void 0:i.length)??1;c.useEffect(()=>{const g=()=>{P(a)};return window.addEventListener("resize",g),g(),()=>window.removeEventListener("resize",g)},[]);const S=f?i:i==null?void 0:i.slice(l,l+u),I=g=>{var $;($=g==null?void 0:g.target)==null||$.blur();const x=l+u;x<v&&b(x),x+u>=v&&d&&m()},j=g=>{var x;(x=g==null?void 0:g.target)==null||x.blur(),l-u>=0&&b(l-u)};return n.jsxs(Oe,{ref:h,children:[n.jsx("div",{className:"scrollable-section__header",children:n.jsxs("div",{className:"scrollable-section__title",children:[w.isDefinedNotEmptyString(e)&&n.jsx(de,{icon:e,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),w.isDefinedNotEmptyString(t)&&n.jsxs("div",{className:"title__text",children:[" ",t]})]})}),n.jsxs(Ue,{numOfColumns:a,...!f&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:[S,f&&d&&n.jsx($e.InfiniteScrollEndElement,{onIsVisible:m})]},`scrollable-section__content-${l}`),o&&v>u&&!f&&n.jsxs("div",{className:"scrollable-section__navigation",children:[n.jsx(se,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l===0,onClick:j}),n.jsx(se,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l+u>=v,onClick:I})]})]})});he.propTypes={icon:s.PropTypes.string,title:s.PropTypes.string,numOfSlides:s.PropTypes.number,numOfSlidesForMobile:s.PropTypes.number,handleFetchNextPage:s.PropTypes.func,showNavigation:s.PropTypes.bool};const Be=p.styled.div`
328
+ `,he=d.forwardRef(({icon:n,title:t,numOfSlides:o=2,showNavigation:a=!0,hasNextPage:g=!1,handleFetchNextPage:h=()=>{},children:i},m)=>{const[l,w]=d.useState(0),[u,T]=d.useState(1),f=de.useDetectMobile(),b=(i==null?void 0:i.length)??1;d.useEffect(()=>{const p=()=>{T(o)};return window.addEventListener("resize",p),p(),()=>window.removeEventListener("resize",p)},[]);const k=f?i:i==null?void 0:i.slice(l,l+u),I=p=>{var P;(P=p==null?void 0:p.target)==null||P.blur();const x=l+u;x<b&&w(x),x+u>=b&&g&&h()},j=p=>{var x;(x=p==null?void 0:p.target)==null||x.blur(),l-u>=0&&w(l-u)};return r.jsxs(De,{ref:m,children:[r.jsx("div",{className:"scrollable-section__header",children:r.jsxs("div",{className:"scrollable-section__title",children:[C.isDefinedNotEmptyString(n)&&r.jsx(le,{icon:n,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),C.isDefinedNotEmptyString(t)&&r.jsxs("div",{className:"title__text",children:[" ",t]})]})}),r.jsxs(Ne,{numOfColumns:o,...!f&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:[k,f&&g&&r.jsx(je.InfiniteScrollEndElement,{onIsVisible:h})]},`scrollable-section__content-${l}`),a&&b>u&&!f&&r.jsxs("div",{className:"scrollable-section__navigation",children:[r.jsx(te,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l===0,onClick:j}),r.jsx(te,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l+u>=b,onClick:I})]})]})});he.propTypes={icon:s.PropTypes.string,title:s.PropTypes.string,numOfSlides:s.PropTypes.number,numOfSlidesForMobile:s.PropTypes.number,handleFetchNextPage:s.PropTypes.func,showNavigation:s.PropTypes.bool};const Le=S.styled.div`
428
329
  display: flex;
429
330
  flex: 1;
430
331
  width: 100%;
431
- max-height: ${e=>e==null?void 0:e.maxHeight};
332
+ max-height: ${n=>n==null?void 0:n.maxHeight};
432
333
  border-radius: 1.25rem;
433
334
 
434
335
  &:hover {
@@ -441,4 +342,19 @@
441
342
  border-radius: 1.25rem;
442
343
  object-fit: cover;
443
344
  }
444
- `,ue=c.forwardRef(({sectionName:e,imageUrl:t,maxHeight:a="16.25rem",className:o="",handleClick:d=()=>{}},m)=>n.jsx(Be,{ref:m,maxHeight:a,onClick:d,className:`itemless-banner ${o}`,children:n.jsx("img",{src:t,alt:`itemless-banner__${e}`})}));ue.propTypes={sectionName:s.PropTypes.string,imageUrl:s.PropTypes.string,maxHeight:s.PropTypes.string,className:s.PropTypes.string,handleClick:s.PropTypes.func};const qe=c.memo(me),We=c.forwardRef(({sellerType:e="Shop",items:t=[],title:a,icon:o,isLoading:d,onSelectCard:m=()=>{},onSelectShop:i=()=>{},getImage:h=()=>{},campaignSingleText:l,upcomingCampaignText:b,salesCampaignTypes:u=[],startsInPrefixTextPlural:P,startsinSuffixTextPlural:f,startsInPrefixTextSingular:v,startsinSuffixTextSingular:S,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:g,endsinSuffixTextSingular:x,numOfSlides:$=2,showNavigation:T=!0,numberOfListingsTextSingular:q,numberOfListingsTextPlural:W,itemlessImageUrl:V,itemlessLink:K,handleItemlessLink:F=()=>{},componentName:X,hasNextPage:E=!1,handleFetchNextPage:Z=()=>{}},Q)=>{const C=ge.useDetectMobile(),A=c.useMemo(()=>{let M=t==null?void 0:t.map((r,G)=>n.jsx(qe,{className:"campaign-item",coverPhoto:h(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopImageComponent:r==null?void 0:r.profileImageComponent,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,shopCategory:r==null?void 0:r.shopCategory,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:(H,z)=>m(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid,z),onSelectShop:()=>i(r==null?void 0:r.shopUuid),campaignSingleText:l,upcomingCampaignText:b,upcoming:r==null?void 0:r.upcoming,salesCampaignTypes:u,startsInPrefixTextPlural:P,startsinSuffixTextPlural:f,startsInPrefixTextSingular:v,startsinSuffixTextSingular:S,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:g,endsinSuffixTextSingular:x,themeData:r==null?void 0:r.themeData,numberOfListings:r==null?void 0:r.numberOfListings,numberOfListingsTextSingular:q,numberOfListingsTextPlural:W,metadata:{name:X,accessor:r==null?void 0:r.accessor}},`campaign__item__${G}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`));return(t==null?void 0:t.length)<2&&!C?[...M,n.jsx(ue,{imageUrl:V,className:"campaign-item",handleClick:F},"itemless-campaign-section-banner")]:M},[t]);return n.jsx(Le,{isLoading:d,itemsCount:C?1:2,keyPrefix:"sales-camp",children:n.jsx(he,{icon:o,title:a,numOfSlides:$,showNavigation:T,hasNextPage:E,handleFetchNextPage:Z,children:A},`sales-campaign-section__${C}`)})});module.exports=We;
345
+ `,me=d.forwardRef(({sectionName:n,imageUrl:t,maxHeight:o="16.25rem",className:a="",handleClick:g=()=>{}},h)=>r.jsx(Le,{ref:h,maxHeight:o,onClick:g,className:`itemless-banner ${a}`,children:r.jsx("img",{src:t,alt:`itemless-banner__${n}`})}));me.propTypes={sectionName:s.PropTypes.string,imageUrl:s.PropTypes.string,maxHeight:s.PropTypes.string,className:s.PropTypes.string,handleClick:s.PropTypes.func};const Ee=S.styled(c.SkeletonRowWrapper)`
346
+ @media (max-width: ${L.MOBILE_SIZE_PX+"px"}) {
347
+ flex-direction: column;
348
+
349
+ & .skeleton__image {
350
+ width: 100%;
351
+ height: 100%;
352
+ }
353
+
354
+ & > div {
355
+ &:last-of-type {
356
+ display: none;
357
+ }
358
+ }
359
+ }
360
+ `,ze=({keyPrefix:n})=>r.jsxs(Ee,{children:[r.jsxs(c.SkeletonRowWrapper,{children:[r.jsx(c.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-1`),r.jsxs(c.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(c.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(c.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(c.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(c.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]}),r.jsxs(c.SkeletonRowWrapper,{noGradient:!0,children:[r.jsx(c.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-2`),r.jsxs(c.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(c.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(c.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(c.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(c.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(c.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]})]}),Me=({keyPrefix:n,isLoading:t=!1,fallbackComponent:o=r.jsx(r.Fragment,{}),children:a})=>r.jsx(d.Suspense,{fallbackComponent:o,children:t===!0?r.jsx(ze,{keyPrefix:n}):a}),Re=d.memo(ge),Oe=d.forwardRef(({sellerType:n="Shop",items:t=[],title:o,icon:a,isLoading:g,onSelectCard:h=()=>{},onSelectShop:i=()=>{},getImage:m=()=>{},campaignSingleText:l,upcomingCampaignText:w,salesCampaignTypes:u=[],startsInPrefixTextPlural:T,startsinSuffixTextPlural:f,startsInPrefixTextSingular:b,startsinSuffixTextSingular:k,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:p,endsinSuffixTextSingular:x,numOfSlides:P=2,showNavigation:_=!0,numberOfListingsTextSingular:B,numberOfListingsTextPlural:W,itemlessImageUrl:V,itemlessLink:J,handleItemlessLink:F=()=>{},componentName:X,hasNextPage:E=!1,handleFetchNextPage:Z=()=>{}},K)=>{const D=de.useDetectMobile(),G=d.useMemo(()=>{let z=t==null?void 0:t.map((e,A)=>r.jsx(Re,{className:"campaign-item",coverPhoto:m(e==null?void 0:e.coverPhoto,(e==null?void 0:e.uuid)||(e==null?void 0:e.campaignUuid)),description:e==null?void 0:e.description,endDate:e==null?void 0:e.endDate,salesPackages:e==null?void 0:e.salesPackages,sellerType:n,shopImage:e==null?void 0:e.profileImage,shopImageComponent:e==null?void 0:e.profileImageComponent,shopName:e==null?void 0:e.shopName,shopUuid:e==null?void 0:e.shopUuid,shopCategory:e==null?void 0:e.shopCategory,startDate:e==null?void 0:e.startDate,title:e==null?void 0:e.name,uuid:e==null?void 0:e.campaignUuid,onSelectCard:(H,M)=>h(e==null?void 0:e.campaignUuid,e==null?void 0:e.shopUuid,M),onSelectShop:()=>i(e==null?void 0:e.shopUuid),campaignSingleText:l,upcomingCampaignText:w,upcoming:e==null?void 0:e.upcoming,salesCampaignTypes:u,startsInPrefixTextPlural:T,startsinSuffixTextPlural:f,startsInPrefixTextSingular:b,startsinSuffixTextSingular:k,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:p,endsinSuffixTextSingular:x,themeData:e==null?void 0:e.themeData,numberOfListings:e==null?void 0:e.numberOfListings,numberOfListingsTextSingular:B,numberOfListingsTextPlural:W,metadata:{name:X,accessor:e==null?void 0:e.accessor}},`campaign__item__${A}__${e==null?void 0:e.startDate}___${e==null?void 0:e.endDate}`));return(t==null?void 0:t.length)<2&&!D?[...z,r.jsx(me,{imageUrl:V,className:"campaign-item",handleClick:F},"itemless-campaign-section-banner")]:z},[t]);return r.jsx(Me,{isLoading:g,keyPrefix:"sales-campaign-skeleton",children:r.jsx(he,{icon:a,title:o,numOfSlides:P,showNavigation:_,hasNextPage:E,handleFetchNextPage:Z,children:G},`sales-campaign-section__${D}`)})});module.exports=Oe;