@ikas/storefront 2.0.50 → 2.0.51-alpha.2

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.
@@ -1 +1 @@
1
- import e from'../../../../ext/style-inject/dist/style-inject.es.js';var t={CartSummary:"style-module_CartSummary__30RcF",AllowExpand:"style-module_AllowExpand__3kDXF",ExpandHeader:"style-module_ExpandHeader__2ICjA",Left:"style-module_Left__A54sv",Price:"style-module_Price__sosrJ",PriceText:"style-module_PriceText__1ePGb",ArrowDown:"style-module_ArrowDown__2ET-d",Rotated:"style-module_Rotated__3sgbm",DetailsContainer:"style-module_DetailsContainer__FBBIP",Details:"style-module_Details__3-X_i",Divider:"style-module_Divider__2d0Zk",ActionTextBtn:"style-module_ActionTextBtn__FXJQX",NoUnderline:"style-module_NoUnderline__34-1r",Light:"style-module_Light__WFzH8",SubTotalInfo:"style-module_SubTotalInfo__1QMnr",InfoRow:"style-module_InfoRow__3eZdJ",Label:"style-module_Label__3E7LF",Value:"style-module_Value__3mBvk",TotalContainer:"style-module_TotalContainer__36DNt",TitleContainer:"style-module_TitleContainer__3ptQE",Title:"style-module_Title__16M5E",TotalPrice:"style-module_TotalPrice__2s7DC",AppliedCoupon:"style-module_AppliedCoupon__37qv8",CouponCode:"style-module_CouponCode__3rgOu",ClearCoupon:"style-module_ClearCoupon__1Rx4A",NotificationContainer:"style-module_NotificationContainer__Zblek",CheckoutNoteContainer:"style-module_CheckoutNoteContainer__zQQjd",CheckoutNoteDisplay:"style-module_CheckoutNoteDisplay__kTFTx",Success:"style-module_Success__2vqWA",GiftLabel:"style-module_GiftLabel__2f-wC",PoweredBy:"style-module_PoweredBy__1hgWQ"};e("@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF {\n width: 100%;\n background-color: var(--checkout-card-bg-color);\n }\n}\n.style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom 0.3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color);\n}\n.style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600;\n}\n.style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 600;\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_PriceText__1ePGb {\n font-weight: 600;\n margin-right: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d {\n transition: all 0.3s;\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg);\n}\n.style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height 0.3s ease-in-out;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n padding: 0 24px;\n box-shadow: 1px 2px 5px 0px rgba(0, 0, 0, 0.2);\n }\n}\n.style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n padding-top: 24px;\n }\n}\n.style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color);\n}\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX:hover {\n text-decoration: underline;\n}\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_NoUnderline__34-1r:hover {\n text-decoration: none;\n}\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_Light__WFzH8 {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0;\n}\n.style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\n}\n.style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 20px;\n font-weight: 600;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n height: 64px;\n margin-top: 0px;\n }\n}\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_CouponCode__3rgOu {\n font-size: 14px;\n}\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A svg {\n transform: scale(0.8);\n}\n.style-module_CartSummary__30RcF .style-module_NotificationContainer__Zblek {\n margin-bottom: 14px;\n}\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px;\n}\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_Title__16M5E {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_CheckoutNoteDisplay__kTFTx {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd.style-module_Success__2vqWA {\n margin-top: 0;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 0px;\n }\n}\n.style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC {\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC span {\n margin-left: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n display: flex;\n }\n}\n.style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ a {\n display: flex;\n align-items: center;\n}");export{t as default};
1
+ import e from'../../../../ext/style-inject/dist/style-inject.es.js';var t={ExpandHeader:"style-module_ExpandHeader__2ICjA",Left:"style-module_Left__A54sv",Price:"style-module_Price__sosrJ",PriceText:"style-module_PriceText__1ePGb",ArrowDown:"style-module_ArrowDown__2ET-d",Rotated:"style-module_Rotated__3sgbm",CartSummary:"style-module_CartSummary__30RcF",HideOnDesktop:"style-module_HideOnDesktop__Xw1Ri",DetailsContainer:"style-module_DetailsContainer__FBBIP",Details:"style-module_Details__3-X_i",Divider:"style-module_Divider__2d0Zk",ActionTextBtn:"style-module_ActionTextBtn__FXJQX",NoUnderline:"style-module_NoUnderline__34-1r",Light:"style-module_Light__WFzH8",SubTotalInfo:"style-module_SubTotalInfo__1QMnr",InfoRow:"style-module_InfoRow__3eZdJ",Label:"style-module_Label__3E7LF",Value:"style-module_Value__3mBvk",TotalContainer:"style-module_TotalContainer__36DNt",TitleContainer:"style-module_TitleContainer__3ptQE",Title:"style-module_Title__16M5E",TotalPrice:"style-module_TotalPrice__2s7DC",AppliedCoupon:"style-module_AppliedCoupon__37qv8",CouponCode:"style-module_CouponCode__3rgOu",ClearCoupon:"style-module_ClearCoupon__1Rx4A",NotificationContainer:"style-module_NotificationContainer__Zblek",CheckoutNoteContainer:"style-module_CheckoutNoteContainer__zQQjd",CheckoutNoteDisplay:"style-module_CheckoutNoteDisplay__kTFTx",Success:"style-module_Success__2vqWA",GiftLabel:"style-module_GiftLabel__2f-wC",PoweredBy:"style-module_PoweredBy__1hgWQ"};e(".style-module_ExpandHeader__2ICjA {\n position: sticky;\n top: 0;\n z-index: 10;\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-top: 1px solid var(--checkout-border-color);\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom 0.3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color);\n}\n@media only screen and (min-width: 1000px) {\n .style-module_ExpandHeader__2ICjA {\n display: none;\n }\n}\n.style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600;\n}\n.style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 600;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_PriceText__1ePGb {\n font-weight: 600;\n margin-right: 8px;\n}\n.style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d {\n transition: all 0.3s;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg);\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF {\n width: 100%;\n background-color: var(--checkout-card-bg-color);\n }\n}\n@media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_HideOnDesktop__Xw1Ri {\n display: none;\n }\n}\n.style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height 0.3s ease-in-out;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n padding: 0 24px;\n box-shadow: 1px 2px 5px 0px rgba(0, 0, 0, 0.2);\n }\n}\n.style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n padding-top: 24px;\n }\n}\n.style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color);\n}\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX:hover {\n text-decoration: underline;\n}\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_NoUnderline__34-1r:hover {\n text-decoration: none;\n}\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_Light__WFzH8 {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0;\n}\n.style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\n}\n.style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 20px;\n font-weight: 600;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n height: 64px;\n margin-top: 0px;\n }\n}\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_CouponCode__3rgOu {\n font-size: 14px;\n}\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A svg {\n transform: scale(0.8);\n}\n.style-module_CartSummary__30RcF .style-module_NotificationContainer__Zblek {\n margin-bottom: 14px;\n}\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px;\n}\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_Title__16M5E {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_CheckoutNoteDisplay__kTFTx {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd.style-module_Success__2vqWA {\n margin-top: 0;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 0px;\n }\n}\n.style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC {\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC span {\n margin-left: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n display: flex;\n }\n}\n.style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px;\n}\n.style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ a {\n display: flex;\n align-items: center;\n}");export{t as default};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t}from'../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as r}from"mobx-react-lite";import{useRouter as i}from"next/router.js";import s,{CheckoutStep as c}from"./model.js";import n from"./steps/step-info/index.js";import{CheckoutStepShipping as a}from"./steps/step-shipping/index.js";import{CheckoutStepPayment as m}from"./steps/step-payment/index.js";import{CartSummary as l}from"./components/cart-summary/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/data/customer-attribute/index.js";import"../../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as d}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import{ContactForm as u}from"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{StepSuccess as p}from"./steps/step-success/index.js";import{Modal as v}from"./components/modal/index.js";import h from"./style.module.scss.js";import{IkasPageHead as E}from"../page/head.js";import{Analytics as g}from"../../analytics/analytics.js";import"../../analytics/head/index.js";import{Image as f}from"../image/index.js";import x from"next/link.js";import y,{Step as k}from"./components/step-container/index.js";import{IkasStorefrontConfig as j}from"../../storefront/index.js";import'../../ext/lodash/isArguments.js';import'../../ext/lodash/isBuffer.js';import'../../ext/lodash/isTypedArray.js';import'../../ext/lodash/_baseGetTag.js';import{formatMoney as C}from"../../utils/currency.js";import{useTranslation as N}from"../../utils/i18n.js";import{StockError as b}from"./components/error/stock-error/index.js";import F from"./components/svg/ikas.js";import P from'../../ext/react-tooltip/dist/index.es.js';import{FullscreenLoading as T}from"./components/fullscreen-loading/index.js";import S from"./components/notification-box/index.js";import{FormItem as M}from"./components/form-item/index.js";import{FormItemType as A}from"./components/form-item/model.js";import{Button as w}from"./components/button/index.js";var I=r((function(e){var t,r,n,a=e.checkout,m=e.checkoutSettings,u=e.merchantSettings,f=e.customizationProps,x=e.returnPolicy,y=e.privacyPolicy,k=e.termsOfService,C=N().t,S=i(),M=o.useState((function(){return new s(a,m,u,S,x,y,k,C,f||{})}))[0];return M.step===c.PAYMENT&&g.disableHTML(),o.useEffect((function(){M.checkoutSettings.isAccountRequired&&!M.checkout.hasCustomer&&S.push("/account/login?redirect="+encodeURIComponent(M.checkoutUrl)),g.beginCheckout(M.checkout),g.pageView(d.CHECKOUT)}),[]),o.useEffect((function(){M.customizationProps=f,function(e){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==e?void 0:e.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==e?void 0:e.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==e?void 0:e.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==e?void 0:e.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==e?void 0:e.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==e?void 0:e.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==e?void 0:e.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==e?void 0:e.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==e?void 0:e.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==e?void 0:e.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==e?void 0:e.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==e?void 0:e.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==e?void 0:e.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==e?void 0:e.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==e?void 0:e.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==e?void 0:e.successLightColor)||"#F6FFED")}(f)}),[f]),M.isCheckoutLoaded&&M.store.customerStore.initialized?M.checkout.hasCustomer&&(null===(t=M.store.customerStore.customer)||void 0===t?void 0:t.id)!==(null===(r=M.checkout.customer)||void 0===r?void 0:r.id)?(S.push("/account/login?redirect="+encodeURIComponent(M.checkoutUrl)),null):o.createElement(o.Fragment,null,o.createElement(E,{pageType:d.CHECKOUT,pageTitle:((null===(n=M.merchantSettings)||void 0===n?void 0:n.merchantName)||"")+" - "+C("checkout-page:securePayment"),pageDescription:C("checkout-page:securePayment")}),o.createElement("div",{id:"Checkout",className:h.CheckoutPage},o.createElement(P,{place:"top",type:"dark",effect:"solid",arrowColor:"transparent",multiline:!0,className:h.ReactTooltipWrap,globalEventOff:"touchstart"}),o.createElement("div",{className:h.Left},o.createElement("div",{className:h.LeftContent},o.createElement("div",null,o.createElement(B,{vm:M}),M.hasStockError&&o.createElement("div",{className:h.ErrorContainer},o.createElement(b,{vm:M,error:M.error})),!M.hasStockError&&o.createElement(o.Fragment,null,o.createElement("div",{className:h.MobileCartSummary},o.createElement(l,{vm:M,allowExpand:!0})),M.step===c.SUCCESS?o.createElement(p,{vm:M}):o.createElement(L,{vm:M})),o.createElement("div",{className:h.Space})),o.createElement(U,{vm:M}))),o.createElement("div",{className:h.Right},o.createElement("div",{className:h.RightContent},o.createElement(l,{vm:M}),o.createElement("div",{className:h.PoweredBy},o.createElement("span",null,"powered by"),o.createElement("a",{href:"https://ikas.com"+("tr"===j.getCurrentLocale()?"/tr":""),target:"_blank"},o.createElement(F,null))))),!!M.policyModalText&&o.createElement(v,{title:M.policyModalTitle,modalContent:M.policyModalText,onClose:function(){M.policyModalText=""}}),M.isContactModalVisible&&o.createElement(H,{vm:M,setVisible:M.setContactModalVisible}))):o.createElement(T,null)})),B=r((function(e){var t,r,i=e.vm,s=N().t;return o.createElement("div",{className:h.Header},o.createElement(x,{href:"/",passHref:!0},o.createElement("a",null,(null===(t=i.merchantSettings)||void 0===t?void 0:t.logoId)?o.createElement("div",{className:h.Logo},o.createElement(f,{layout:"fill",image:i.merchantSettings.logo,sizes:"360px"})):(null===(r=i.merchantSettings)||void 0===r?void 0:r.merchantName)||"")),!i.checkout.hasCustomer&&o.createElement("div",{className:h.LoginText},o.createElement("span",{className:h.LoginCta},s("checkout-page:alreadyHaveAnAccount")),o.createElement(x,{href:"/account/login?redirect="+encodeURIComponent(i.checkoutUrl),passHref:!0},o.createElement("a",{className:h.LoginBtn},s("checkout-page:actions.login")))),i.checkout.hasCustomer&&o.createElement("div",{className:h.CustomerInfo},o.createElement("div",{className:h.Name},i.checkout.customerFullName),o.createElement("div",{className:h.Email},i.checkout.customerEmail)))})),L=r((function(e){var t=e.vm,r=N().t,i=o.useMemo((function(){switch(t.step){case c.INFO:return o.createElement(n,{vm:t});case c.SHIPPING:return o.createElement(a,{vm:t});case c.PAYMENT:return o.createElement(m,{vm:t});case c.SUCCESS:return o.createElement(p,{vm:t})}}),[t,t.step]),s=[new k(r("checkout-page:address"),t.step===c.INFO,t.step!==c.INFO,t.step!==c.INFO?o.createElement("div",{className:h.AdressStepInfo},o.createElement(O,{vm:t}),o.createElement("div",{className:h.EditBtn,onClick:t.onBackToInfoClick},r("checkout-page:actions.edit"))):void 0,t.step!==c.INFO?o.createElement("div",{className:h.AddressStepInfoMobile},o.createElement(O,{vm:t})):void 0),new k(r("checkout-page:shipping"),t.step===c.SHIPPING,t.step===c.PAYMENT,t.step===c.PAYMENT?o.createElement("div",{className:h.AdressStepInfo},o.createElement(R,{vm:t}),t.checkout.availableShippingMethods.length>1&&o.createElement("div",{className:h.EditBtn,onClick:t.onBackToShippingClick},r("checkout-page:actions.edit"))):void 0,t.step===c.PAYMENT?o.createElement("div",{className:h.AddressStepInfoMobile},o.createElement(R,{vm:t})):void 0),new k(r("checkout-page:payment"),t.step===c.PAYMENT,!1)];return o.createElement(y,{steps:s,stepContent:i})})),O=r((function(e){var t,r,i,s,c,n=e.vm;return o.createElement("div",{className:h.Address},o.createElement("div",{className:[h.Text,h.WithMBottom].join(" ")},(null===(t=n.checkout.customer)||void 0===t?void 0:t.email)||""),o.createElement("div",{className:h.Text},((null===(r=n.checkout.customer)||void 0===r?void 0:r.firstName)||"")+" "+((null===(i=n.checkout.customer)||void 0===i?void 0:i.lastName)||"")),o.createElement("div",{className:[h.Text,h.Gray].join(" ")},null===(s=n.checkout.shippingAddress)||void 0===s?void 0:s.phone),o.createElement("div",{className:[h.Text,h.Gray].join(" ")},null===(c=n.checkout.shippingAddress)||void 0===c?void 0:c.addressText))})),R=r((function(e){var t=e.vm,r=N().t;return o.createElement("div",{className:h.Address},t.checkout.shippingLines&&t.checkout.shippingLines.length?o.createElement(o.Fragment,null,o.createElement("span",null,t.checkout.shippingLines[0].title),o.createElement("span",{className:h.LightText}," / "+(0===t.checkout.shippingLines[0].price?r("checkout-page:free"):C(t.checkout.shippingLines[0].price,t.checkout.cart.currencyCode)))):r("checkout-page:standartShipping"))})),U=r((function(e){var t=e.vm,r=N().t;return o.createElement("div",{className:h.Footer},o.createElement("div",{className:h.FooterItem,onClick:function(){t.policyModalTitle=r("checkout-page:returnPolicy"),t.policyModalText=t.returnPolicy}},r("checkout-page:returnPolicy")),o.createElement("div",{className:h.FooterBullet},"•"),o.createElement("div",{className:h.FooterItem,onClick:function(){t.policyModalTitle=r("checkout-page:privacyPolicy"),t.policyModalText=t.privacyPolicy}},r("checkout-page:privacyPolicy")),o.createElement("div",{className:h.FooterBullet},"•"),o.createElement("div",{className:h.FooterItem,onClick:function(){t.policyModalTitle=r("checkout-page:termsOfService"),t.policyModalText=t.termsOfService}},r("checkout-page:termsOfService")))})),H=r((function(r){var i,s,c=r.vm,n=r.setVisible,a=N().t,m=o.useState(!1),l=m[0],d=m[1],p=o.useState(!1),h=p[0],E=p[1],g=o.useState(new u({message:{requiredRule:"",emailRule:"",minRule:""},store:c.store}))[0];g.email=c.checkout.customerEmail,g.firstName=(null===(i=c.checkout.customer)||void 0===i?void 0:i.firstName)||"",g.lastName=(null===(s=c.checkout.customer)||void 0===s?void 0:s.lastName)||"";var f=o.useCallback((function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return h?[2,n(!1)]:(d(!0),[4,g.saveContactForm()]);case 1:return e.sent()&&E(!0),d(!1),[2]}}))}))}),[l]);return o.createElement(v,{title:a("checkout-page:contactForm"),modalContent:o.createElement("div",null,h&&o.createElement("div",{style:{marginBottom:"12px",maxWidth:"352px"}},o.createElement(S,{type:"success",title:a("checkout-page:contactFormSent"),content:a("checkout-page:contactFormDescription")})),o.createElement(M,{type:A.TEXT_AREA,label:"",value:g.message||"",onChange:g.onMessageChange,textAreaPlaceholder:a("checkout-page:contactFormCta")}),o.createElement(w,{style:{width:"100%",marginTop:"24px"},text:a(h?"checkout-page:actions.close":"checkout-page:actions.sendMessage"),isLoading:l,isDisabled:!g.message,onClick:f})),onClose:function(){return n(!1)}})}));export{I as default};
1
+ import{__awaiter as e,__generator as t}from'../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as r}from"mobx-react-lite";import{useRouter as i}from"next/router.js";import s,{CheckoutStep as c}from"./model.js";import n from"./steps/step-info/index.js";import{CheckoutStepShipping as a}from"./steps/step-shipping/index.js";import{CheckoutStepPayment as m}from"./steps/step-payment/index.js";import{CartSummary as l}from"./components/cart-summary/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/data/customer-attribute/index.js";import"../../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as d}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import{ContactForm as u}from"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{StepSuccess as p}from"./steps/step-success/index.js";import{Modal as v}from"./components/modal/index.js";import h from"./style.module.scss.js";import{IkasPageHead as E}from"../page/head.js";import{Analytics as g}from"../../analytics/analytics.js";import"../../analytics/head/index.js";import{Image as f}from"../image/index.js";import x from"next/link.js";import k,{Step as y}from"./components/step-container/index.js";import{IkasStorefrontConfig as j}from"../../storefront/index.js";import'../../ext/lodash/isArguments.js';import'../../ext/lodash/isBuffer.js';import'../../ext/lodash/isTypedArray.js';import'../../ext/lodash/_baseGetTag.js';import{formatMoney as C}from"../../utils/currency.js";import{useTranslation as N}from"../../utils/i18n.js";import{StockError as b}from"./components/error/stock-error/index.js";import F from"./components/svg/ikas.js";import P from'../../ext/react-tooltip/dist/index.es.js';import{FullscreenLoading as T}from"./components/fullscreen-loading/index.js";import S from"./components/notification-box/index.js";import{FormItem as A}from"./components/form-item/index.js";import{FormItemType as M}from"./components/form-item/model.js";import{Button as w}from"./components/button/index.js";var I=r((function(e){var t,r,n,a=e.checkout,m=e.checkoutSettings,u=e.merchantSettings,f=e.customizationProps,x=e.returnPolicy,k=e.privacyPolicy,y=e.termsOfService,C=N().t,S=i(),A=o.useState((function(){return new s(a,m,u,S,x,k,y,C,f||{})}))[0];return A.step===c.PAYMENT&&g.disableHTML(),o.useEffect((function(){A.checkoutSettings.isAccountRequired&&!A.checkout.hasCustomer&&S.push("/account/login?redirect="+encodeURIComponent(A.checkoutUrl)),g.beginCheckout(A.checkout),g.pageView(d.CHECKOUT)}),[]),o.useEffect((function(){A.customizationProps=f,function(e){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==e?void 0:e.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==e?void 0:e.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==e?void 0:e.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==e?void 0:e.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==e?void 0:e.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==e?void 0:e.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==e?void 0:e.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==e?void 0:e.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==e?void 0:e.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==e?void 0:e.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==e?void 0:e.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==e?void 0:e.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==e?void 0:e.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==e?void 0:e.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==e?void 0:e.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==e?void 0:e.successLightColor)||"#F6FFED")}(f)}),[f]),A.isCheckoutLoaded&&A.store.customerStore.initialized?A.checkout.hasCustomer&&(null===(t=A.store.customerStore.customer)||void 0===t?void 0:t.id)!==(null===(r=A.checkout.customer)||void 0===r?void 0:r.id)?(S.push("/account/login?redirect="+encodeURIComponent(A.checkoutUrl)),null):o.createElement(o.Fragment,null,o.createElement(E,{pageType:d.CHECKOUT,pageTitle:((null===(n=A.merchantSettings)||void 0===n?void 0:n.merchantName)||"")+" - "+C("checkout-page:securePayment"),pageDescription:C("checkout-page:securePayment")}),o.createElement("div",{id:"Checkout",className:h.CheckoutPage},o.createElement(P,{place:"top",type:"dark",effect:"solid",arrowColor:"transparent",multiline:!0,className:h.ReactTooltipWrap,globalEventOff:"touchstart"}),o.createElement("div",{className:h.Left},o.createElement("div",{className:h.LeftContent},o.createElement("div",null,o.createElement(B,{vm:A}),A.hasStockError&&o.createElement("div",{className:h.ErrorContainer},o.createElement(b,{vm:A,error:A.error})),!A.hasStockError&&o.createElement(o.Fragment,null,o.createElement(l,{vm:A,allowExpand:!0}),A.step===c.SUCCESS?o.createElement(p,{vm:A}):o.createElement(L,{vm:A})),o.createElement("div",{className:h.Space})),o.createElement(U,{vm:A}))),o.createElement("div",{className:h.Right},o.createElement("div",{className:h.RightContent},o.createElement(l,{vm:A}),o.createElement("div",{className:h.PoweredBy},o.createElement("span",null,"powered by"),o.createElement("a",{href:"https://ikas.com"+("tr"===j.getCurrentLocale()?"/tr":""),target:"_blank"},o.createElement(F,null))))),!!A.policyModalText&&o.createElement(v,{title:A.policyModalTitle,modalContent:A.policyModalText,onClose:function(){A.policyModalText=""}}),A.isContactModalVisible&&o.createElement(H,{vm:A,setVisible:A.setContactModalVisible}))):o.createElement(T,null)})),B=r((function(e){var t,r,i=e.vm,s=N().t;return o.createElement("div",{className:h.Header},o.createElement(x,{href:"/",passHref:!0},o.createElement("a",null,(null===(t=i.merchantSettings)||void 0===t?void 0:t.logoId)?o.createElement("div",{className:h.Logo},o.createElement(f,{layout:"fill",image:i.merchantSettings.logo,sizes:"360px"})):(null===(r=i.merchantSettings)||void 0===r?void 0:r.merchantName)||"")),!i.checkout.hasCustomer&&o.createElement("div",{className:h.LoginText},o.createElement("span",{className:h.LoginCta},s("checkout-page:alreadyHaveAnAccount")),o.createElement(x,{href:"/account/login?redirect="+encodeURIComponent(i.checkoutUrl),passHref:!0},o.createElement("a",{className:h.LoginBtn},s("checkout-page:actions.login")))),i.checkout.hasCustomer&&o.createElement("div",{className:h.CustomerInfo},o.createElement("div",{className:h.Name},i.checkout.customerFullName),o.createElement("div",{className:h.Email},i.checkout.customerEmail)))})),L=r((function(e){var t=e.vm,r=N().t,i=o.useMemo((function(){switch(t.step){case c.INFO:return o.createElement(n,{vm:t});case c.SHIPPING:return o.createElement(a,{vm:t});case c.PAYMENT:return o.createElement(m,{vm:t});case c.SUCCESS:return o.createElement(p,{vm:t})}}),[t,t.step]),s=[new y(r("checkout-page:address"),t.step===c.INFO,t.step!==c.INFO,t.step!==c.INFO?o.createElement("div",{className:h.AdressStepInfo},o.createElement(O,{vm:t}),o.createElement("div",{className:h.EditBtn,onClick:t.onBackToInfoClick},r("checkout-page:actions.edit"))):void 0,t.step!==c.INFO?o.createElement("div",{className:h.AddressStepInfoMobile},o.createElement(O,{vm:t})):void 0),new y(r("checkout-page:shipping"),t.step===c.SHIPPING,t.step===c.PAYMENT,t.step===c.PAYMENT?o.createElement("div",{className:h.AdressStepInfo},o.createElement(R,{vm:t}),t.checkout.availableShippingMethods.length>1&&o.createElement("div",{className:h.EditBtn,onClick:t.onBackToShippingClick},r("checkout-page:actions.edit"))):void 0,t.step===c.PAYMENT?o.createElement("div",{className:h.AddressStepInfoMobile},o.createElement(R,{vm:t})):void 0),new y(r("checkout-page:payment"),t.step===c.PAYMENT,!1)];return o.createElement(k,{steps:s,stepContent:i})})),O=r((function(e){var t,r,i,s,c,n=e.vm;return o.createElement("div",{className:h.Address},o.createElement("div",{className:[h.Text,h.WithMBottom].join(" ")},(null===(t=n.checkout.customer)||void 0===t?void 0:t.email)||""),o.createElement("div",{className:h.Text},((null===(r=n.checkout.customer)||void 0===r?void 0:r.firstName)||"")+" "+((null===(i=n.checkout.customer)||void 0===i?void 0:i.lastName)||"")),o.createElement("div",{className:[h.Text,h.Gray].join(" ")},null===(s=n.checkout.shippingAddress)||void 0===s?void 0:s.phone),o.createElement("div",{className:[h.Text,h.Gray].join(" ")},null===(c=n.checkout.shippingAddress)||void 0===c?void 0:c.addressText))})),R=r((function(e){var t=e.vm,r=N().t;return o.createElement("div",{className:h.Address},t.checkout.shippingLines&&t.checkout.shippingLines.length?o.createElement(o.Fragment,null,o.createElement("span",null,t.checkout.shippingLines[0].title),o.createElement("span",{className:h.LightText}," / "+(0===t.checkout.shippingLines[0].price?r("checkout-page:free"):C(t.checkout.shippingLines[0].price,t.checkout.cart.currencyCode)))):r("checkout-page:standartShipping"))})),U=r((function(e){var t=e.vm,r=N().t;return o.createElement("div",{className:h.Footer},o.createElement("div",{className:h.FooterItem,onClick:function(){t.policyModalTitle=r("checkout-page:returnPolicy"),t.policyModalText=t.returnPolicy}},r("checkout-page:returnPolicy")),o.createElement("div",{className:h.FooterBullet},"•"),o.createElement("div",{className:h.FooterItem,onClick:function(){t.policyModalTitle=r("checkout-page:privacyPolicy"),t.policyModalText=t.privacyPolicy}},r("checkout-page:privacyPolicy")),o.createElement("div",{className:h.FooterBullet},"•"),o.createElement("div",{className:h.FooterItem,onClick:function(){t.policyModalTitle=r("checkout-page:termsOfService"),t.policyModalText=t.termsOfService}},r("checkout-page:termsOfService")))})),H=r((function(r){var i,s,c=r.vm,n=r.setVisible,a=N().t,m=o.useState(!1),l=m[0],d=m[1],p=o.useState(!1),h=p[0],E=p[1],g=o.useState(new u({message:{requiredRule:"",emailRule:"",minRule:""},store:c.store}))[0];g.email=c.checkout.customerEmail,g.firstName=(null===(i=c.checkout.customer)||void 0===i?void 0:i.firstName)||"",g.lastName=(null===(s=c.checkout.customer)||void 0===s?void 0:s.lastName)||"";var f=o.useCallback((function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return h?[2,n(!1)]:(d(!0),[4,g.saveContactForm()]);case 1:return e.sent()&&E(!0),d(!1),[2]}}))}))}),[l]);return o.createElement(v,{title:a("checkout-page:contactForm"),modalContent:o.createElement("div",null,h&&o.createElement("div",{style:{marginBottom:"12px",maxWidth:"352px"}},o.createElement(S,{type:"success",title:a("checkout-page:contactFormSent"),content:a("checkout-page:contactFormDescription")})),o.createElement(A,{type:M.TEXT_AREA,label:"",value:g.message||"",onChange:g.onMessageChange,textAreaPlaceholder:a("checkout-page:contactFormCta")}),o.createElement(w,{style:{width:"100%",marginTop:"24px"},text:a(h?"checkout-page:actions.close":"checkout-page:actions.sendMessage"),isLoading:l,isDisabled:!g.message,onClick:f})),onClose:function(){return n(!1)}})}));export{I as default};