@weareconceptstudio/account 0.0.8 → 0.1.0

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 (52) hide show
  1. package/dist/AccountProvider.d.ts +2 -1
  2. package/dist/AccountProvider.js +3 -3
  3. package/dist/components/OrderDetails/index.js +7 -5
  4. package/dist/components/OrderedItems/index.d.ts +1 -2
  5. package/dist/components/OrderedItems/index.js +52 -43
  6. package/dist/components/OrderedItems/style.js +1 -0
  7. package/dist/components/OrdersList/OrderItem/index.js +6 -4
  8. package/dist/components/OrdersList/index.js +5 -4
  9. package/dist/components/TotalCheckout/index.js +14 -30
  10. package/dist/components/TotalCheckout/style.js +0 -32
  11. package/dist/components/cart/EmptyCart/index.js +3 -3
  12. package/dist/components/cart/EmptyCart/style.js +1 -1
  13. package/dist/components/cart/Items/Simple/Item/index.js +14 -15
  14. package/dist/components/cart/Items/Simple/ItemMobile/index.js +29 -35
  15. package/dist/components/cart/Items/Simple/index.js +19 -12
  16. package/dist/components/cart/Items/Simple/style.js +15 -7
  17. package/dist/components/ui/AccountButton/index.js +5 -2
  18. package/dist/components/ui/AccountButton/style.js +3 -1
  19. package/dist/components/ui/Sequence/index.js +1 -1
  20. package/dist/modules/address/AddressForm/style.js +1 -4
  21. package/dist/modules/address/AddressProvider.d.ts +2 -1
  22. package/dist/modules/address/AddressProvider.js +14 -11
  23. package/dist/modules/address/ShippingBillingForm/style.js +1 -4
  24. package/dist/modules/address/ShippingBillingInfo/index.js +6 -9
  25. package/dist/templates/AccountTemplate/index.js +1 -1
  26. package/dist/templates/AccountTemplate/style.js +0 -6
  27. package/dist/templates/CartTemplate/index.js +8 -7
  28. package/dist/templates/CheckoutTemplate/StepReview/index.d.ts +3 -1
  29. package/dist/templates/CheckoutTemplate/StepReview/index.js +10 -2
  30. package/dist/templates/CheckoutTemplate/index.d.ts +2 -2
  31. package/dist/templates/CheckoutTemplate/index.js +21 -11
  32. package/dist/templates/CheckoutTemplate/style.js +0 -99
  33. package/dist/templates/OrderHistoryTemplate/index.d.ts +1 -5
  34. package/dist/templates/OrderHistoryTemplate/index.js +14 -3
  35. package/dist/templates/OrderIndividualTemplate/index.d.ts +3 -3
  36. package/dist/templates/OrderIndividualTemplate/index.js +19 -11
  37. package/dist/templates/OrderIndividualTemplate/style.d.ts +2 -2
  38. package/dist/templates/OrderIndividualTemplate/style.js +2 -2
  39. package/dist/templates/ThankYouTemplate/index.d.ts +3 -0
  40. package/dist/templates/ThankYouTemplate/index.js +25 -0
  41. package/dist/templates/ThankYouTemplate/style.d.ts +2 -0
  42. package/dist/templates/ThankYouTemplate/style.js +124 -0
  43. package/dist/templates/index.d.ts +1 -0
  44. package/dist/templates/index.js +3 -1
  45. package/dist/translations/en.d.ts +2 -0
  46. package/dist/translations/en.js +2 -0
  47. package/dist/translations/hy.d.ts +71 -65
  48. package/dist/translations/hy.js +179 -161
  49. package/dist/translations/index.d.ts +142 -158
  50. package/dist/translations/ru.d.ts +69 -93
  51. package/dist/translations/ru.js +179 -191
  52. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  export function useAccountContext(): any;
2
- export function AccountProvider({ fontFamily, shopUrl, children, maxQty, currency, addressType, addressFormFields }: {
2
+ export function AccountProvider({ fontFamily, shopUrl, children, maxQty, currency, addressType, addressFormFields, useUser }: {
3
3
  fontFamily?: string;
4
4
  shopUrl?: string;
5
5
  children: any;
@@ -7,5 +7,6 @@ export function AccountProvider({ fontFamily, shopUrl, children, maxQty, currenc
7
7
  currency: any;
8
8
  addressType: any;
9
9
  addressFormFields: any;
10
+ useUser: any;
10
11
  }): React.JSX.Element;
11
12
  import React from 'react';
@@ -14,13 +14,13 @@ export const useAccountContext = () => {
14
14
  const context = useContext(AccountContext);
15
15
  return context;
16
16
  };
17
- export const AccountProvider = ({ fontFamily = 'core_Font', shopUrl = '/', children, maxQty = 99, currency, addressType, addressFormFields }) => {
17
+ export const AccountProvider = ({ fontFamily = 'core_Font', shopUrl = '/', children, maxQty = 99, currency, addressType, addressFormFields, useUser }) => {
18
18
  const { addTranslation } = useTranslation();
19
19
  useEffect(() => {
20
20
  addTranslation(translations, 'prepend');
21
21
  }, []);
22
- return (React.createElement(AccountContext.Provider, { value: { currency, maxQty, shopUrl } },
23
- React.createElement(AddressProvider, { addressType: addressType, addressFormFields: addressFormFields },
22
+ return (React.createElement(AccountContext.Provider, { value: { currency, maxQty, shopUrl, useUser } },
23
+ React.createElement(AddressProvider, { addressType: addressType, addressFormFields: addressFormFields, useUser: useUser },
24
24
  React.createElement(ThemeProvider, { theme: theme },
25
25
  React.createElement(AccountVariables, { fontFamily: fontFamily }),
26
26
  React.createElement(AccountHelperClass, null),
@@ -4,8 +4,10 @@ import { Text, useTranslation } from '@weareconceptstudio/core';
4
4
  import { handlePriceCheckFunc, numToLocalString } from '../../utils/_functions';
5
5
  //* Style
6
6
  import OrderDetailsStyle from './style';
7
- const OrderDetails = memo(({ className, status, order_date, delivery_date, order_number, total_items, total_price, currency, shippingCost }) => {
7
+ import { useAccountContext } from '../../AccountProvider';
8
+ const OrderDetails = memo(({ className, status, date, delivery_date, orderNumber, itemsCount, total, shippingCost }) => {
8
9
  const { translate } = useTranslation();
10
+ const { currency } = useAccountContext();
9
11
  return (React.createElement(OrderDetailsStyle, { className: `${className || ''}` },
10
12
  React.createElement(Text, { className: `account-p account-p1 account-font-bold account-primary-color1`, text: 'orderDetails' }),
11
13
  React.createElement("div", { className: `info-space-line` }),
@@ -18,7 +20,7 @@ const OrderDetails = memo(({ className, status, order_date, delivery_date, order
18
20
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
19
21
  translate('orderDate'),
20
22
  ":"),
21
- React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: order_date })),
23
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: date })),
22
24
  React.createElement("div", { className: `order-detail-item-wrap` },
23
25
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
24
26
  translate('deliverDate'),
@@ -28,12 +30,12 @@ const OrderDetails = memo(({ className, status, order_date, delivery_date, order
28
30
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
29
31
  translate('orderNumber'),
30
32
  ":"),
31
- React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: order_number })),
33
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: orderNumber })),
32
34
  React.createElement("div", { className: `order-detail-item-wrap` },
33
35
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
34
36
  translate('totalItems'),
35
37
  ":"),
36
- React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: total_items })),
38
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: itemsCount })),
37
39
  React.createElement("div", { className: `order-detail-item-wrap` },
38
40
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
39
41
  translate('shippingCost'),
@@ -43,6 +45,6 @@ const OrderDetails = memo(({ className, status, order_date, delivery_date, order
43
45
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
44
46
  translate('totalPrice'),
45
47
  ":"),
46
- React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value` }, handlePriceCheckFunc(total_price, currency)))));
48
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value` }, handlePriceCheckFunc(total, currency)))));
47
49
  });
48
50
  export default OrderDetails;
@@ -1,7 +1,6 @@
1
1
  export default OrderedItems;
2
- declare function OrderedItems({ data: items, status, currency }: {
2
+ declare function OrderedItems({ data: items, status }: {
3
3
  data: any;
4
4
  status: any;
5
- currency: any;
6
5
  }): React.JSX.Element;
7
6
  import React from 'react';
@@ -2,60 +2,69 @@ import React, { useMemo } from 'react';
2
2
  import { Image, Text, useUi } from '@weareconceptstudio/core';
3
3
  //* Utils
4
4
  import { handlePriceCheckFunc } from '../../utils/_functions';
5
+ import { useAccountContext } from '../../AccountProvider';
5
6
  //* Components
6
7
  import AccountButton from '../ui/AccountButton';
7
8
  //* Styles
8
9
  import OrderedItemsStyle from './style';
9
- const OrderedItems = ({ data: items, status, currency }) => {
10
+ // TODO: product url
11
+ const OrderedItems = ({ data: items, status }) => {
10
12
  const { winWidth } = useUi();
13
+ const { currency } = useAccountContext();
11
14
  //! Store order items
12
15
  const storeOrderedItems = useMemo(() => {
13
- return items.map((item, index) => winWidth >= 768 ? (React.createElement("div", { key: index, className: `item-wrap` },
14
- React.createElement("div", { className: `item-inner-wrapper` },
15
- React.createElement("div", { className: `col-item tl-col-1 col-item-1 first-col` },
16
- React.createElement("div", { className: `image-wrapper` },
17
- React.createElement(Image, { src: item.product?.images[0]?.src, alt: item.product?.images[0]?.alt })),
18
- React.createElement("div", { className: `col-1-right-wrap` },
19
- React.createElement(AccountButton, { url: item.product.url, className: `capitalize`, text: item.product.name, btnType: `green-large-text` }),
20
- React.createElement("div", { className: `right-first-item-wrap` },
16
+ return items?.length > 0
17
+ ? items.map((item, index) => winWidth >= 768 ? (React.createElement("div", { key: index, className: `item-wrap` },
18
+ React.createElement("div", { className: `item-inner-wrapper` },
19
+ React.createElement("div", { className: `col-item tl-col-1 col-item-1 first-col` },
20
+ React.createElement("div", { className: `image-wrapper` },
21
+ React.createElement(Image, { src: item.product.image.src, alt: item.product.image.alt })),
22
+ React.createElement("div", { className: `col-1-right-wrap` },
23
+ React.createElement(AccountButton, { text: item.product.name, btnType: `green-large-text`, className: `ordered-item-title`, url: `menu/${item.product.slug}` }),
24
+ item.color ? (React.createElement("div", { className: `right-first-item-wrap` },
25
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `color` }),
26
+ "\u00A0",
27
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 capitalize`, text: item.color }))) : (React.createElement("div", { className: `right-first-item-wrap` },
28
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_1 }))),
29
+ item.size ? (React.createElement("div", { className: `right-second-item-wrap` },
30
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `size` }),
31
+ "\u00A0",
32
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.size }))) : (React.createElement("div", { className: `right-second-item-wrap` },
33
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_2 }))))),
34
+ React.createElement("div", { className: `col-item tl-col-2` },
35
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.qty })),
36
+ React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` },
37
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: handlePriceCheckFunc(item.price, currency) })),
38
+ React.createElement("div", { className: `col-item tl-col-4 col-item-4 nowrap price-block` },
39
+ React.createElement("div", { className: `col-item-inner-wrap` },
40
+ React.createElement("div", { className: `flex-end-wrap` },
41
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: handlePriceCheckFunc(item.total, currency) }))))))) : (React.createElement("div", { key: index, className: `mobile-order-item-wrap` },
42
+ React.createElement("div", { className: `mobile-order-item-inner-wrap` },
43
+ React.createElement("div", { className: `mobile-image-wrap` },
44
+ React.createElement(Image, { src: item.product.image.src, alt: item.product.image.alt })),
45
+ React.createElement("div", { className: `mobile-info-wrap` },
46
+ React.createElement(AccountButton, { text: item.product.name, btnType: `green-large-text`, url: `/menu/${item.product.slug}`, className: `ordered-item-mobile-title` }),
47
+ item.color ? (React.createElement("div", { className: `mobile-info-item` },
21
48
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `color` }),
22
49
  "\u00A0",
23
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 capitalize`, text: item.color })),
24
- React.createElement("div", { className: `right-second-item-wrap` },
50
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 capitalize`, text: item.color }))) : (React.createElement("div", { className: `mobile-info-item` },
51
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_1 }))),
52
+ item.size ? (React.createElement("div", { className: `mobile-info-item` },
25
53
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `size` }),
26
54
  "\u00A0",
27
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.size })))),
28
- React.createElement("div", { className: `col-item tl-col-2` },
29
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.quantity })),
30
- React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` },
31
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: handlePriceCheckFunc(item.price, currency) })),
32
- React.createElement("div", { className: `col-item tl-col-4 col-item-4 nowrap price-block` },
33
- React.createElement("div", { className: `col-item-inner-wrap` },
34
- React.createElement("div", { className: `flex-end-wrap` },
35
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: handlePriceCheckFunc(item.total, currency) }))))))) : (React.createElement("div", { key: index, className: `mobile-order-item-wrap` },
36
- React.createElement("div", { className: `mobile-order-item-inner-wrap` },
37
- React.createElement("div", { className: `mobile-image-wrap` },
38
- React.createElement(Image, { src: item.product?.images[0]?.src, alt: item.product?.images[0]?.alt })),
39
- React.createElement("div", { className: `mobile-info-wrap` },
40
- React.createElement(AccountButton, { className: `capitalize`, text: item.product.name, btnType: `green-large-text`, url: `/shop/product/${item.product.url}` }),
41
- React.createElement("div", { className: `mobile-info-item` },
42
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `color` }),
43
- "\u00A0",
44
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 capitalize`, text: item.color })),
45
- React.createElement("div", { className: `mobile-info-item` },
46
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `size` }),
47
- "\u00A0",
48
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.size })),
49
- React.createElement("div", { className: `mobile-info-item` },
50
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `quantityWithSymbol` }),
51
- "\u00A0",
52
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.quantity })),
53
- React.createElement("div", { className: `mobile-price-wrap nowrap` },
54
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt`, text: `price` }),
55
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.price, currency) })),
56
- React.createElement("div", { className: `mobile-total-price-wrap nowrap` },
57
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt`, text: `total` }),
58
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.total, currency) })))))));
55
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.size }))) : (React.createElement("div", { className: `mobile-info-item` },
56
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_2 }))),
57
+ React.createElement("div", { className: `mobile-info-item` },
58
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `quantityWithSymbol` }),
59
+ "\u00A0",
60
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.qty })),
61
+ React.createElement("div", { className: `mobile-price-wrap nowrap` },
62
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt`, text: `price` }),
63
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.price, currency) })),
64
+ React.createElement("div", { className: `mobile-total-price-wrap nowrap` },
65
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt`, text: `total` }),
66
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.total, currency) })))))))
67
+ : null;
59
68
  }, [items, currency, winWidth, status]);
60
69
  return (React.createElement(OrderedItemsStyle, { className: `ordered-items-wrapper` },
61
70
  React.createElement(Text, { className: 'account-p account-p1 account-font-bold account-primary-color1 ', text: 'orderItems' }),
@@ -126,6 +126,7 @@ const OrderedItemsStyle = styled.div `
126
126
 
127
127
  .col-1-right-wrap {
128
128
  flex: 1;
129
+ overflow-wrap: anywhere;
129
130
  margin-left: var(--account_col1RightWrapML);
130
131
 
131
132
  .btn-wrap {
@@ -4,17 +4,19 @@ import { Text } from '@weareconceptstudio/core';
4
4
  import { handlePriceCheckFunc } from '../../../utils/_functions';
5
5
  //* Components
6
6
  import AccountButton from '../../ui/AccountButton';
7
+ import { useAccountContext } from '../../../AccountProvider';
7
8
  const OrderItem = Memo(({ data }) => {
9
+ const { currency } = useAccountContext();
8
10
  return (React.createElement("div", { className: `order-table-item-wrap` },
9
11
  React.createElement("div", { className: `col-item od-col-1 nowrap` },
10
- React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: data.order_date })),
12
+ React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: data.date })),
11
13
  React.createElement("div", { className: `col-item od-col-2` },
12
- React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: data.total_items })),
14
+ React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: data.itemsCount })),
13
15
  React.createElement("div", { className: `col-item od-col-3 nowrap` },
14
- React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: `ID ${data.order_number}` })),
16
+ React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: `ID ${data.orderNumber}` })),
15
17
  React.createElement("div", { className: `col-item od-col-4 nowrap` }, data.status === 'delivered' ? (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1 account-primary-color5-bg status-item delivered`, text: 'delivered' })) : data.status === 'canceled' ? (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-error-color account-secondary-color7-bg status-item canceled`, text: 'canceled' })) : (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-secondary-color1 account-secondary-color8-bg status-item in-progress`, text: 'inProgress' }))),
16
18
  React.createElement("div", { className: `col-item od-col-5 nowrap` },
17
- React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: handlePriceCheckFunc(data.total_price, data.currency) })),
19
+ React.createElement(Text, { className: `account-p account-p4 account-font-medium account-primary-color1`, text: handlePriceCheckFunc(data.total, currency) })),
18
20
  React.createElement("div", { className: `col-item od-col-6 nowrap` },
19
21
  React.createElement(AccountButton, { text: 'viewOrder', btnType: `green-small-text`, url: `/account/order-history/${data.id}` }))));
20
22
  });
@@ -8,6 +8,7 @@ import Pagination from '../ui/Pagination';
8
8
  import AccountButton from '../ui/AccountButton';
9
9
  //* Style
10
10
  import OrdersListStyle from './style';
11
+ // TODO: status change
11
12
  const OrdersList = ({ data, total, pageSize, router, pathname, searchParams }) => {
12
13
  const { translate } = useTranslation();
13
14
  const { winWidth } = useUi();
@@ -41,19 +42,19 @@ const OrdersList = ({ data, total, pageSize, router, pathname, searchParams }) =
41
42
  React.createElement("div", { className: `left-wrap` },
42
43
  React.createElement("div", { className: `left-item-wrap` },
43
44
  React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1`, text: `${translate('orderDate')}:` }),
44
- React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: item.order_date })),
45
+ React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: item.date })),
45
46
  React.createElement("div", { className: `left-item-wrap last` },
46
47
  React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1`, text: `${translate('orderNumber')}:` }),
47
- React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: `ID ${item.order_number}` }))),
48
+ React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: `ID ${item.orderNumber}` }))),
48
49
  React.createElement("div", { className: `right-wrap` }, item.status === 'delivered' ? (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1 account-primary-color5-bg status-item delivered`, text: 'delivered' })) : item.status === 'canceled' ? (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-error-color account-secondary-color7-bg status-item canceled`, text: 'canceled' })) : (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-secondary-color1 account-secondary-color8-bg status-item in-progress`, text: 'inProgress' })))),
49
50
  React.createElement("div", { className: `last-col-wrap` },
50
51
  React.createElement("div", { className: `left-wrap` },
51
52
  React.createElement("div", { className: `left-item-wrap` },
52
53
  React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1`, text: `${translate('totalItems')}:` }),
53
- React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: item.total_items })),
54
+ React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: item.itemsCount })),
54
55
  React.createElement("div", { className: `left-item-wrap last` },
55
56
  React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1`, text: `${translate('totalPrice')}:` }),
56
- React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: handlePriceCheckFunc(item.total_price, item.currency) }))),
57
+ React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color1 value`, text: handlePriceCheckFunc(item.total, item.currency) }))),
57
58
  React.createElement("div", { className: `right-wrap` },
58
59
  React.createElement(AccountButton, { text: 'viewOrder', btnType: `green-small-text`, url: `/account/order-history${item.id}` })))));
59
60
  })));
@@ -1,48 +1,32 @@
1
- import React, { memo, useState, useEffect } from 'react';
2
- import { Text, useUi } from '@weareconceptstudio/core';
1
+ import React, { memo, useState } from 'react';
2
+ import { Text } from '@weareconceptstudio/core';
3
3
  import { useAccountContext } from '../../AccountProvider';
4
4
  import AccountButton from '../ui/AccountButton';
5
5
  //* Utils
6
6
  import { handlePriceCheckFunc, numToLocalString } from '../../utils/_functions';
7
7
  //* Style
8
8
  import TotalCheckoutStyle from './style';
9
- const TotalCheckout = memo(({ isShipping, children, confirmation, buttonProps, itemsCount, subtotal, total, loading, shippingCost }) => {
10
- const { winWidth } = useUi();
9
+ import { Input } from '@weareconceptstudio/form';
10
+ const TotalCheckout = memo(({ isShipping, children, confirmation, buttonProps, itemsCount, subtotal, total, shippingCost }) => {
11
11
  const { currency } = useAccountContext();
12
12
  //! States
13
- const [headerHeight, setHeaderHeight] = useState();
14
13
  const [note, setNote] = useState();
15
- //! useEffect
16
- useEffect(() => {
17
- setHeaderHeight(document.getElementsByTagName('header')[0]?.clientHeight);
18
- }, [winWidth]);
19
- return (React.createElement(TotalCheckoutStyle, { "$headerHeight": headerHeight },
14
+ return (React.createElement(TotalCheckoutStyle, null,
20
15
  React.createElement("div", { className: `cart-main-wrap` },
21
16
  React.createElement("div", { className: `left-panel-wrap panel` }, children),
22
17
  React.createElement("div", { className: `right-panel-wrap panel ${confirmation ? 'display-none-wrap' : ''}` }, !confirmation && (React.createElement("div", { className: `max-width-wrapper sticky-wrap` },
23
- React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1`, text: `orderSummary` }),
18
+ React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-title`, text: `orderSummary` }),
24
19
  React.createElement("div", { className: `od-line` }),
25
20
  React.createElement("div", { className: `od-item-wrap` },
26
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1`, text: `subtotal` }),
27
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1`, text: itemsCount ? handlePriceCheckFunc(subtotal, currency) : `0 ${currency}` })),
21
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-subtotal`, text: `subtotal` }),
22
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-currency`, text: itemsCount ? handlePriceCheckFunc(subtotal, currency) : `0 ${currency}` })),
28
23
  React.createElement("div", { className: `od-item-wrap` },
29
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1`, text: `shipping` }),
30
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1`, text: `${String(shippingCost).toLowerCase() === 'free' || shippingCost === '-' ? shippingCost : `${numToLocalString(shippingCost)} ${currency}`}` })),
24
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-shipping`, text: `shipping` }),
25
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-shipping-cost`, text: `${String(shippingCost).toLowerCase() === 'free' || shippingCost === '-' ? shippingCost : `${numToLocalString(shippingCost)} ${currency}`}` })),
31
26
  React.createElement("div", { className: `od-item-wrap` },
32
- React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1`, text: `total` }),
33
- React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1`, text: itemsCount ? handlePriceCheckFunc(total, currency) : `0 ${currency}` })),
34
- typeof isShipping === 'boolean' && !isShipping ? (
35
- // <Input.TextArea
36
- // value={note}
37
- // autoSize={{ minRows: 5, maxRows: 10 }}
38
- // onChange={(e) => setNote(e.target.value)}
39
- // placeholder={translate('checkoutCommentPlaceholder')}
40
- // className={`comment-field account-p account-p3 account-font-regular account-primary-color1`}
41
- // />
42
- React.createElement("div", { style: {
43
- textAlign: 'center',
44
- margin: '16px 0',
45
- }, className: 'account-p account-p3 account-font-regular account-primary-color1' }, "Input Filed Textarea")) : null,
46
- React.createElement(AccountButton, { url: buttonProps.url, btnType: `full-width`, text: buttonProps.text, type: buttonProps.type, onClick: () => buttonProps.handleClick && buttonProps.handleClick(note), className: `${!itemsCount || loading || buttonProps.disabled ? 'disabled' : ''}` })))))));
27
+ React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-total`, text: `total` }),
28
+ React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-currnecy2`, text: itemsCount ? handlePriceCheckFunc(total, currency) : `0 ${currency}` })),
29
+ typeof isShipping === 'boolean' && !isShipping ? (React.createElement(Input.TextArea, { onChange: (e) => setNote(e.target.value), placeholder: 'checkoutCommentPlaceholder', containerClassName: `comment-field`, className: `account-p account-p3 account-font-regular account-primary-color1` })) : null,
30
+ React.createElement(AccountButton, { url: buttonProps.url, btnType: `full-width`, text: buttonProps.text, type: buttonProps.type, disabled: buttonProps.disabled, onClick: () => buttonProps.handleClick && buttonProps.handleClick(note), className: `sticky-wrap-btn ${buttonProps.disabled ? 'disabled' : ''}` })))))));
47
31
  });
48
32
  export default TotalCheckout;
@@ -49,32 +49,7 @@ const TotalCheckoutStyle = styled.section `
49
49
 
50
50
  .comment-field {
51
51
  width: 100%;
52
- height: var(--sp10x);
53
- padding: var(--account_commentPadding);
54
52
  margin-top: var(--account_commentMarginTop);
55
- vertical-align: top;
56
- border: 2px solid var(--account_primaryColor5);
57
- border-radius: var(--sp1x);
58
- background: transparent;
59
- -ms-overflow-style: none; /* IE and Edge */
60
- scrollbar-width: none;
61
-
62
- ::-webkit-scrollbar {
63
- display: none;
64
- }
65
-
66
- ::placeholder {
67
- color: var(--account_primaryColor3);
68
- opacity: 1;
69
- }
70
-
71
- :-ms-input-placeholder {
72
- color: var(--account_primaryColor3);
73
- }
74
-
75
- ::-ms-input-placeholder {
76
- color: var(--account_primaryColor3);
77
- }
78
53
  }
79
54
 
80
55
  .btn-wrap {
@@ -82,13 +57,6 @@ const TotalCheckoutStyle = styled.section `
82
57
  margin-top: var(--account_btnMTop);
83
58
  }
84
59
  }
85
-
86
- //! Sticky Wrapper
87
- .sticky-wrap {
88
- position: sticky;
89
- height: fit-content;
90
- top: calc(${(props) => props.$headerHeight}px + var(--account_cartMainWrapPadTop));
91
- }
92
60
  }
93
61
  }
94
62
 
@@ -6,8 +6,8 @@ import EmptyCartStyle from './style';
6
6
  const EmptyCart = ({ shoppingUrl }) => {
7
7
  return (React.createElement(EmptyCartStyle, null,
8
8
  React.createElement("div", { className: `empty-cart-wrap` },
9
- React.createElement(Text, { tag: `h4`, className: `account-h4 account-font-bold account-primary-color1`, text: `cartEmpty` }),
10
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 description`, text: `cartEmptyDesc` }),
11
- shoppingUrl ? (React.createElement(AccountButton, { btnType: 'purple-text', text: `shopNow`, url: shoppingUrl })) : null)));
9
+ React.createElement(Text, { tag: `h4`, className: `account-h4 account-font-bold account-primary-color1 empty-cart-title`, text: `cartEmpty` }),
10
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 empty-cart-description`, text: `cartEmptyDesc` }),
11
+ shoppingUrl ? (React.createElement(AccountButton, { text: `shopNow`, url: shoppingUrl, btnType: 'purple-text', className: 'empty-cart-btn' })) : null)));
12
12
  };
13
13
  export default EmptyCart;
@@ -8,7 +8,7 @@ const EmptyCartStyle = styled.section `
8
8
  max-width: var(--account_emptyCartWrapMaxWidth);
9
9
  width: 100%;
10
10
 
11
- .description {
11
+ .empty-cart-description {
12
12
  margin-top: var(--account_descriptionMTop);
13
13
  }
14
14
 
@@ -1,12 +1,11 @@
1
1
  import React, { memo, useMemo } from 'react';
2
2
  import { Image, Text } from '@weareconceptstudio/core';
3
3
  import { Select } from '@weareconceptstudio/form';
4
- import { useAccountContext } from '../../../../../AccountProvider';
5
4
  import { handlePriceCheckFunc } from '../../../../../utils/_functions';
6
5
  import Button from '../../../../ui/AccountButton';
6
+ //TODO: Fake
7
7
  const pathname = '/cart/';
8
- const Item = memo(({ data, remove, select, isLast, actions }) => {
9
- const { currency, maxQty } = useAccountContext();
8
+ const Item = memo(({ data, remove, select, isLast, actions, maxQty, currency }) => {
10
9
  const selectionList = useMemo(() => {
11
10
  if (select) {
12
11
  const selectList = [];
@@ -21,27 +20,27 @@ const Item = memo(({ data, remove, select, isLast, actions }) => {
21
20
  React.createElement("div", { className: `item-inner-wrapper` },
22
21
  React.createElement("div", { className: `col-item tl-col-1 col-item-1` },
23
22
  React.createElement("div", { className: `image-wrapper` },
24
- React.createElement(Image, { src: data?.product?.image?.src, alt: data?.product?.image?.alt })),
23
+ React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
25
24
  React.createElement("div", { className: `col-1-right-wrap` },
26
- React.createElement(Button, { url: data.product?.url, className: `capitalize`, text: data.product?.name, btnType: `green-large-text`, target: pathname === '/cart/' || pathname === '/checkout' ? '_blank' : '_self' }),
25
+ React.createElement(Button, { text: data.product.name, btnType: `green-large-text`, url: `/menu/${data.product.slug}`, className: `capitalize title-btn`, target: pathname === '/cart/' || pathname === '/checkout' ? '_blank' : '_self' }),
27
26
  React.createElement("div", { className: `right-first-item-wrap` },
28
- React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 capitalize`, text: data.product.short_info_1 })),
27
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: data.product.short_info_1 })),
29
28
  React.createElement("div", { className: `right-second-item-wrap` },
30
29
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: data.product.short_info_2 })))),
31
- React.createElement("div", { className: `col-item tl-col-2` }, select ? (React.createElement("div", { className: `select-and-out-of-stock-wrap` }, !data.product?.out_of_stock ? (React.createElement(Select, { allowSearch: false, options: selectionList, value: data.qty, onChange: (val) => actions.add({
32
- productId: data.product.id,
30
+ React.createElement("div", { className: `col-item tl-col-2` }, select ? (React.createElement("div", { className: `select-and-out-of-stock-wrap` }, !data.product?.out_of_stock ? (React.createElement(Select, { value: data.qty, allowSearch: false, options: selectionList, onChange: (val) => actions.add({
33
31
  qty: val,
32
+ productId: data.product.id,
34
33
  }) })) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty }))),
35
- React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, data?.product?.sale_price ? (React.createElement("div", null,
36
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 alignRight`, text: handlePriceCheckFunc(data?.product?.sale_price, currency) }),
37
- React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right`, text: handlePriceCheckFunc(data.product?.price, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 alignRight`, text: handlePriceCheckFunc(data.product?.price, currency) }))),
34
+ React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, data.product?.sale_price ? (React.createElement("div", null,
35
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right cart-sale-price`, text: handlePriceCheckFunc(data.product.sale_price, currency) }),
36
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right cart-price1`, text: handlePriceCheckFunc(data.product.price, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right cart-price2`, text: handlePriceCheckFunc(data.product.price, currency) }))),
38
37
  React.createElement("div", { className: `col-item tl-col-4 col-item-4 nowrap` },
39
38
  React.createElement("div", { className: `col-item-inner-wrap` },
40
- React.createElement("div", { className: `flex-end-wrap` }, data?.product.sale_price ? (React.createElement("div", null,
41
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right`, text: `${data.sale_total} ${currency}` }),
42
- React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right`, text: handlePriceCheckFunc(data.product?.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: `${data.total} ${currency}` }))),
39
+ React.createElement("div", { className: `flex-end-wrap` }, data.product?.sale_price ? (React.createElement("div", null,
40
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right cart-sale-total`, text: `${data.sale_total} ${currency}` }),
41
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right cart-total1`, text: handlePriceCheckFunc(data.product.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right cart-total2`, text: `${data.total} ${currency}` }))),
43
42
  React.createElement("div", { className: `favorite-and-remove-wrap` }, remove && (React.createElement("div", { className: `remove-btn-wrap` },
44
- React.createElement(Button, { text: 'remove', btnType: `green-small-text`, onClick: () => actions.delete({ productId: data.product?.id }) }))))))),
43
+ React.createElement(Button, { text: 'remove', btnType: `green-small-text`, className: 'cart-remove-btn', onClick: () => actions.delete({ productId: data.product?.id }) }))))))),
45
44
  isLast ? React.createElement("div", { className: 'line' }) : null));
46
45
  });
47
46
  export default Item;
@@ -1,60 +1,54 @@
1
1
  import React, { memo, useMemo } from 'react';
2
- import { Image, Text, useUi } from '@weareconceptstudio/core';
2
+ import { Image, Text } from '@weareconceptstudio/core';
3
3
  import { Select } from '@weareconceptstudio/form';
4
4
  import Button from '../../../../ui/AccountButton';
5
- import { useAccountContext } from '../../../../../AccountProvider';
6
5
  import { handlePriceCheckFunc } from '../../../../../utils/_functions';
7
- // import ProductIndividual from '@/components/common/ProductIndividual';
8
6
  //TODO: Fake
9
7
  const pathname = '/cart/';
10
- const addToCart = () => { };
11
- const removeCart = () => { };
12
- const ItemMobile = memo(({ data, additionalParameters, isLast }) => {
13
- const { openPopup } = useUi();
14
- const { currency } = useAccountContext();
8
+ const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency }) => {
15
9
  const selectionList = useMemo(() => {
16
- if (additionalParameters.select) {
10
+ if (select) {
17
11
  const selectList = [];
18
- for (let index = 1; index <= data.qty; index++) {
12
+ for (let index = 1; index <= maxQty; index++) {
19
13
  selectList.push({ id: index, name: index });
20
14
  }
21
15
  return selectList;
22
16
  }
23
- }, [data]);
17
+ }, [data, select, maxQty]);
24
18
  return (React.createElement(React.Fragment, null,
25
- isLast ? React.createElement("div", { className: 'line' }) : null,
26
19
  React.createElement("div", { className: `mobile-order-item-wrap` },
27
20
  React.createElement("div", { className: `mobile-order-item-inner-wrap` },
28
21
  React.createElement("div", { className: `mobile-image-wrap` },
29
- React.createElement(Image, { src: data?.images?.[0].src, alt: data?.images?.[0].alt })),
22
+ React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
30
23
  React.createElement("div", { className: `mobile-info-wrap` },
31
- React.createElement(Button, { className: `capitalize`, url: data.product?.url, btnType: `green-large-text`, text: data.product?.name || data.name, target: pathname === '/cart/' || pathname === '/checkout/' ? '_blank' : '_self' }),
32
- additionalParameters.select ? (React.createElement("div", { className: `select-and-out-of-stock-mobile-wrap` }, !data.product?.out_of_stock ? (
33
- // <FormSelect
34
- // list={selectionList}
35
- // selectedValue={data.qty}
36
- // className={`quantity-select-mobile-wrap`}
37
- // onChange={(val) => addToCart({ productId: data.product.id, variantId: data.selectedVariant.id, optionId: data.selectedOption.id, qty: val, update: true })}
38
- // />
39
- React.createElement(Select, { allowSearch: false, options: selectionList, value: 1, onChange: () => { } })) : (React.createElement("div", { className: `mobile-info-item` },
40
- React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1`, text: `quantityWithSymbol` }),
24
+ React.createElement(Button, { text: data.product.name, btnType: `green-large-text`, url: `/menu/${data.product.slug}`, className: `capitalize mobile-info-wrap-title`, target: pathname === '/cart/' || pathname === '/checkout/' ? '_blank' : '_self' }),
25
+ React.createElement("div", { className: 'mobile-info-item' },
26
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 mobile-short-info1`, text: data.product.short_info_1 })),
27
+ React.createElement("div", { className: 'mobile-info-item' },
28
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 mobile-short-info2`, text: data.product.short_info_2 })),
29
+ select ? (React.createElement("div", { className: `select-and-out-of-stock-mobile-wrap` }, !data.product?.out_of_stock ? (React.createElement(Select, { value: data.qty, allowSearch: false, options: selectionList, onChange: (val) => actions.add({
30
+ qty: val,
31
+ productId: data.product.id,
32
+ }) })) : (React.createElement("div", { className: `mobile-info-item` },
33
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity-with-symbol`, text: `quantityWithSymbol` }),
41
34
  "\u00A0",
42
- React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1`, text: data.qty }))))) : (React.createElement("div", { className: `mobile-info-item` },
43
- React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1`, text: `quantityWithSymbol` }),
35
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity`, text: data.qty }))))) : (React.createElement("div", { className: `mobile-info-item` },
36
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity-with-symbol2`, text: `quantityWithSymbol` }),
44
37
  "\u00A0",
45
- React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1`, text: data.qty || data.quantity }))),
38
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity2`, text: data.qty }))),
46
39
  React.createElement("div", { className: `mobile-price-wrap nowrap` },
47
- React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1 mb-mt`, text: `price` }),
48
- data?.discountedPrice ? (React.createElement("div", null,
49
- React.createElement(Text, { className: `account-p account-p3 account-font-bold secondaryColor2`, text: handlePriceCheckFunc(data?.product.discountedPrice, currency) }),
50
- React.createElement(Text, { className: `account-p account-p3 account-font-regular primaryColor2 lineThrough value`, text: handlePriceCheckFunc(data.product?.price, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold primaryColor1`, text: handlePriceCheckFunc(data.product?.price, currency) }))),
40
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt mobile-price-title`, text: `price` }),
41
+ data.product?.sale_price ? (React.createElement("div", null,
42
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 mobile-discounted-price`, text: handlePriceCheckFunc(data.product.sale_price, currency) }),
43
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value mobile-price`, text: handlePriceCheckFunc(data.product.price, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 mobile-price2`, text: handlePriceCheckFunc(data.product.price, currency) }))),
51
44
  React.createElement("div", { className: `mobile-total-price-wrap nowrap` },
52
- React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1 mb-mt`, text: `total` }),
53
- data.selectedOption?.discountedPrice ? (React.createElement("div", null,
54
- React.createElement(Text, { className: `account-p account-p3 account-font-bold secondaryColor2`, text: handlePriceCheckFunc(data.product?.discountedPrice * data.qty, currency) }),
55
- React.createElement(Text, { className: `account-p account-p3 account-font-regular primaryColor2 lineThrough`, text: handlePriceCheckFunc(data.product?.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold primaryColor1`, text: handlePriceCheckFunc(data.product?.price * data.qty || data.total, currency || currency) }))))),
45
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt mobile-total`, text: `total` }),
46
+ data.product?.sale_price ? (React.createElement("div", null,
47
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 mobile-total-discounted-price`, text: `${data.sale_total} ${currency}` }),
48
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through mobile-total-price`, text: handlePriceCheckFunc(data.product.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 mobile-total-price2`, text: `${data.total} ${currency}` }))))),
56
49
  pathname === '/cart/' && (React.createElement("div", { className: `edit-remove-favorite-mobile-wrap` },
57
- React.createElement("div", { className: `favorite-remove-mobile-wrap` }, additionalParameters.remove && (React.createElement(Button, { text: 'remove', btnType: `green-small-text`, onClick: () => removeCart({ productId: data.product.id, variantId: data.selectedVariant.id, optionId: data.selectedOption.id }) })))))),
50
+ React.createElement("div", { className: 'empty' }),
51
+ React.createElement("div", { className: `favorite-remove-mobile-wrap` }, remove && (React.createElement(Button, { text: 'remove', btnType: `green-small-text`, onClick: () => actions.delete({ productId: data.product.id }) })))))),
58
52
  React.createElement("div", { className: 'line' })));
59
53
  });
60
54
  export default ItemMobile;