@restaround/react 1.4.46 → 1.4.48

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
- {"version":3,"file":"index.esm.js","sources":["../src/modules/view/constants.ts","../src/modules/view/services.ts","../src/modules/view/utils.ts","../src/store/index.tsx","../src/modules/view/hooks.ts","../node_modules/tslib/tslib.es6.js","../src/modules/order/models.ts","../src/modules/order/constants.ts","../src/modules/order/utils.ts","../src/constants/env.ts","../src/services/api/index.ts","../src/modules/customer/services.ts","../src/modules/common/services.ts","../src/modules/branch/utils.ts","../src/modules/branch/hooks.ts","../src/modules/store/hooks.ts","../src/modules/table/hooks.ts","../src/store/order.tsx","../src/modules/branch/models.ts","../src/modules/business/models.ts","../src/modules/business/constants.ts","../src/modules/business/hooks.ts","../src/components/PublicMenu/Header/Languages/Languages.tsx","../src/components/PublicMenu/Header/BusinessHeader/BusinessHeader.tsx","../src/components/BackIcon/BackIcon.tsx","../src/components/PublicMenu/Header/BranchHeader/HeaderLinks/HeaderLinks.tsx","../src/components/PublicMenu/Header/BranchHeader/BranchHeader.tsx","../src/components/PublicMenu/Header/Header.tsx","../src/services/translation/locales/index.ts","../src/services/translation/locales/az/index.ts","../src/services/translation/locales/az/error.ts","../src/services/translation/locales/az/common.ts","../src/services/translation/locales/az/order.ts","../src/services/translation/locales/az/customer.ts","../src/services/translation/locales/az/auth.ts","../src/services/translation/locales/az/events.ts","../src/services/translation/locales/az/pricing.ts","../src/services/translation/locales/az/branch.ts","../src/services/translation/locales/en/index.ts","../src/services/translation/locales/en/error.ts","../src/services/translation/locales/en/common.ts","../src/services/translation/locales/en/order.ts","../src/services/translation/locales/en/customer.ts","../src/services/translation/locales/en/auth.ts","../src/services/translation/locales/en/events.ts","../src/services/translation/locales/en/pricing.ts","../src/services/translation/locales/en/branch.ts","../src/services/translation/locales/ru/index.ts","../src/services/translation/locales/ru/error.ts","../src/services/translation/locales/ru/common.ts","../src/services/translation/locales/ru/order.ts","../src/services/translation/locales/ru/customer.ts","../src/services/translation/locales/ru/auth.ts","../src/services/translation/locales/ru/events.ts","../src/services/translation/locales/ru/pricing.ts","../src/services/translation/locales/ru/branch.ts","../src/services/translation/locales/tr/index.ts","../src/services/translation/locales/tr/error.ts","../src/services/translation/locales/tr/common.ts","../src/services/translation/locales/tr/order.ts","../src/services/translation/locales/tr/customer.ts","../src/services/translation/locales/tr/auth.ts","../src/services/translation/locales/tr/events.ts","../src/services/translation/locales/tr/pricing.ts","../src/services/translation/locales/tr/branch.ts","../src/services/translation/locales/nl/index.ts","../src/services/translation/locales/nl/error.ts","../src/services/translation/locales/nl/common.ts","../src/services/translation/locales/nl/order.ts","../src/services/translation/locales/nl/customer.ts","../src/services/translation/locales/nl/auth.ts","../src/services/translation/locales/nl/events.ts","../src/services/translation/locales/nl/pricing.ts","../src/services/translation/locales/nl/branch.ts","../src/services/translation/locales/et/index.ts","../src/services/translation/locales/et/error.ts","../src/services/translation/locales/et/common.ts","../src/services/translation/locales/et/order.ts","../src/services/translation/locales/et/customer.ts","../src/services/translation/locales/et/auth.ts","../src/services/translation/locales/et/events.ts","../src/services/translation/locales/et/pricing.ts","../src/services/translation/locales/et/branch.ts","../src/services/translation/index.ts","../src/hooks/translation.ts","../src/modules/customer/hooks.ts","../src/modules/customer/models.ts","../src/modules/customer/utils.ts","../src/modules/order/hooks.ts","../src/components/PublicMenu/Modals/Auth/PhoneStep.tsx","../src/components/PublicMenu/Modals/Auth/OTPStep.tsx","../src/components/PublicMenu/Modals/Auth/EmailStep.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/HoursList/HoursList.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/ScrollToTop/ScrollToTop.tsx","../src/components/PublicMenu/Branches/BranchCard/Parent.tsx","../src/components/PublicMenu/Branches/BranchCard/BranchCard.tsx","../src/components/PublicMenu/Branches/Branches.tsx","../src/modules/product/models.ts","../src/modules/addon/models.ts","../src/modules/addon/utils.ts","../src/modules/product/utils.ts","../src/modules/product/hooks.ts","../src/modules/category/utils.ts","../src/constants/analytics.ts","../src/components/PublicMenu/Categories/Categories.tsx","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItemContainer.tsx","../src/components/Quantity/Quantity.tsx","../src/components/PublicMenu/ProductInOrder/ProductInOrder.tsx","../src/components/PublicMenu/ProductVariants/ProductVariants.tsx","../src/components/PublicMenu/ProductAddons/ProductAddons.tsx","../src/components/PublicMenu/ProductDetails/ProductDetailsUI.tsx","../src/components/PublicMenu/ProductDetails/ProductDetails.tsx","../src/components/PublicMenu/OrderStepper/OrderStepper.tsx","../src/components/PublicMenu/FloatingOrdersButton/FloatingOrdersButton.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx","../src/modules/order/services.ts","../src/components/PublicMenu/ProductQuantity/ProductQuantity.tsx","../src/components/PublicMenu/OrderListItem/OptionsInfo/OptionsInfo.tsx","../src/components/PublicMenu/OrderListItem/OrderListItem.tsx","../src/components/PublicMenu/OrderItemsList/OrderNoItems.tsx","../src/components/PublicMenu/OrderItemsList/OrderItemsList.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCart.tsx","../src/components/PublicMenu/Customer/CustomerAddress/NoAddressContent/NoAddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/AddressContent/AddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/CustomerAddress.tsx","../src/modules/table/models.ts","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTableUI.tsx","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTable.tsx","../src/components/PublicMenu/OrderMethods/OrderMethods.tsx","../src/components/PublicMenu/OrderPaymentSummary/OrderPaymentSummary.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerDetails.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCompleted.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawer.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/components/PublicMenu/MenuContent/MenuContent.tsx","../src/modules/category/hooks.ts","../src/modules/menu/utils.ts","../src/components/PublicMenu/PublicMenu.tsx","../src/components/PublicMenu/Modals/AddUpdateNote/AddUpdateNote.tsx","../src/components/PublicMenu/Modals/Auth/Auth.tsx","../src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx","../src/components/PublicMenu/Modals/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/Events/EventsToolbar.tsx","../src/components/Events/Events.tsx","../src/modules/subscription/models.ts","../src/modules/subscription/constants.ts","../src/components/Pricing/PricingPlanAmount.tsx","../src/components/Pricing/Pricing.tsx","../src/components/PublicMenu/OrderFAB/OrderFAB.tsx"],"sourcesContent":["export const MODALS = {\n\tADD_UPDATE_NOTES: \"ADD_UPDATE_NOTES\",\n\tAUTH: \"AUTH\",\n\tADD_UPDATE_ADDRESS: \"ADD_UPDATE_ADDRESS\",\n\tBRANCH_BUSINESS_HOURS: \"BRANCH_BUSINESS_HOURS\",\n\tPRODUCT_DETAILS: \"PRODUCT_DETAILS\",\n};\n\nexport const SUPPORTED_LOCALES = [\"en\", \"az\", \"nl\", \"et\", \"tr\", \"ru\"];\nexport const SUPPORTED_COUNTRIES = [\n\t{\n\t\tname: \"Azerbaijan\",\n\t\tcode: \"AZ\",\n\t\tphoneCode: \"+994\",\n\t},\n];\n\nexport const CO_DOMAIN = \"restaround.co\";\nexport const AZ_DOMAIN = \"restaround.az\";\nexport const EE_DOMAIN = \"restaround.ee\";\nexport const NL_DOMAIN = \"restaround.nl\";\n\nexport const DEFAULT_HOSTNAME = CO_DOMAIN;\n\nexport const DOMAINS = [CO_DOMAIN, AZ_DOMAIN, EE_DOMAIN, NL_DOMAIN]; // Supported domains list\n\nexport const IMAGE_BASE_URL = \"https://images.restaround.co\";\n","import { Storage } from \"@sorocraft/js-utils\";\n\nexport const storage = new Storage(\"restaround_cst_act\", \"restaround_cst_rft\");\n","import { CO_DOMAIN, DOMAINS, IMAGE_BASE_URL } from \"./constants\";\n\ninterface ValidationResult {\n\tisValid: boolean;\n\terror?: string;\n}\n\ntype Validator = (cleanedNumber: string) => ValidationResult;\n\nconst validators: Record<string, Validator> = {\n\t\"994\": (number) => {\n\t\tconst AZERBAIJANI_PREFIXES = [\"50\", \"51\", \"10\", \"55\", \"99\", \"70\", \"77\", \"60\"];\n\t\tconst pattern = new RegExp(`^(${AZERBAIJANI_PREFIXES.join(\"|\")})\\\\d{7}$`);\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: `Azerbaijani numbers must be 9 digits and start with ${AZERBAIJANI_PREFIXES.join(\n\t\t\t\t\t\", \"\n\t\t\t\t)}`,\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n\n\t\"31\": (number) => {\n\t\tconst pattern = /^\\d{9}$/;\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: \"Dutch numbers must be exactly 9 digits\",\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n};\n\nexport function validatePhoneNumber(phoneNumber: string): ValidationResult {\n\tif (!phoneNumber) {\n\t\treturn { isValid: false, error: \"FIELD_REQUIRED\" };\n\t}\n\n\tconst cleaned = phoneNumber.replace(/\\D/g, \"\");\n\n\tconst countryCode = cleaned.startsWith(\"994\") ? \"994\" : cleaned.startsWith(\"31\") ? \"31\" : null;\n\n\tif (!countryCode) {\n\t\treturn { isValid: false, error: \"Unsupported country code\" };\n\t}\n\n\tconst nationalNumber = cleaned.slice(countryCode.length);\n\tconst validator = validators[countryCode];\n\n\treturn validator(nationalNumber);\n}\n\nexport const getBaseUrl = (hostname: string, language: string) => {\n\tconst domain = DOMAINS.includes(hostname) ? hostname : CO_DOMAIN;\n\tconst locale = language || \"en\";\n\treturn { url: `https://${domain}/${locale}`, domain };\n};\n\nexport const getTLD = (language: string) => {\n\treturn language === \"az\" ? \"az\" : \"co\";\n};\n\nexport const getRegisterUrl = (language: string, source: string) => {\n\tconst tld = getTLD(language);\n\n\treturn `https://app.restaround.${tld}/auth/register?lang=${language}&utm_source=${source}`;\n};\n\nexport const getImageSource = (image?: string) => {\n\tif (!image) return \"\";\n\n\tif (image.includes(\"base64\") || image.startsWith(\"https://\")) return image;\n\n\treturn `${IMAGE_BASE_URL}/${image}`;\n};\n\nexport const getLogoImageSource = (logoImage?: string) => {\n\tif (!logoImage) return \"https://images.restaround.co/no-photo-128.webp\";\n\n\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n};\n\nexport const getCoverPhotoSource = (coverPhoto?: string) => {\n\tif (!coverPhoto) return \"https://images.restaround.co/restaround-doodle.webp\";\n\n\tif (coverPhoto.includes(\"base64\") || coverPhoto.startsWith(\"https://\")) return coverPhoto;\n\n\treturn `${IMAGE_BASE_URL}/${coverPhoto}`;\n};\n\nconst keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nconst triplet = (e1: number, e2: number, e3: number) =>\n\tkeyStr.charAt(e1 >> 2) +\n\tkeyStr.charAt(((e1 & 3) << 4) | (e2 >> 4)) +\n\tkeyStr.charAt(((e2 & 15) << 2) | (e3 >> 6)) +\n\tkeyStr.charAt(e3 & 63);\n\nexport const rgbDataURL = (r: number, g: number, b: number) =>\n\t`data:image/gif;base64,R0lGODlhAQABAPAA${\n\t\ttriplet(0, r, g) + triplet(b, 255, 255)\n\t}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`;\n","import { createContext, ReactElement, useContext } from \"react\";\n\nimport { models as menuModels } from \"src/modules/menu\";\n\nconst StoreContext = createContext<menuModels.PublicMenuData>({} as menuModels.PublicMenuData);\n\nexport const StoreProvider = ({\n\tchildren,\n\tvalue,\n}: {\n\tchildren: ReactElement;\n\tvalue: menuModels.PublicMenuData;\n}) => {\n\treturn <StoreContext.Provider value={value}>{children}</StoreContext.Provider>;\n};\n\nexport const useStoreContext = () => useContext(StoreContext);\n","import { useStoreContext } from \"src/store\";\n\nimport { DEFAULT_HOSTNAME } from \"./constants\";\n\nexport const useHostname = (): string => {\n\tconst { hostname } = useStoreContext();\n\n\treturn hostname || DEFAULT_HOSTNAME;\n};\n\nexport const useIsInDashboard = (): boolean => {\n\tconst { isInDashboard } = useStoreContext();\n\n\treturn isInDashboard || false;\n};\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import * as customerModels from \"../customer/models\";\n\nexport enum OrderType {\n\tDINE_IN = \"DINE_IN\",\n\tPICK_UP = \"PICK_UP\",\n\tDELIVERY = \"DELIVERY\",\n}\n\nexport enum OrderStatus {\n\tDRAFT = \"DRAFT\",\n\tPENDING = \"PENDING\",\n\tCONFIRMED = \"CONFIRMED\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tOUT_FOR_DELIVERY = \"OUT_FOR_DELIVERY\",\n\tDELIVERED = \"DELIVERED\",\n\tCOMPLETED = \"COMPLETED\",\n\tCANCELLED = \"CANCELLED\",\n\tFAILED = \"FAILED\",\n}\n\nexport enum OrderItemStatus {\n\tPENDING = \"PENDING\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tSERVED = \"SERVED\",\n}\n\nexport enum PaymentMethod {\n\tCASH = \"CASH\",\n\tCARD = \"CARD\",\n\tWALLET = \"WALLET\",\n\tTERMINAL = \"TERMINAL\",\n}\n\nexport interface OrderAddonOption {\n\toptionId: number;\n\tprice: number;\n}\n\nexport interface OrderAddon {\n\tid?: number;\n\taddonId: number;\n\toptions: OrderAddonOption[];\n}\n\nexport interface SelectedAddons {\n\t[key: number]: number | number[];\n}\n\nexport interface OrderItemVariant {\n\tid?: number;\n\tvariantId: number;\n\tprice: number;\n}\n\nexport interface OrderItem {\n\tid?: number;\n\tproductId: number;\n\torderId?: number;\n\tquantity: number;\n\tprice: number;\n\tvariant?: OrderItemVariant;\n\taddons: OrderAddon[];\n\tnote?: string;\n\tstatus?: OrderItemStatus;\n\tvat?: number;\n\tisPaid?: boolean;\n}\n\nexport interface Order {\n\tid?: number;\n\tbusinessId?: number;\n\tbranchId?: number;\n\tworkingDayId?: number;\n\ttableId?: number;\n\temployeeId?: number;\n\torderType: OrderType;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithTaxAndFees?: number;\n\ttotalPriceWithoutTax: number;\n\ttotalTax: number;\n\titems: OrderItem[];\n\tstatus?: OrderStatus;\n\tvat?: number;\n\tpaymentMethod?: PaymentMethod;\n\tnote?: string;\n\tcreatedAt?: number;\n\tupdatedAt?: number;\n\tcustomer?: customerModels.Customer;\n\tdeliveryFee?: number;\n}\n\nexport interface OrderItems {\n\t[key: string]: OrderItem;\n}\n\nexport enum OrderStep {\n\tCART = \"CART\",\n\tDETAILS = \"DETAILS\",\n\tCOMPLETED = \"COMPLETED\",\n}\n\nexport interface OrderPayload extends Order {\n\tcustomerAddressId: number;\n\tcustomerId: number;\n}\n\nexport type OrderPriceDetails = {\n\ttotalPriceWithTax: number;\n\ttotalPriceWithTaxAndFees: number;\n\ttotalPriceWithoutTax: number;\n\ttotalTax: number;\n};\n\nexport type OrderFormattedPriceDetails = {\n\ttotalPriceWithTax: string;\n\ttotalPriceWithTaxAndFees: string;\n\ttotalPriceWithoutTax: string;\n\ttotalTax: string;\n};\n","import { OrderStep, PaymentMethod } from \"./models\";\n\nexport const initialOrder = {\n\torderType: null,\n\ttotalPriceWithTax: 0,\n\ttotalPriceWithoutTax: 0,\n\ttotalTax: 0,\n\tvat: 0,\n\tpaymentMethod: PaymentMethod.CASH,\n};\n\nexport const ORDER_STEPS = [OrderStep.CART, OrderStep.DETAILS, OrderStep.COMPLETED];\n\nexport enum OrderErrors {\n\tFIELD_REQUIRED_ERROR = \"This field is required\",\n\tTABLE_NOT_SELECTED = \"Please select a table\",\n\tADDRESS_IS_EMPTY = \"Please enter an address\",\n\tEMPTY_ITEMS = \"Please choose product\",\n\tBRANCH_NOT_SELECTED = \"Please select a branch\",\n}\n","import { isEmpty, priceFormatter, sortNumbers } from \"@sorocraft/js-utils\";\nimport { IconType } from \"@sorocraft/ui\";\nimport { Check, BagCheck, Delivery, Chef, FileCheck, HourglassHalf } from \"@sorocraft/ui/icons\";\n\nimport {\n\tOrder,\n\tOrderAddon,\n\tOrderAddonOption,\n\tOrderItem,\n\tOrderStatus,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nimport * as addonModels from \"../addon/models\";\nimport * as branchModels from \"../branch/models\";\nimport { OrderErrors } from \"./constants\";\n\nexport const calculatSingleAddonTotalPrice = (addon: OrderAddon) => {\n\treturn addon.options.reduce((sum, option) => sum + option.price, 0);\n};\n\nexport function calculateTotalAddonPrice(addons: OrderAddon[] = [], quantity: number = 1): number {\n\tconst totalAddonsPriceForSingleItem = addons.reduce((total, addon) => {\n\t\tconst addonTotal = calculatSingleAddonTotalPrice(addon);\n\t\treturn total + addonTotal;\n\t}, 0);\n\n\treturn quantity * totalAddonsPriceForSingleItem;\n}\n\nexport const getOrderPrice = (order: Order, currency: string, language: string) => {\n\tconst calculateItemTotal = (price: number, quantity: number, addons: OrderAddon[]) => {\n\t\treturn quantity * price + calculateTotalAddonPrice(addons, quantity);\n\t};\n\n\tlet totalWithoutTax = 0;\n\tlet totalTax = 0;\n\n\tfor (const item of order.items) {\n\t\tconst itemTotal = calculateItemTotal(item.price, item.quantity, item.addons);\n\t\ttotalWithoutTax += itemTotal;\n\n\t\tif (order.vat === undefined && item.vat) {\n\t\t\ttotalTax += (itemTotal * item.vat) / 100;\n\t\t}\n\t}\n\n\tif (order.vat !== undefined) {\n\t\ttotalTax = (totalWithoutTax * order.vat) / 100;\n\t}\n\n\tconst totalWithTax = totalWithoutTax + totalTax;\n\n\treturn {\n\t\ttotalWithoutTax,\n\t\ttotalWithoutTaxFormatted: priceFormatter(totalWithoutTax, currency, language),\n\t\ttotalTax,\n\t\ttotalTaxFormatted: priceFormatter(totalTax, currency, language),\n\t\ttotalWithTax,\n\t\ttotalWithTaxFormatted: priceFormatter(totalWithTax, currency, language),\n\t};\n};\n\nexport const generateOrderItemsId = (\n\tproductId: number,\n\tvariantId: number | null,\n\tselectedAddons?: SelectedAddons\n): string => {\n\tif (!productId) throw new Error(\"Product ID is required\");\n\n\t// Build the order items ID base with productId and variantId\n\tlet orderItemsId = `${productId}`;\n\tif (variantId) {\n\t\torderItemsId += `-${variantId}`;\n\t}\n\n\t// Build the addon part of the ID\n\tconst addonIdsPart = Object.entries(selectedAddons || {})\n\t\t.map(([addonId, option]) => {\n\t\t\tif (!addonId || !option) return null; // Skip invalid entries\n\t\t\tconst optionIds = Array.isArray(option)\n\t\t\t\t? sortNumbers(option).filter(Boolean).join(\"-\")\n\t\t\t\t: `${option}`;\n\t\t\tif (!optionIds) return null;\n\t\t\treturn `${addonId}-${optionIds}`;\n\t\t})\n\t\t.filter(Boolean) // Remove null/undefined values\n\t\t.join(\"-\");\n\n\t// Append addonIdsPart if it's not empty\n\tif (addonIdsPart) {\n\t\torderItemsId += `-${addonIdsPart}`;\n\t}\n\n\treturn orderItemsId;\n};\n\nexport const getOrderItemPrice = (orderItem: OrderItem) => {\n\tconst { price, variant, addons, quantity, vat } = orderItem || {};\n\tconst basePrice = variant?.price ?? price;\n\tconst addonsPrice = calculateTotalAddonPrice(addons, 1); // single item's addon price\n\n\tconst itemNetPrice = basePrice + addonsPrice;\n\t// Currently VAT is applied only on basePrice, not on addons\n\t// TODO: Re-evaluate for European market where tax may apply to addons too\n\tconst itemTax = basePrice * (vat / 100);\n\tconst itemGrossPrice = itemNetPrice + itemTax;\n\n\tconst totalNet = itemNetPrice * quantity;\n\tconst totalTax = itemTax * quantity;\n\tconst totalGross = itemGrossPrice * quantity;\n\n\treturn {\n\t\ttotalGross,\n\t\ttotalNet,\n\t\ttotalTax,\n\t\titemGrossPrice,\n\t\titemNetPrice,\n\t\titemTax,\n\t};\n};\n\nexport const getSelectedAddonsFromOrderItems = (item: OrderItem): SelectedAddons => {\n\tconst selectedAddons: SelectedAddons = {};\n\n\tfor (const { addonId, options = [] } of item.addons || []) {\n\t\tconst optionIds = options.map(({ optionId }) => optionId);\n\t\tselectedAddons[addonId] = optionIds.length === 1 ? optionIds[0] : optionIds;\n\t}\n\n\treturn selectedAddons;\n};\n\nexport const getStatusIcon = (status: OrderStatus): IconType => {\n\tswitch (status) {\n\t\tcase OrderStatus.COMPLETED:\n\t\t\treturn Check;\n\t\tcase OrderStatus.DELIVERED:\n\t\t\treturn BagCheck;\n\t\tcase OrderStatus.OUT_FOR_DELIVERY:\n\t\t\treturn Delivery;\n\t\tcase OrderStatus.PREPARING:\n\t\t\treturn Chef;\n\t\tcase OrderStatus.CONFIRMED:\n\t\t\treturn FileCheck;\n\t\tcase OrderStatus.PENDING:\n\t\t\treturn HourglassHalf;\n\n\t\tdefault:\n\t\t\treturn HourglassHalf;\n\t}\n};\n\nexport const buildSelectedAddonsPayload = (\n\tproductAddons: addonModels.MenuAddon[] = [],\n\tselectedAddons: SelectedAddons = {}\n): OrderAddon[] => {\n\treturn Object.entries(selectedAddons).map(([addonIdStr, selected]) => {\n\t\tconst addonId = Number(addonIdStr);\n\t\tconst selectedOptionIds = Array.isArray(selected) ? selected : [selected];\n\n\t\tconst addon = productAddons.find((addon) => addon.id === addonId);\n\t\tif (isEmpty(addon)) {\n\t\t\treturn {\n\t\t\t\taddonId,\n\t\t\t\toptions: [],\n\t\t\t};\n\t\t}\n\n\t\tconst options: OrderAddonOption[] = (addon.options || [])\n\t\t\t.filter((option) => selectedOptionIds.includes(option.id))\n\t\t\t.map((option) => ({\n\t\t\t\toptionId: option.id,\n\t\t\t\tprice: option.price,\n\t\t\t}));\n\n\t\treturn {\n\t\t\taddonId,\n\t\t\toptions,\n\t\t};\n\t});\n};\n\nexport const getDefaultOrderType = (\n\tsettings: branchModels.BranchSettings,\n\tisOpen: boolean,\n\tisDelivering: boolean\n): OrderType | null => {\n\tif (!settings) return null;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\tif (deliveryOrderEnabled && isDelivering) {\n\t\treturn OrderType.DELIVERY;\n\t}\n\n\tif (dineInOrderEnabled && isOpen) {\n\t\treturn OrderType.DINE_IN;\n\t}\n\n\tif (pickupOrderEnabled && isOpen) {\n\t\treturn OrderType.PICK_UP;\n\t}\n\n\treturn null;\n};\n\nexport const getOrderErrorMessages = (field: keyof Order) => {\n\tswitch (field) {\n\t\tcase \"customer\":\n\t\t\treturn OrderErrors.ADDRESS_IS_EMPTY;\n\n\t\tcase \"tableId\":\n\t\t\treturn OrderErrors.TABLE_NOT_SELECTED;\n\n\t\tcase \"items\":\n\t\t\treturn OrderErrors.EMPTY_ITEMS;\n\n\t\tcase \"branchId\":\n\t\t\treturn OrderErrors.BRANCH_NOT_SELECTED;\n\n\t\tdefault:\n\t\t\treturn OrderErrors.FIELD_REQUIRED_ERROR;\n\t}\n};\n","export const BASE_API_URL = \"https://api.restaround.co/api/v1\";\n","import { BASE_API_URL } from \"src/constants/env\";\nimport { storage } from \"src/modules/view/services\";\n\nconst request = async (method: \"POST\" | \"PATCH\" | \"GET\", endpoint: string, body?: any) => {\n\tconst { accessToken } = storage.getAuthToken();\n\tconst url = `${BASE_API_URL}/${endpoint}`;\n\n\tconst response = await fetch(url, {\n\t\tmethod,\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\tAuthorization: accessToken,\n\t\t},\n\t\tcredentials: \"include\",\n\t\tbody: JSON.stringify(body),\n\t});\n\n\tconst data = await response.json();\n\n\tif (!response.ok) {\n\t\tthrow data;\n\t}\n\n\treturn data;\n};\n\nexport const API = {\n\tpost: (endpoint: string, body: any) => request(\"POST\", endpoint, body),\n\tpatch: (endpoint: string, body: any) => request(\"PATCH\", endpoint, body),\n\tget: (endpoint: string) => request(\"GET\", endpoint),\n};\n","import { API } from \"src/services/api\";\nimport * as viewModels from \"../view/models\";\n\nimport { AuthResponse, Customer, CustomerUpdatePayload } from \"./models\";\n\nexport const getCustomer = async (): Promise<Customer> => {\n\treturn API.get(\"customer\");\n};\n\nexport const loginCustomer = async (phoneNumber: string): Promise<{ status: number }> => {\n\treturn API.post(\"customer\", { phoneNumber });\n};\n\nexport const verifyOTP = async (otp: string, phoneNumber: string): Promise<AuthResponse> => {\n\treturn API.post(\"otp/verify\", { otp, phoneNumber });\n};\n\nexport const update = async (payload: CustomerUpdatePayload) => {\n\treturn API.patch(\"customer\", payload);\n};\n\nexport const getCustomerDistance = async (\n\tbranchCoordinates: viewModels.Coordinates,\n\tcustomerCoordinates: viewModels.Coordinates\n) => {\n\t// eslint-disable-next-line no-undef\n\tconst { spherical } = (await google.maps.importLibrary(\n\t\t\"geometry\"\n\t\t// eslint-disable-next-line no-undef\n\t)) as google.maps.GeometryLibrary;\n\t// eslint-disable-next-line no-undef\n\tconst coordinate1 = new google.maps.LatLng(\n\t\tbranchCoordinates.latitude,\n\t\tbranchCoordinates.longitude\n\t);\n\t// eslint-disable-next-line no-undef\n\tconst coordinate2 = new google.maps.LatLng(\n\t\tcustomerCoordinates.latitude,\n\t\tcustomerCoordinates.longitude\n\t);\n\n\tconst distanceInMeters = spherical.computeDistanceBetween(coordinate1, coordinate2);\n\n\treturn distanceInMeters;\n};\n","import { trackEvent } from \"@sorocraft/js-utils\";\n\nimport { BASE_API_URL } from \"src/constants/env\";\n\nexport const logException = async (error: any = null, errorInfo = {}) => {\n\ttry {\n\t\ttrackEvent(\"error\", { message: error?.message });\n\t\treturn await fetch(`${BASE_API_URL}/log`, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t\tcredentials: \"include\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tmessage: error?.message || JSON.stringify(error),\n\t\t\t\t...errorInfo,\n\t\t\t}),\n\t\t});\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t}\n};\n","import { Branch, BranchWorkDays } from \"src/models\";\n\nexport const getVenueName = (\n\tbusinessName: string,\n\thasSingleBranch: boolean,\n\tselectedBranch?: Branch\n): string => {\n\tif (hasSingleBranch) {\n\t\treturn businessName;\n\t}\n\n\tif (selectedBranch?.name) {\n\t\treturn `${businessName} ${selectedBranch.name}`;\n\t}\n\n\treturn businessName;\n};\n\nexport function normalizeRootPath(rootPath: string): string {\n\treturn rootPath.endsWith(\"/\") ? rootPath.slice(0, -1) : rootPath;\n}\n\nexport const getHoursForDay = (schedule: BranchWorkDays, weekDayIndex: number) => {\n\treturn (schedule?.days || []).find(({ day }: any) => day === weekDayIndex)?.hours;\n};\n\nexport const splitHours = (hours: string): number[] => {\n\treturn (hours || \"\").split(\":\").map(Number);\n};\n\nexport const isWithinTimeRange = (timeRange?: { openAt: string; closeAt: string }): boolean => {\n\tif (!timeRange) return false;\n\n\tconst now = new Date();\n\tconst [openH, openM] = splitHours(timeRange.openAt);\n\tconst [closeH, closeM] = splitHours(timeRange.closeAt);\n\n\tconst start = new Date(now);\n\tstart.setHours(openH, openM, 0, 0);\n\n\tconst end = new Date(now);\n\tend.setHours(closeH, closeM, 0, 0);\n\n\t// If the end time is earlier than the start, it means it passes midnight\n\tif (end <= start) {\n\t\t// If now is before end, assume it's the next day\n\t\tif (now < end) {\n\t\t\tstart.setDate(start.getDate() - 1);\n\t\t} else {\n\t\t\tend.setDate(end.getDate() + 1);\n\t\t}\n\t}\n\n\treturn now >= start && now <= end;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useMemo } from \"react\";\n\nimport { useStoreContext } from \"src/store\";\n\nimport * as viewModels from \"../view/models\";\nimport { getHoursForDay, isWithinTimeRange } from \"./utils\";\nimport { Branch, BranchServes, BranchSettings } from \"./models\";\n\nexport const useHasSingleBranch = (): boolean => {\n\tconst { branches } = useStoreContext();\n\n\treturn (branches || []).length <= 1;\n};\n\nexport const useSelectedBranch = (): Branch => {\n\tconst { branches, branchId } = useStoreContext();\n\tconst hasSingleBranch = useHasSingleBranch();\n\n\tif (isEmpty(branches)) return {} as Branch;\n\n\tif (hasSingleBranch) {\n\t\treturn branches[0];\n\t}\n\n\treturn branches.find((item) => item.id === Number(branchId)) || ({} as Branch);\n};\n\nexport const useBranchCoordinates = (): viewModels.Coordinates => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn { latitude: selectedBranch?.latitude, longitude: selectedBranch?.longitude };\n};\n\nexport const useBranchAddress = (): string => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn selectedBranch.address || \"\";\n};\n\nexport const useBranchServes = (): BranchServes => {\n\tconst selectedBranch = useSelectedBranch();\n\tconst { openingHours, deliveryHours } = selectedBranch || {};\n\n\tif (!openingHours?.days || !deliveryHours?.days) {\n\t\treturn { isOpen: false, isDelivering: false };\n\t}\n\n\tconst now = new Date();\n\tconst weekDayIndex = (now.getUTCDay() + 6) % 7; // Mon - 0, Tue - 1, ...\n\n\tconst openHours = getHoursForDay(openingHours, weekDayIndex);\n\tconst deliveryHoursToday = getHoursForDay(deliveryHours, weekDayIndex);\n\n\treturn {\n\t\tisOpen: isWithinTimeRange(openHours),\n\t\tisDelivering: isWithinTimeRange(deliveryHoursToday),\n\t};\n};\n\nexport const useBranchSettings = (): BranchSettings => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn selectedBranch?.settings || ({} as BranchSettings);\n};\n\nexport const useMaxDeliveryDistance = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.maxDeliveryDistance;\n};\n\nexport const useMinDeliveryAmount = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.minDeliveryAmount;\n};\n\nexport const useOrderEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\tif (isEmpty(settings)) return false;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\treturn deliveryOrderEnabled || dineInOrderEnabled || pickupOrderEnabled;\n};\n\nexport const useIsDeliveryEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\treturn settings?.deliveryOrderEnabled;\n};\n\nexport const useVenueName = () => {\n\tconst { business } = useStoreContext();\n\tconst selectedBranch = useSelectedBranch();\n\tconst hasSingleBranch = useHasSingleBranch();\n\tconst businessName = business?.name || \"Restaround\";\n\n\tif (hasSingleBranch) return businessName;\n\n\tif (selectedBranch?.name) {\n\t\treturn `${businessName} ${selectedBranch.name}`;\n\t}\n\n\treturn businessName;\n};\n\nexport const useBranchId = (): number | undefined => {\n\tconst { branchId } = useStoreContext();\n\n\treturn branchId;\n};\n\nexport const useNormalizedRootPath = (): string => {\n\tconst store = useStoreContext();\n\tconst rootPath = store.rootPath || \"\";\n\n\treturn useMemo(() => (rootPath?.endsWith?.(\"/\") ? rootPath.slice(0, -1) : rootPath), [rootPath]);\n};\n\nexport const useList = (): Branch[] => {\n\tconst { branches } = useStoreContext();\n\n\treturn branches || [];\n};\n\nexport const useOnBranchSelect = (): ((branchId: number) => void) => {\n\tconst { onBranchSelect } = useStoreContext();\n\n\treturn onBranchSelect;\n};\n","// THIS CAN'T BE IMPERTED BY OTHER MODULES\n\nimport * as orderModels from \"src/modules/order/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as tableHooks from \"src/modules/table/hooks\";\n\nexport const useInitialOrder = ({\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId = undefined,\n}: {\n\tdefaultOrderType: orderModels.OrderType;\n\tdefaultPaymentMethod: orderModels.PaymentMethod;\n\tdefaultBranchId: number;\n}): Partial<orderModels.Order> => {\n\tconst tableId = tableHooks.usePreDefinedTableId();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst branchSettings = branchHooks.useBranchSettings();\n\n\tconst orderType =\n\t\tdefaultOrderType || orderUtils.getDefaultOrderType(branchSettings, isOpen, isDelivering);\n\n\treturn {\n\t\tbranchId: defaultBranchId,\n\t\torderType,\n\t\ttableId: tableId ? Number(tableId) : undefined,\n\t\ttotalPriceWithTax: 0,\n\t\ttotalPriceWithoutTax: 0,\n\t\ttotalTax: 0,\n\t\tvat: 0,\n\t\tpaymentMethod: defaultPaymentMethod || orderModels.PaymentMethod.CASH,\n\t};\n};\n","import { useStoreContext } from \"src/store\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { Table } from \"./models\";\n\nexport const useList = (): Table[] => {\n\tconst { tables } = useStoreContext();\n\n\treturn tables;\n};\n\nexport const usePreDefinedTable = (): Table => {\n\tconst { tableId, tables } = useStoreContext();\n\n\tif (!tableId || isEmpty(tables)) return {} as Table;\n\n\treturn tables.find((table) => Number(table.id) === Number(tableId)) || ({} as Table);\n};\n\nexport const usePreDefinedTableId = (): string => {\n\tconst { tableId } = useStoreContext();\n\n\treturn tableId;\n};\n","import {\n\tcreateContext,\n\tDispatch,\n\tReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tSetStateAction,\n} from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { FormErrors } from \"@sorocraft/ui\";\n\nimport * as productModels from \"src/modules/product/models\";\nimport * as orderModels from \"src/modules/order/models\";\nimport * as customerModels from \"src/modules/customer/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderConstants from \"src/modules/order/constants\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as commonServices from \"src/modules/common/services\";\nimport * as viewServices from \"src/modules/view/services\";\nimport * as storeHooks from \"src/modules/store/hooks\";\n\ntype UpdateOrderItemsParams = {\n\tproduct: productModels.Product;\n\tquantity?: number;\n\tvariantId?: number | null;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tnote?: string;\n};\n\ntype OrderContent = {\n\torder: Partial<orderModels.Order>;\n\torderStep: orderModels.OrderStep;\n\torderItems: orderModels.OrderItems;\n\tisOrderOpen: boolean;\n\tcustomer: customerModels.Customer;\n\ttrackingId: string;\n\terrors?: FormErrors;\n\tsetOrderStep: Dispatch<SetStateAction<orderModels.OrderStep>>;\n\tupdateOrder: (updatedFields: Partial<orderModels.Order>) => void;\n\taddProduct: (params: UpdateOrderItemsParams) => void;\n\tupdateProduct: (params: UpdateOrderItemsParams) => void;\n\tremoveAllProductVariants: (productId: number) => void;\n\tsetIsOrderOpen: Dispatch<SetStateAction<boolean>>;\n\tgetCustomer: () => void;\n\tresetOrder: (force?: boolean, shouldClose?: boolean) => void;\n\tsetTrackingId: Dispatch<SetStateAction<string>>;\n\tupdateOrderErrors: (field: keyof orderModels.Order) => void;\n\tresetErrors: () => void;\n};\n\ntype OrderProviderProps = {\n\tchildren: ReactNode;\n\tdefaultOrderType?: orderModels.OrderType;\n\tdefaultPaymentMethod?: orderModels.PaymentMethod;\n\tdefaultBranchId?: number;\n\tisOrderDefaultOpen?: boolean;\n};\n\nconst OrderContext = createContext<OrderContent>({\n\torder: orderConstants.initialOrder,\n\torderStep: orderModels.OrderStep.CART,\n\torderItems: {},\n\tisOrderOpen: false,\n\tcustomer: {} as customerModels.Customer,\n\ttrackingId: \"\",\n\terrors: {},\n\tupdateOrder: () => {},\n\tsetOrderStep: () => {},\n\taddProduct: () => {},\n\tupdateProduct: () => {},\n\tremoveAllProductVariants: () => {},\n\tsetIsOrderOpen: () => {},\n\tgetCustomer: () => {},\n\tresetOrder: () => {},\n\tsetTrackingId: () => {},\n\tupdateOrderErrors: () => {},\n\tresetErrors: () => {},\n} satisfies OrderContent);\n\nexport const OrderProvider = ({\n\tchildren,\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId,\n\tisOrderDefaultOpen = false,\n}: OrderProviderProps) => {\n\tconst initialOrder = storeHooks.useInitialOrder({\n\t\tdefaultOrderType,\n\t\tdefaultPaymentMethod,\n\t\tdefaultBranchId,\n\t});\n\tconst [customer, setCustomer] = useState<customerModels.Customer>({} as customerModels.Customer);\n\tconst [order, setOrder] = useState<Partial<orderModels.Order>>(initialOrder);\n\tconst [orderStep, setOrderStep] = useState<orderModels.OrderStep>(orderModels.OrderStep.CART);\n\tconst [orderItems, setOrderItems] = useState<orderModels.OrderItems>({});\n\tconst [isOrderOpen, setIsOrderOpen] = useState<boolean>(isOrderDefaultOpen);\n\tconst [trackingId, setTrackingId] = useState<string>(\"\");\n\tconst [errors, setErrors] = useState<FormErrors>({});\n\n\tconst updateOrder = useCallback(\n\t\t(updatedFields: Partial<orderModels.Order>) => {\n\t\t\tsetOrder((currentOrder) => ({\n\t\t\t\t...currentOrder,\n\t\t\t\t...updatedFields,\n\t\t\t}));\n\n\t\t\t// Clear proper errors\n\t\t\t[\"branchId\", \"tableId\"].forEach((field) => {\n\t\t\t\tif (updatedFields[field] && errors?.[field]) {\n\t\t\t\t\tsetErrors((currentErrors) => ({ ...currentErrors, [field]: null }));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t[errors]\n\t);\n\n\tconst updateOrderItems = useCallback(\n\t\t({\n\t\t\tproduct,\n\t\t\tquantity,\n\t\t\tvariantId,\n\t\t\tselectedAddons,\n\t\t\tnote,\n\t\t\tisAddOperation,\n\t\t}: UpdateOrderItemsParams & { isAddOperation: boolean }) => {\n\t\t\tif (isEmpty(product) || quantity < 0) return;\n\n\t\t\tconst { id: productId, vat = 0, variants, addons, price } = product;\n\t\t\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\n\t\t\tsetOrderItems((currentOrderItems) => {\n\t\t\t\tconst existingItem = currentOrderItems[orderItemsId];\n\t\t\t\tconst newQuantity = isAddOperation ? (existingItem?.quantity || 0) + quantity : quantity;\n\n\t\t\t\t// Remove item if quantity is zero\n\t\t\t\tif (newQuantity <= 0) {\n\t\t\t\t\tconst { [orderItemsId]: _, ...remainingOrderItems } = currentOrderItems;\n\t\t\t\t\treturn remainingOrderItems;\n\t\t\t\t}\n\n\t\t\t\tconst selectedVariant = variants.find(({ id }) => id === variantId);\n\t\t\t\tconst selectedAddonsPayload: orderModels.OrderAddon[] =\n\t\t\t\t\torderUtils.buildSelectedAddonsPayload(addons, selectedAddons);\n\n\t\t\t\t// Update or add item\n\t\t\t\treturn {\n\t\t\t\t\t...currentOrderItems,\n\t\t\t\t\t[orderItemsId]: {\n\t\t\t\t\t\tproductId,\n\t\t\t\t\t\tquantity: newQuantity,\n\t\t\t\t\t\tprice,\n\t\t\t\t\t\tnote,\n\t\t\t\t\t\tvat,\n\t\t\t\t\t\t...(!isEmpty(selectedVariant) && {\n\t\t\t\t\t\t\tvariant: { variantId: selectedVariant.id, price: selectedVariant.price },\n\t\t\t\t\t\t}),\n\t\t\t\t\t\taddons: selectedAddonsPayload,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tif (isAddOperation && errors?.items) {\n\t\t\t\tsetErrors((currentErrors) => ({ ...currentErrors, items: null }));\n\t\t\t}\n\t\t},\n\t\t[errors?.items]\n\t);\n\n\tconst addProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: true,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems]\n\t);\n\n\tconst updateProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: false,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems]\n\t);\n\n\tconst removeAllProductVariants = useCallback(\n\t\t(productId: number) => {\n\t\t\tif (!productId || isEmpty(orderItems)) return;\n\n\t\t\t// Filter out order items that do not belong to the given productId\n\t\t\tconst updatedOrderItems = Object.entries(orderItems).reduce(\n\t\t\t\t(acc, [orderItemsId, orderItem]) => {\n\t\t\t\t\tif (orderItem.productId !== productId) {\n\t\t\t\t\t\tacc[orderItemsId] = orderItem;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t{} as orderModels.OrderItems\n\t\t\t);\n\n\t\t\t// Update the order items with the remaining items\n\t\t\tsetOrderItems(updatedOrderItems);\n\t\t},\n\t\t[orderItems]\n\t);\n\n\tconst getCustomer = useCallback(async () => {\n\t\ttry {\n\t\t\tconst { accessToken } = viewServices.storage.getAuthToken();\n\t\t\tif (!accessToken) return;\n\n\t\t\tconst response = await customerServices.getCustomer();\n\n\t\t\tif (!response?.id) {\n\t\t\t\tthrow new Error(\"SOMETHING_WENT_WRONG\");\n\t\t\t}\n\n\t\t\tsetCustomer(response);\n\t\t} catch (error) {\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/store/order.tsx\",\n\t\t\t\tmethod: \"getCustomer\",\n\t\t\t});\n\t\t}\n\t}, []);\n\n\tconst resetOrder = useCallback(\n\t\t(force: boolean = false, shouldClose = true) => {\n\t\t\tif (shouldClose) setIsOrderOpen(false);\n\n\t\t\t// clear order if it flow is completed\n\t\t\tif (orderStep === orderModels.OrderStep.COMPLETED || force) {\n\t\t\t\tsetOrder(initialOrder);\n\t\t\t\tsetOrderItems({});\n\t\t\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t\t\t\tsetTrackingId(\"\");\n\t\t\t}\n\t\t},\n\t\t[initialOrder, orderStep]\n\t);\n\n\tconst updateOrderErrors = useCallback((field: keyof orderModels.Order) => {\n\t\tsetErrors((currentErrors) => ({\n\t\t\t...currentErrors,\n\t\t\t[field]: orderUtils.getOrderErrorMessages(field),\n\t\t}));\n\t}, []);\n\n\tconst resetErrors = useCallback(() => {\n\t\tsetErrors({});\n\t}, []);\n\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\tsetOrderStep,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tsetIsOrderOpen,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t}),\n\t\t[\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t]\n\t);\n\n\treturn <OrderContext.Provider value={contextValue}>{children}</OrderContext.Provider>;\n};\n\nexport const useOrderContext = () => useContext(OrderContext);\n","export type BranchWorkHour = {\n\topenAt: string;\n\tcloseAt: string;\n};\n\nexport type BranchWorkDay = {\n\tday: number;\n\thours: BranchWorkHour | null;\n};\n\nexport type BranchWorkDays = {\n\tdays: BranchWorkDay[];\n};\n\nexport interface BranchSettings {\n\tdeliveryOrderEnabled: boolean;\n\tpickupOrderEnabled: boolean;\n\tdineInOrderEnabled: boolean;\n\tmaxDeliveryDistance: number;\n\tminDeliveryAmount: number;\n\tdeliveryFeeAmount: number;\n}\n\nexport enum BranchSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n\tDELIVERY_FEE_AMOUNT = \"deliveryFeeAmount\",\n}\n\nexport interface Branch {\n\tid: number;\n\tname: string;\n\tbusinessId: number;\n\taddress: string;\n\tlongitude?: number;\n\tlatitude?: number;\n\tphone?: string;\n\twhatsApp?: string;\n\ttelegram?: string;\n\twifiPassword?: string;\n\tcreatedAt?: number;\n\tcoverPhoto?: string;\n\tsettings?: BranchSettings;\n\topeningHours?: BranchWorkDays;\n\tdeliveryHours?: BranchWorkDays;\n}\n\nexport type BranchServes = {\n\tisOpen: boolean;\n\tisDelivering: boolean;\n};\n","import * as featureModels from \"../feature/models\";\nimport * as subscriptionModels from \"../subscription/models\";\n\nexport interface BusinessLanguage {\n\tid: number;\n\tcode: string;\n\tbusinessId: number;\n}\n\nexport enum BusinessSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n}\n\nexport interface Business {\n\tid: number;\n\tname: string;\n\tusername: string;\n\tavatar64?: string;\n\tavatar128?: string;\n\tavatar256?: string;\n\tcoverPhoto?: string;\n\tinstagram?: string;\n\tfacebook?: string;\n\ttiktok?: string;\n\tcreatedAt?: number;\n\tcurrency: string;\n\tlanguages: BusinessLanguage[];\n\tsubscriptions?: subscriptionModels.Subscription[];\n\tsegment?: featureModels.FeatureSegment;\n}\n","export const DEFAULT_LANGUAGE = \"en\";\nexport const DEFAULT_CURRENCY = \"AZN\";\n","import { useStoreContext } from \"src/store\";\n\nimport { Business, BusinessLanguage } from \"./models\";\nimport { DEFAULT_CURRENCY, DEFAULT_LANGUAGE } from \"./constants\";\n\nexport const useBusiness = (): Business => {\n\tconst { business } = useStoreContext();\n\n\treturn business || ({} as Business);\n};\n\nexport const useCurrency = () => {\n\tconst { currency } = useBusiness();\n\n\treturn currency || DEFAULT_CURRENCY;\n};\n\nexport const useBusinessId = (): number => {\n\tconst { id } = useBusiness();\n\n\treturn id;\n};\n\nexport const useBusinessUsername = (): string => {\n\tconst { username } = useBusiness();\n\n\treturn username || \"\";\n};\n\nexport const useLanguages = (): BusinessLanguage[] => {\n\tconst business = useBusiness();\n\n\treturn business.languages || [];\n};\n\nexport const useLanguage = (): string => {\n\tconst { language } = useStoreContext();\n\n\treturn language || DEFAULT_LANGUAGE;\n};\n\nexport const useOnLanguageSelect = (): ((code: string) => void) => {\n\tconst { onLanguageSelect } = useStoreContext();\n\n\treturn onLanguageSelect;\n};\n\nexport const useBusinessSegment = () => {\n\tconst { segment } = useBusiness();\n\n\treturn segment;\n};\n","import { useState } from \"react\";\nimport { classNames, Row } from \"@sorocraft/ui\";\n\nimport styles from \"./Languages.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nconst Languages = () => {\n\tconst [isOptionsOpen, setIsOptionsOpen] = useState(false);\n\tconst languages = businessHooks.useLanguages();\n\tconst language = businessHooks.useLanguage();\n\tconst onLanguageSelect = businessHooks.useOnLanguageSelect();\n\n\tconst isBilingual = languages.length > 1;\n\tconst otherLanguages = languages.filter(({ code }) => code !== language) || [];\n\n\tconst getFlag = (code: string) => {\n\t\treturn `https://images.restaround.co/languages/${code}.svg`;\n\t};\n\n\tif (!isBilingual) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={() => setIsOptionsOpen(!isOptionsOpen)}>\n\t\t\t<Row alignItems=\"center\" gap={0}>\n\t\t\t\t<Row\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\toptions: true,\n\t\t\t\t\t\tisOpen: isOptionsOpen,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{otherLanguages.map(({ code }) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={getFlag(code)}\n\t\t\t\t\t\t\tclassName={styles.option}\n\t\t\t\t\t\t\tkey={code}\n\t\t\t\t\t\t\tonClick={() => onLanguageSelect?.(code)}\n\t\t\t\t\t\t\talt={code}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<img src={getFlag(language)} alt={language || \"\"} className={styles.currentLanguage} />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default Languages;\n","import { Column, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./BusinessHeader.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport Languages from \"../Languages\";\n\nconst BusinessHeader = () => {\n\tconst { coverPhoto, avatar256, name } = businessHooks.useBusiness();\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img\n\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\talt={name}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<Column\n\t\t\t\t\tfullWidth\n\t\t\t\t\tfullHeight\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tjustifyContent=\"center\"\n\t\t\t\t\tgap={0.5}\n\t\t\t\t\tclassName={styles.container}\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={viewUtils.getLogoImageSource(avatar256)}\n\t\t\t\t\t\talt={name}\n\t\t\t\t\t\tclassName={styles.logo}\n\t\t\t\t\t\twidth={96}\n\t\t\t\t\t\theight={96}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t\t<Text variant=\"h1\" color=\"white\" className={styles.name} align=\"center\">\n\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</div>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t</div>\n\t);\n};\nexport default BusinessHeader;\n","import { IconTheme, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { ChevronLeft } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BackIcon.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\n\ninterface Props {\n\tonClick?: () => void;\n\tsize?: SIZE;\n\ttheme?: IconTheme;\n}\n\nconst BackIcon = ({ onClick, size, theme }: Props) => {\n\tconst language = businessHooks.useLanguage();\n\tconst username = businessHooks.useBusinessUsername();\n\n\tconst handleGoBack = () => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tif (!username) return window.history?.back?.();\n\n\t\twindow.location.pathname = `/${language}/${username}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={onClick || handleGoBack}>\n\t\t\t<SVGIcon icon={ChevronLeft} size={size} theme={theme} />\n\t\t</div>\n\t);\n};\nexport default BackIcon;\n","import { IconLink, Row, SVGIcon, Tooltip, useModalContext } from \"@sorocraft/ui\";\nimport {\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n\tClock,\n} from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./HeaderLinks.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { constants as viewConstants } from \"src/modules/view\";\n\nconst HeaderLinks = () => {\n\tconst { setModal } = useModalContext();\n\tconst { phone, wifiPassword, whatsApp, telegram, openingHours, deliveryHours } =\n\t\tbranchHooks.useSelectedBranch();\n\tconst { instagram, tiktok, facebook } = businessHooks.useBusiness();\n\n\tconst isBusinessHoursAvailable = !isEmpty(openingHours?.days) || !isEmpty(deliveryHours?.days);\n\n\tconst openBusinessHours = () => {\n\t\tsetModal({\n\t\t\tid: viewConstants.MODALS.BRANCH_BUSINESS_HOURS,\n\t\t\tparams: { openingHours, deliveryHours },\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.links}>\n\t\t\t\t<Row gap={2} alignItems=\"center\">\n\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t{!!phone && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!whatsApp && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsApp}`}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!instagram && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!telegram && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!tiktok && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!facebook && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!wifiPassword && (\n\t\t\t\t\t\t\t<Tooltip hint={wifiPassword}>\n\t\t\t\t\t\t\t\t<div className={styles.wifiPassword}>\n\t\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{isBusinessHoursAvailable && (\n\t\t\t\t\t\t\t<div className={styles.businessHours} onClick={openBusinessHours}>\n\t\t\t\t\t\t\t\t<SVGIcon icon={Clock} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Row>\n\t\t\t\t</Row>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default HeaderLinks;\n","import { Column, Flex, Row, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchHeader.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport BackIcon from \"src/components/BackIcon\";\nimport Languages from \"../Languages\";\nimport HeaderLinks from \"./HeaderLinks\";\n\nconst BranchHeader = () => {\n\tconst { coverPhoto, avatar256 } = businessHooks.useBusiness();\n\tconst venueName = branchHooks.useVenueName();\n\tconst address = branchHooks.useBranchAddress();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\tconst { latitude, longitude } = branchHooks.useBranchCoordinates();\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img\n\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\talt={venueName}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<Column\n\t\t\t\t\tjustifyContent={hasSingleBranch ? \"flex-end\" : \"space-between\"}\n\t\t\t\t\tfullHeight\n\t\t\t\t\tfullWidth\n\t\t\t\t\tgap={0}\n\t\t\t\t>\n\t\t\t\t\t{!hasSingleBranch && <BackIcon size=\"lg\" theme=\"dark-theme\" />}\n\t\t\t\t\t<Flex direction=\"row\" gap={1} alignItems=\"center\" fullWidth>\n\t\t\t\t\t\t<Flex.Item>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tsrc={viewUtils.getLogoImageSource(avatar256)}\n\t\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\t\tclassName={styles.logo}\n\t\t\t\t\t\t\t\twidth={96}\n\t\t\t\t\t\t\t\theight={96}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t<Flex.Item shrink className={styles.info}>\n\t\t\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tclassName={styles.name}\n\t\t\t\t\t\t\t\t\tvariant=\"h1\"\n\t\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t\t\t\t\tweight=\"bold\"\n\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{venueName}\n\t\t\t\t\t\t\t\t</Text>\n\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t\t\t<span className={styles.addressText}>{address}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t</Flex>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t\t<HeaderLinks />\n\t\t</div>\n\t);\n};\nexport default BranchHeader;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport BusinessHeader from \"./BusinessHeader\";\nimport BranchHeader from \"./BranchHeader\";\n\nconst Header = () => {\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\n\tif (hasSingleBranch || !isEmpty(selectedBranch)) return <BranchHeader />;\n\n\treturn <BusinessHeader />;\n};\nexport default Header;\n","import az from \"./az\";\nimport en from \"./en\";\nimport ru from \"./ru\";\nimport tr from \"./tr\";\nimport nl from \"./nl\";\nimport et from \"./et\";\n\nexport default {\n\taz,\n\ten,\n\tru,\n\ttr,\n\tnl,\n\tet,\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Xəta baş verdi! Zəhmət olmazsa, yenidən cəhd edin.\",\n\tFIELD_REQUIRED: \"Bu xananı doldurmaq mütləqdir\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azərbaycan nömrələri 9 rəqəmli olur və 50, 51, 10, 55, 99, 70, 77 və ya 60 ilə başlamalıdır\",\n\t\"Unsupported country code\": \"Ölkə kodu düzgün deyil\",\n\t\"Invalid OTP\": \"Təsdiq kodu düzgün deyil\",\n\tINVALID_OTP: \"Təsdiq kodu düzgün deyil\",\n\tOTP_RATE_LIMIT_EXCEEDED:\n\t\t\"Təsdiq kodu göndərmək üçün limiti keçmisiniz. Biraz sonra, yenidən yoxlayın\",\n\t\"Invalid Email Address\": \"Email ünvanı düzgün deyil\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu funksiya mövcud tarif planınıza daxil deyil.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sifariş növü aktiv deyil\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Bu sifariş növü indi aktiv deyil\",\n\tCOUNTRY_REQUIRED: \"Ölkə daxil edilməlidir.\",\n\tCITY_REQUIRED: \"Şəhər daxil edilməlidir.\",\n\tSTREET_REQUIRED: \"Küçə adı daxil edilməlidir.\",\n\tSTREET_NUMBER_REQUIRED: \"Ev nömrəsi daxil edilməlidir.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu filial sizin ünvana çatdırılma etmir.\",\n\tNO_ORDER_TYPE: \"Zəhmət olmazsa, sifariş növünü seçin.\",\n};\n","export default {\n\tSave: \"Yadda saxla\",\n\tCancel: \"Ləğv et\",\n\tContinue: \"Davam et\",\n};\n","export default {\n\t\"View order\": \"Şifarişi göstər\",\n\t\"Remove from order\": \"Sifarişdən sil\",\n\t\"Update order\": \"Sifarişi yenilə\",\n\t\"Add to order\": \"Sifarişə əlavə et\",\n\tAdd: \"Əlavə et\",\n\t\"Your order\": \"Sifarişiniz\",\n\tSubtotal: \"Ümumi\",\n\t\"Empty order\": \"Boş sifariş\",\n\t\"You don't have any items in your order\": \"Sifarişinizdə heç bir məhsul yoxdur\",\n\t\"Add items\": \"Məhsul əlavə et\",\n\t\"Add an order note\": \"Restoran üçün qeyd\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Hər hansısa allergiyanız, xüsusi istəkləriniz və ya əlavə etmək, çıxarmaq istədiyiniz inqrediyentlər varsa, qeyd edin.\",\n\t\"Your Order is Completed!\": \"Sifarişiniz tamamlandı!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Təşəkkür edirik! Sifarişinizi qəbul etdik, qısa zamanda çatdırılacaq.\",\n\tDelivery: \"Çatdırılma\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al-apar\",\n\tCash: \"Nağd\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Sifarişdəki məhsullar\",\n\tItems: \"Məhsullar\",\n\tTax: \"Vergi\",\n\tTotal: \"Cəm\",\n\t\"Special instructions, allergies, etc.\": \"Xüsusi istəklər, allergiya və s.\",\n\t\"Go to checkout\": \"Ödənişə keç\",\n\t\"Place order\": \"Sifariş et\",\n\tContinue: \"Davam et\",\n\t\"Not available\": \"Mövcud deyil\",\n\t\"In order\": \"Sifarişdə\",\n\t\"Product choices\": \"Seçimlər\",\n\t\"Track order\": \"Sifarişi izlə\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Çatdırılma üçün sifarişiniz minimum {{amount}} olmalıdır\",\n\t\"This field is required\": \"Bu xana mütləq doldurulmalıdır\",\n\t\"Please select a table\": \"Zəhmət olmazsa, masanı seçin\",\n\t\"Please enter an address\": \"Zəhmət olmazsa, ünvanı daxil edin\",\n\t\"Please choose product\": \"Zəhmət olmazsa, məhsul seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masanı seçin\",\n\tCard: \"Kart ilə\",\n\t\"Closed Now\": \"Hazırda bağlıdır\",\n\t\"Delivery Fee\": \"Çatdırılma\",\n};\n","export default {\n\t\"Unknown address\": \"Ünvan əlavə edilməyib\",\n\t\"No address available\": \"Ünvan əlavə edilməyib\",\n\t\"Update Delivery Address\": \"Çatdırılma ünvanını dəyişin\",\n\tCountry: \"Ölkə\",\n\tCity: \"Şəhər\",\n\t\"Baker Street\": \"Nizami küçəsi\",\n\tAddress: \"Ünvan\",\n\t\"House number\": \"Ev nömrəsi\",\n\t\"Additional number\": \"Mənzil\",\n\t\"Example: Door code is 555\": \"Nümunə: Qapı kodu 555\",\n\t\"Delivery Instructions\": \"Kuryer üçün təlimatlar\",\n\tAzerbaijan: \"Azərbaycan\",\n\tFloor: \"Mərtəbə\",\n\t\"Enter address\": \"Ünvanı daxil edin\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesab yarat və ya daxil ol\",\n\t\"Phone number\": \"Mobil nömrə\",\n\t\"I don't have an email\": \"Email ünvanım yoxdur\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} üçün təsdiq kodunu göndərdik\",\n};\n","export default {\n\tEvents: \"Hərəkətlər\",\n\t\"Scrolled to Category\": \"Kateqoriyaya sürüşdürdü\",\n\t\"Category Selected\": \"Kateqoriya seçildi\",\n\t\"Product Details\": \"Məhsul detalına baxıldı\",\n\t\"Product Added to Order\": \"Sifarişə əlavə edildi\",\n};\n","export default {\n\t\"Get Started\": \"İndi başla\",\n\t\"Choose Plan\": \"Planı seçin\",\n\t\"Smart QR Menu\": \"Ağıllı QR Menyu\",\n\t\"Link-in-bio\": \"Bio üçün link\",\n\t\"Menu Analytics\": \"Menyu analitikası\",\n\t\"Unlimited Products\": \"Limitsiz məhsul\",\n\t\"Unlimited Categories\": \"Limitsiz kateqoriya\",\n\t\"Product variants\": \"Məhsul variantları\",\n\t\"Product options\": \"Məhsul əlavələri\",\n\t\"Sales reports\": \"Satış hesabatı\",\n\t\"24/7 Support\": \"24/7 dəstək\",\n\t\"Multiple Branches\": \"Şöbələr\",\n\t\"Order Management\": \"Sifarişlərin idarə edilməsi\",\n\t\"Table Management\": \"Masaların idarə edilməsi\",\n\t\"Mobile App for Owners & Staff\": \"Rəhbərlik və ofisiantlar üçün Mobil tətbiq\",\n\t\"Point of Sale (POS)\": \"POS-kassa\",\n\t\"Delivery Management\": \"Çatdırılmaların idarə edilməsi\",\n\t\"Third-Party Delivery Integrations\": \"Çatdırılma partnyorlarının inteqrasiyası\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay ilə ödəniş\",\n\t\"Event management\": \"Tədbirlərin idarəsi\",\n\t\"Unlimited Users\": \"Limitsiz istifadəçi\",\n\t\"/ month\": \"/ Ay\",\n\tmonthly: \"Aylıq plan\",\n\tannually: \"İllik plan\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Hər biznesə uyğun tariflər - Sadə qiymətlər, daha çox dəyər!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Biznesinizə uyğun tarif planını seçin. Aylıq və ya illik abunə olun, uzunmüddətli planlarla daha çox qazanın!\",\n\tAppetizer: \"Lite\",\n\t\"Main Course\": \"Plus\",\n\t\"Unlimited Languages\": \"Limitsiz dil seçimi\",\n\t\"30-day money-back guarantee\": \"30 gün ərzində narazı qalsanız, ödəniş geri qaytarılır.\",\n\t\"Limited Time Only\": \"Məhdud müddətə\",\n\t\"/ lifetime\": \"/ birdəfəlik\",\n\t\"Try for free\": \"Pulsuz yoxla\",\n\t\"No credit card needed\": \"Kart tələb olunmur\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Bazar ertəsi\",\n\t\"WEEKDAY-1\": \"Çərşənbə axşamı\",\n\t\"WEEKDAY-2\": \"Çərşənbə\",\n\t\"WEEKDAY-3\": \"Cümə axşamı\",\n\t\"WEEKDAY-4\": \"Cümə\",\n\t\"WEEKDAY-5\": \"Şənbə\",\n\t\"WEEKDAY-6\": \"Bazar\",\n\tClosed: \"Bağlıdır\",\n\t\"Opening Hours\": \"İş saatları\",\n\t\"Delivery Hours\": \"Çatdırılma saatları\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Something went wrong! Please try again later\",\n\tFIELD_REQUIRED: \"This field is required\",\n\tINVALID_OTP: \"Invalid OTP\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP limit has exceeded. Please try again later\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"This feature is not available for your current plan.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"This order type is not available for this business.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"This order type is not available right now.\",\n\tCOUNTRY_REQUIRED: \"Country is required.\",\n\tCITY_REQUIRED: \"City is required.\",\n\tSTREET_REQUIRED: \"Street is required.\",\n\tSTREET_NUMBER_REQUIRED: \"Street number is required.\",\n\tOUT_OF_DELIVERY_RANGE: \"This branch doesn't deliver to your address.\",\n\tNO_ORDER_TYPE: \"Please select an order type.\",\n};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {\n\t\"WEEKDAY-0\": \"Monday\",\n\t\"WEEKDAY-1\": \"Tuesday\",\n\t\"WEEKDAY-2\": \"Wednesday\",\n\t\"WEEKDAY-3\": \"Thursday\",\n\t\"WEEKDAY-4\": \"Friday\",\n\t\"WEEKDAY-5\": \"Saturday\",\n\t\"WEEKDAY-6\": \"Sunday\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Что-то пошло не так! Пожалуйста, попробуйте позже\",\n\tFIELD_REQUIRED: \"Это поле обязательно для заполнения\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Азербайджанские номера должны содержать 9 цифр и начинаться с 50, 51, 10, 55, 99, 70, 77 или 60\",\n\t\"Unsupported country code\": \"Неподдерживаемый код страны\",\n\t\"Invalid OTP\": \"Неверный код подтверждения\",\n\tINVALID_OTP: \"Неверный код подтверждения\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Превышен лимит кодов. Попробуйте позже\",\n\t\"Invalid Email Address\": \"Неверный адрес электронной почты\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Эта функция недоступна в вашем текущем тарифе.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Этот тип заказа недоступен для этого заведения.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Этот тип заказа сейчас недоступен.\",\n\tCOUNTRY_REQUIRED: \"Страна обязательна.\",\n\tCITY_REQUIRED: \"Город обязателен.\",\n\tSTREET_REQUIRED: \"Улица обязательна.\",\n\tSTREET_NUMBER_REQUIRED: \"Номер дома обязателен.\",\n\tOUT_OF_DELIVERY_RANGE: \"Этот филиал не доставляет по вашему адресу.\",\n\tNO_ORDER_TYPE: \"Пожалуйста, выберите тип заказа.\",\n};\n","export default {\n\tSave: \"Сохранить\",\n\tCancel: \"Отменить\",\n\tContinue: \"Продолжить\",\n};\n","export default {\n\t\"View order\": \"Посмотреть заказ\",\n\t\"Remove from order\": \"Удалить из заказа\",\n\t\"Update order\": \"Обновить заказ\",\n\t\"Add to order\": \"Добавить в заказ\",\n\tAdd: \"Добавить\",\n\t\"Your order\": \"Ваш заказ\",\n\t\"Empty order\": \"Пустой заказ\",\n\t\"You don't have any items in your order\": \"В вашем заказе нет продуктов\",\n\t\"Add items\": \"Добавить продукты\",\n\tSubtotal: \"Итого\",\n\tEvents: \"События\",\n\t\"Product choices\": \"Варианты продукта\",\n\t\"In order\": \"В заказе\",\n\t\"Not available\": \"Не доступен\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Укажите, если у вас есть аллергия, особые пожелания или ингредиенты, которые вы хотите добавить или убрать.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Спасибо! Мы получили ваш заказ и скоро доставим его.\",\n\t\"Go to checkout\": \"Перейти к оплате\",\n\t\"Add an order note\": \"Добавить примечание к заказу\",\n\t\"Your Order is Completed!\": \"Ваш заказ завершен!\",\n\tDelivery: \"Доставка\",\n\t\"Dine in\": \"На месте\",\n\tPickup: \"Самовывоз\",\n\tCash: \"Наличные\",\n\t\"POS Terminal\": \"POS-терминал\",\n\t\"Order summary\": \"Обзор заказа\",\n\tItems: \"Продукты\",\n\tTax: \"Налог\",\n\tTotal: \"Итого\",\n\t\"Special instructions, allergies, etc.\": \"Особые инструкции, аллергии и т.д.\",\n\t\"Place order\": \"Оформить заказ\",\n\tContinue: \"Продолжить\",\n\t\"Track order\": \"Отследить заказ\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Минимальная сумма заказа для доставки — {{amount}}\",\n\t\"This field is required\": \"Это поле обязательно для заполнения\",\n\t\"Please select a table\": \"Пожалуйста, выберите столик\",\n\t\"Please enter an address\": \"Пожалуйста, введите адрес\",\n\t\"Please choose product\": \"Пожалуйста, выберите продукт\",\n\tTable: \"Стол\",\n\t\"Select Table\": \"Выбрать столик\",\n\tCard: \"Картой\",\n\t\"Closed Now\": \"Сейчас закрыто\",\n\t\"Delivery Fee\": \"Доставка\",\n};\n","export default {\n\t\"Unknown address\": \"Неизвестный адрес\",\n\t\"No address available\": \"Адрес не доступен\",\n\t\"Update Delivery Address\": \"Обновить адрес доставки\",\n\tCountry: \"Страна\",\n\tCity: \"Город\",\n\t\"Baker Street\": \"Улица Низами\",\n\tAddress: \"Адрес\",\n\t\"House number\": \"Номер дома\",\n\t\"Additional number\": \"Квартира\",\n\t\"Example: Door code is 555\": \"Пример: Код двери 555\",\n\t\"Delivery Instructions\": \"Инструкции по доставке\",\n\tAzerbaijan: \"Азербайджан\",\n\tFloor: \"Этаж\",\n\t\"Enter address\": \"Введите адрес\",\n};\n","export default {\n\t\"Create an account or log in\": \"Создайте аккаунт или войдите\",\n\t\"Phone number\": \"Номер телефона\",\n\t\"I don't have an email\": \"У меня нет электронной почты\",\n\t\"We sent a confirmation code to {{address}}\": \"Мы отправили код подтверждения на {{address}}\",\n};\n","export default {\n\tEvents: \"События\",\n\t\"Scrolled to Category\": \"Прокрутил до категории\",\n\t\"Category Selected\": \"Категория выбрана\",\n\t\"Product Details\": \"Детали продукта\",\n\t\"Product Added to Order\": \"Продукт добавлен в заказ\",\n};\n","export default {\n\t\"Get Started\": \"Начать\",\n\t\"Choose Plan\": \"Выберите план\",\n\t\"Smart QR Menu\": \"Умное меню по QR-коду\",\n\t\"Link-in-bio\": \"Ссылка в био\",\n\t\"Menu Analytics\": \"Аналитика меню\",\n\t\"Unlimited Users\": \"Неограниченные пользователи\",\n\t\"Unlimited Products\": \"Неограниченные продукты\",\n\t\"Unlimited Categories\": \"Неограниченные категории\",\n\t\"Product variants\": \"Варианты продуктов\",\n\t\"Product options\": \"Дополнения к продукту\",\n\t\"Sales reports\": \"Отчеты о продажах\",\n\t\"24/7 Support\": \"24/7 техническая поддержка\",\n\t\"Multiple Branches\": \"Многочисленные филиалы\",\n\t\"Table Management\": \"Управление столами\",\n\t\"Order Management\": \"Управление заказами\",\n\t\"Mobile App for Owners & Staff\": \"Мобильное приложение для владельцев и персонала\",\n\t\"Point of Sale (POS)\": \"POS-касса\",\n\t\"Delivery Management\": \"Управление доставкой\",\n\t\"Third-Party Delivery Integrations\": \"Интеграция со сторонними поставщиками\",\n\t\"RestaroundPay with Mobile\": \"«RestaroundPay» с мобильного\",\n\t\"Event management\": \"Управление мероприятиями\",\n\t\"/ month\": \"/ месяц\",\n\tmonthly: \"Ежемесячный план\",\n\tannually: \"Годовой план\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Тарифы для любого бизнеса - Простой прайс, больше возможностей!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Выберите тарифный план, который подходит вашему бизнесу. Подписывайтесь помесячно или ежегодно и экономьте больше с долгосрочными планами!\",\n\t\"Unlimited Languages\": \"Неограниченное количество языков\",\n\t\"30-day money-back guarantee\": \"Гарантия возврата денег в течение 30 дней\",\n\t\"Limited Time Only\": \"Только ограниченное время\",\n\t\"/ lifetime\": \"/ разово\",\n\t\"Try for free\": \"Попробуйте бесплатно\",\n\t\"No credit card needed\": \"Кредитная карта не требуется\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Понедельник\",\n\t\"WEEKDAY-1\": \"Вторник\",\n\t\"WEEKDAY-2\": \"Среда\",\n\t\"WEEKDAY-3\": \"Четверг\",\n\t\"WEEKDAY-4\": \"Пятница\",\n\t\"WEEKDAY-5\": \"Суббота\",\n\t\"WEEKDAY-6\": \"Воскресенье\",\n\tClosed: \"Закрыто\",\n\t\"Opening Hours\": \"Часы работы\",\n\t\"Delivery Hours\": \"Время доставки\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Bir şeyler yanlış gitti! Lütfen daha sonra tekrar deneyin\",\n\tFIELD_REQUIRED: \"Bu alan zorunludur\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azerbaycan numaraları 9 haneli olmalı ve 50, 51, 10, 55, 99, 70, 77 veya 60 ile başlamalıdır\",\n\t\"Unsupported country code\": \"Desteklenmeyen ülke kodu\",\n\t\"Invalid OTP\": \"Geçersiz doğrulama kodu\",\n\tINVALID_OTP: \"Geçersiz doğrulama kodu\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP sınırı aşıldı. Lütfen daha sonra tekrar deneyin\",\n\t\"Invalid Email Address\": \"Geçersiz e-posta adresi\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu özellik mevcut planınızda yer almıyor.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sipariş türü bu işletmede aktif değil.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Bu sipariş türü şu anda aktif değil.\",\n\tCOUNTRY_REQUIRED: \"Ülke zorunludur.\",\n\tCITY_REQUIRED: \"Şehir zorunludur.\",\n\tSTREET_REQUIRED: \"Sokak adı zorunludur.\",\n\tSTREET_NUMBER_REQUIRED: \"Bina numarası zorunludur.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu şube sizin adrese teslimat yapmıyor.\",\n\tNO_ORDER_TYPE: \"Lütfen bir sipariş türü seçin.\",\n};\n","export default {\n\tSave: \"Kaydet\",\n\tCancel: \"İptal et\",\n\tContinue: \"Devam et\",\n};\n","export default {\n\t\"View order\": \"Siparişi Görüntüle\",\n\t\"Remove from order\": \"Siparişten Kaldır\",\n\t\"Update order\": \"Siparişi Güncelle\",\n\t\"Add to order\": \"Siparişe Ekle\",\n\tAdd: \"Ekle\",\n\t\"Your order\": \"Siparişiniz\",\n\t\"Empty order\": \"Boş sipariş\",\n\t\"You don't have any items in your order\": \"Siparişinizde hiç bir ürün yok\",\n\t\"Add items\": \"Ürün ekle\",\n\tSubtotal: \"Toplam\",\n\tEvents: \"Olaylar\",\n\t\"Product choices\": \"Seçenekler\",\n\t\"In order\": \"Siparişte\",\n\t\"Not available\": \"Mevcut değil\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Herhangi bir alerjiniz, özel isteğiniz ya da eklemek veya çıkarmak istediğiniz malzemeler varsa belirtin.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Teşekkürler! Siparişinizi aldık, kısa süre içinde teslim edilecek.\",\n\t\"Go to checkout\": \"Ödemeye geç\",\n\t\"Add an order note\": \"Sipariş notu ekle\",\n\t\"Your Order is Completed!\": \"Siparişiniz tamamlandı!\",\n\tDelivery: \"Teslimat\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al götür\",\n\tCash: \"Nakit\",\n\t\"POS Terminal\": \"POS Terminali\",\n\t\"Order summary\": \"Sipariş özeti\",\n\tItems: \"Ürünler\",\n\tTax: \"Vergi\",\n\tTotal: \"Toplam\",\n\t\"Special instructions, allergies, etc.\": \"Özel talimatlar, alerjiler vb.\",\n\t\"Place order\": \"Sipariş ver\",\n\tContinue: \"Devam et\",\n\t\"Track order\": \"Siparişi takip et\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Teslimat için minimum sipariş tutarı {{amount}} olmalı\",\n\t\"This field is required\": \"Bu alan zorunludur\",\n\t\"Please select a table\": \"Lütfen bir masa seçin\",\n\t\"Please enter an address\": \"Lütfen bir adres girin\",\n\t\"Please choose product\": \"Lütfen bir ürün seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masa seçin\",\n\tCard: \"Kart ile\",\n\t\"Closed Now\": \"Şu anda kapalı\",\n\t\"Delivery Fee\": \"Teslimat ücreti\",\n};\n","export default {\n\t\"Unknown address\": \"Bilinmeyen adres\",\n\t\"No address available\": \"Adres mevcut değil\",\n\t\"Update Delivery Address\": \"Teslimat adresini güncelle\",\n\tCountry: \"Ülke\",\n\tCity: \"Şehir\",\n\t\"Baker Street\": \"Istiklal Caddesi\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Ev numarası\",\n\t\"Additional number\": \"Daire numarası\",\n\t\"Example: Door code is 555\": \"Örnek: Kapı kodu 555\",\n\t\"Delivery Instructions\": \"Teslimat talimatları\",\n\tAzerbaijan: \"Azerbaycan\",\n\tFloor: \"Kat\",\n\t\"Enter address\": \"Adres girin\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesap oluştur veya giriş yap\",\n\t\"Phone number\": \"Telefon numarası\",\n\t\"I don't have an email\": \"E-posta adresim yok\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} için doğrulama kodu gönderdik\",\n};\n","export default {\n\tEvents: \"Etkinlikler\",\n\t\"Scrolled to Category\": \"Kategoriye kaydırıldı\",\n\t\"Category Selected\": \"Kategori seçildi\",\n\t\"Product Details\": \"Ürün Detayları\",\n\t\"Product Added to Order\": \"Ürün siparişe eklendi\",\n};\n","export default {\n\t\"Get Started\": \"Hemen Başla\",\n\t\"Choose Plan\": \"Planı seçin\",\n\t\"Smart QR Menu\": \"Akıllı QR Menü\",\n\t\"Link-in-bio\": \"Bio için link\",\n\t\"Menu Analytics\": \"Menü Analitiği\",\n\t\"Unlimited Users\": \"Sınırsız kullanıcı\",\n\t\"Unlimited Products\": \"Sınırsız ürün\",\n\t\"Unlimited Categories\": \"Sınırsız kategori\",\n\t\"Product variants\": \"Ürün çeşitleri\",\n\t\"Product options\": \"Ürün seçenekleri\",\n\t\"Sales reports\": \"Satış raporu\",\n\t\"24/7 Support\": \"24/7 Teknik Destek\",\n\t\"Multiple Branches\": \"Şube Yönetimi\",\n\t\"Table Management\": \"Masa Yönetimi\",\n\t\"Order Management\": \"Sipariş Yönetimi\",\n\t\"Mobile App for Owners & Staff\": \"Patron ve Personel için Mobil Uygulama\",\n\t\"Point of Sale (POS)\": \"POS Adisyon Sistemi\",\n\t\"Delivery Management\": \"Paket sipariş yönetimi\",\n\t\"Third-Party Delivery Integrations\": \"Üçüncü Parti Teslimat Entegrasyonları\",\n\t\"RestaroundPay with Mobile\": \"Mobil ile RestaroundPay\",\n\t\"Event management\": \"Etkinlik yönetimi\",\n\t\"/ month\": \"/ Ay\",\n\tmonthly: \"Aylık\",\n\tannually: \"Yıllık\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"İşletmenize uygun abonelik planını seçin. Aylık veya yıllık abone olun, uzun vadeli planlarla daha fazla tasarruf edin!\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Her işletmeye uygun esnek planlar - Basit fiyatlandırma, daha fazla avantaj!\",\n\t\"Unlimited Languages\": \"Sınırsız dil seçeneği\",\n\t\"30-day money-back guarantee\": \"30 gün içinde memnun kalmazsanız, paranız iade.\",\n\t\"Limited Time Only\": \"Sınırlı süreyle\",\n\t\"/ lifetime\": \"/ tek seferlik\",\n\t\"Try for free\": \"Ücretsiz dene\",\n\t\"No credit card needed\": \"Kredi kartı gerekmez\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Pazartesi\",\n\t\"WEEKDAY-1\": \"Salı\",\n\t\"WEEKDAY-2\": \"Çarşamba\",\n\t\"WEEKDAY-3\": \"Perşembe\",\n\t\"WEEKDAY-4\": \"Cuma\",\n\t\"WEEKDAY-5\": \"Cumartesi\",\n\t\"WEEKDAY-6\": \"Pazar\",\n\tClosed: \"Kapalı\",\n\t\"Opening Hours\": \"Çalışma saatleri\",\n\t\"Delivery Hours\": \"Teslimat saatleri\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Er is iets misgegaan! Probeer het later opnieuw\",\n\tFIELD_REQUIRED: \"Dit veld is verplicht\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azerbeidzjaanse nummers moeten 9 cijfers bevatten en beginnen met 50, 51, 10, 55, 99, 70, 77 of 60\",\n\t\"Unsupported country code\": \"Niet-ondersteunde landcode\",\n\t\"Invalid OTP\": \"Ongeldige verificatiecode\",\n\tINVALID_OTP: \"Ongeldige verificatiecode\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Te veel pogingen. Probeer het later opnieuw\",\n\t\"Invalid Email Address\": \"Ongeldig e-mailadres\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Deze functie is niet beschikbaar in je huidige pakket.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Dit type bestelling is niet beschikbaar bij dit bedrijf.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Dit besteltype is op dit moment niet beschikbaar.\",\n\tCOUNTRY_REQUIRED: \"Land is verplicht.\",\n\tCITY_REQUIRED: \"Stad is verplicht.\",\n\tSTREET_REQUIRED: \"Straat is verplicht.\",\n\tSTREET_NUMBER_REQUIRED: \"Huisnummer is verplicht.\",\n\tOUT_OF_DELIVERY_RANGE: \"Deze vestiging bezorgt niet op jouw adres.\",\n\tNO_ORDER_TYPE: \"Selecteer een besteltype.\",\n};\n","export default {\n\tSave: \"Opslaan\",\n\tCancel: \"Annuleren\",\n\tContinue: \"Doorgaan\",\n};\n","export default {\n\t\"View order\": \"Bestelling bekijken\",\n\t\"Remove from order\": \"Uit bestelling verwijderen\",\n\t\"Update order\": \"Bestelling bijwerken\",\n\t\"Add to order\": \"Aan bestelling toevoegen\",\n\tAdd: \"Toevoegen\",\n\t\"Your order\": \"Uw bestelling\",\n\t\"Empty order\": \"Lege bestelling\",\n\t\"You don't have any items in your order\": \"U heeft geen items in uw bestelling\",\n\t\"Add items\": \"Items toevoegen\",\n\tSubtotal: \"Totaal\",\n\tEvents: \"Gebeurtenissen\",\n\t\"Product choices\": \"Productkeuzes\",\n\t\"In order\": \"In bestelling\",\n\t\"Not available\": \"Niet beschikbaar\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Geef eventuele allergieën, speciale wensen of ingrediënten die je wilt toevoegen of weglaten aan.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Bedankt! We hebben je bestelling ontvangen en bezorgen het zo snel mogelijk.\",\n\t\"Go to checkout\": \"Ga naar afrekenen\",\n\t\"Add an order note\": \"Voeg een bestelopmerking toe\",\n\t\"Your Order is Completed!\": \"Je bestelling is voltooid!\",\n\tDelivery: \"Levering\",\n\t\"Dine in\": \"Ter plaatse\",\n\tPickup: \"Meenemen\",\n\tCash: \"Contant\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Bestellingsoverzicht\",\n\tItems: \"Items\",\n\tTax: \"Belasting\",\n\tTotal: \"Totaal\",\n\t\"Special instructions, allergies, etc.\": \"Speciale instructies, allergieën, enz.\",\n\t\"Place order\": \"Plaats bestelling\",\n\tContinue: \"Doorgaan\",\n\t\"Track order\": \"Volg je bestelling\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimale bestelbedrag voor bezorging is {{amount}}\",\n\t\"This field is required\": \"Dit veld is verplicht\",\n\t\"Please select a table\": \"Selecteer alstublieft een tafel\",\n\t\"Please enter an address\": \"Vul alstublieft een adres in\",\n\t\"Please choose product\": \"Kies alstublieft een product\",\n\tTable: \"Tafel\",\n\t\"Select Table\": \"Kies tafel\",\n\tCard: \"Met je Betaalpas\",\n\t\"Closed Now\": \"Nu gesloten\",\n\t\"Delivery Fee\": \"Bezorgkosten\",\n};\n","export default {\n\t\"Unknown address\": \"Onbekend adres\",\n\t\"No address available\": \"Geen adres beschikbaar\",\n\t\"Update Delivery Address\": \"Werk het afleveradres bij\",\n\tCountry: \"Land\",\n\tCity: \"Stad\",\n\t\"Baker Street\": \"Dam straat\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Huisnummer\",\n\t\"Additional number\": \"Appartementnummer\",\n\t\"Example: Door code is 555\": \"Voorbeeld: Deurcode is 555\",\n\t\"Delivery Instructions\": \"Leveringsinstructies\",\n\tAzerbaijan: \"Azerbeidzjan\",\n\tFloor: \"Verdieping\",\n\t\"Enter address\": \"Voer adres in\",\n};\n","export default {\n\t\"Create an account or log in\": \"Maak een account aan of log in\",\n\t\"Phone number\": \"Telefoonnummer\",\n\t\"I don't have an email\": \"Ik heb geen e-mailadres\",\n\t\"We sent a confirmation code to {{address}}\":\n\t\t\"We hebben een bevestigingscode gestuurd naar {{address}}\",\n};\n","export default {\n\tEvents: \"Gebeurtenissen\",\n\t\"Scrolled to Category\": \"Gescrld naar categorie\",\n\t\"Category Selected\": \"Categorie geselecteerd\",\n\t\"Product Details\": \"Productdetails\",\n\t\"Product Added to Order\": \"Product aan bestelling toegevoegd\",\n};\n","export default {\n\t\"Get Started\": \"Start nu\",\n\t\"Choose Plan\": \"Kies een plan\",\n\t\"Smart QR Menu\": \"Slimme QR-menu\",\n\t\"Link-in-bio\": \"Link-in-bio\",\n\t\"Menu Analytics\": \"Menu analyse\",\n\t\"Unlimited Products\": \"Onbeperkte producten\",\n\t\"Unlimited Categories\": \"Onbeperkte categorieën\",\n\t\"Unlimited Users\": \"Onbeperkte gebruikers\",\n\t\"Product variants\": \"Productvarianten\",\n\t\"Product options\": \"Productopties\",\n\t\"Sales reports\": \"Verkooprapporten\",\n\t\"24/7 Support\": \"24/7 ondersteuning\",\n\t\"Multiple Branches\": \"Meerdere vestigingen\",\n\t\"Table Management\": \"Tafelbeheer\",\n\t\"Order Management\": \"Orderbeheer\",\n\t\"Mobile App for Owners & Staff\": \"Mobiele app voor eigenaren en personeel\",\n\t\"Point of Sale (POS)\": \"Kassasysteem (POS)\",\n\t\"Delivery Management\": \"Leveringsbeheer\",\n\t\"Third-Party Delivery Integrations\": \"Integraties van derden\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay met mobiel\",\n\t\"Event management\": \"Beheer van evenementen\",\n\t\"/ month\": \"/ maand\",\n\tmonthly: \"Maandelijks\",\n\tannually: \"Jaarlijks\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Kies een abonnementsplan dat bij jouw bedrijf past. Abonneer je maandelijks of jaarlijks en bespaar meer met een lange termijn plan!\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Flexibele abonnementen voor elk bedrijf - Eenvoudige prijzen, meer waarde!\",\n\t\"Unlimited Languages\": \"Onbeperkt aantal talen\",\n\t\"30-day money-back guarantee\": \"30 dagen niet-goed-geld-terug garantie\",\n\t\"Limited Time Only\": \"Beperkte tijd\",\n\t\"/ lifetime\": \"/ eenmalig\",\n\t\"Try for free\": \"Probeer gratis\",\n\t\"No credit card needed\": \"Geen creditcard nodig\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Maandag\",\n\t\"WEEKDAY-1\": \"Dinsdag\",\n\t\"WEEKDAY-2\": \"Woensdag\",\n\t\"WEEKDAY-3\": \"Donderdag\",\n\t\"WEEKDAY-4\": \"Vrijdag\",\n\t\"WEEKDAY-5\": \"Zaterdag\",\n\t\"WEEKDAY-6\": \"Zondag\",\n\tClosed: \"Gesloten\",\n\t\"Opening Hours\": \"Openingstijden\",\n\t\"Delivery Hours\": \"Bezorgtijden\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Midagi läks valesti! Palun proovi hiljem uuesti\",\n\tFIELD_REQUIRED: \"See väli on kohustuslik\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Aserbaidžaani numbrid peavad olema 9-kohalised ja algama 50, 51, 10, 55, 99, 70, 77 või 60-ga\",\n\t\"Unsupported country code\": \"Riigikood ei ole toetatud\",\n\t\"Invalid OTP\": \"Vale kinnituskood\",\n\tINVALID_OTP: \"Vale kinnituskood\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Kinnituskoodide limiit ületatud. Proovi hiljem uuesti\",\n\t\"Invalid Email Address\": \"Vigane e-posti aadress\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"See funktsioon ei ole sinu praeguse paketiga saadaval.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"See tellimuse tüüp ei ole selles ettevõttes saadaval.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"See tellimuse tüüp ei ole praegu saadaval.\",\n\tCOUNTRY_REQUIRED: \"Riik on kohustuslik.\",\n\tCITY_REQUIRED: \"Linn on kohustuslik.\",\n\tSTREET_REQUIRED: \"Tänav on kohustuslik.\",\n\tSTREET_NUMBER_REQUIRED: \"Maja number on kohustuslik.\",\n\tOUT_OF_DELIVERY_RANGE: \"See filiaal ei toimeta sellele aadressile.\",\n\tNO_ORDER_TYPE: \"Palun vali tellimuse tüüp.\",\n};\n","export default {\n\tSave: \"Salvesta\",\n\tCancel: \"Tühista\",\n\tContinue: \"Jätka\",\n};\n","export default {\n\t\"View order\": \"Vaata tellimust\",\n\t\"Remove from order\": \"Eemalda tellimusest\",\n\t\"Update order\": \"Uuenda tellimust\",\n\t\"Add to order\": \"Lisa tellimusele\",\n\tAdd: \"Lisa\",\n\t\"Your order\": \"Teie tellimus\",\n\t\"Empty order\": \"Tühi tellimus\",\n\t\"You don't have any items in your order\": \"Teie tellimuses pole ühtegi eset\",\n\t\"Add items\": \"Lisa esemeid\",\n\tSubtotal: \"Kokku\",\n\tEvents: \"Sündmused\",\n\t\"Product choices\": \"Tootevalikud\",\n\t\"In order\": \"Tellimuses\",\n\t\"Not available\": \"Ei ole saadaval\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Kui sul on allergiaid, erisoove või soovid mõnda koostisosa lisada või eemaldada, anna sellest teada.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Aitäh! Oleme sinu tellimuse kätte saanud ja toome selle peagi kohale.\",\n\t\"Go to checkout\": \"Mine kassasse\",\n\t\"Add an order note\": \"Lisa tellimuse märkus\",\n\t\"Your Order is Completed!\": \"Teie tellimus on lõpetatud!\",\n\tDelivery: \"Kohaletoimetamine\",\n\t\"Dine in\": \"Sööma jäämine\",\n\tPickup: \"Eemaldamine\",\n\tCash: \"Sularaha\",\n\t\"POS Terminal\": \"POS terminal\",\n\t\"Order summary\": \"Tellimuse kokkuvõte\",\n\tItems: \"Tooted\",\n\tTax: \"Maks\",\n\tTotal: \"Kokku\",\n\t\"Special instructions, allergies, etc.\": \"Erisoovid, allergiad jne.\",\n\t\"Place order\": \"Esita tellimus\",\n\tContinue: \"Jätka\",\n\t\"Track order\": \"Jälgi tellimust\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimaalne tellimuse summa kohaletoimetamiseks on {{amount}}\",\n\t\"This field is required\": \"See väli on kohustuslik\",\n\t\"Please select a table\": \"Palun vali laud\",\n\t\"Please enter an address\": \"Palun sisesta aadress\",\n\t\"Please choose product\": \"Palun vali toode\",\n\tTable: \"Laud\",\n\t\"Select Table\": \"Vali laud\",\n\tCard: \"Kaardiga\",\n\t\"Closed Now\": \"Praegu suletud\",\n\t\"Delivery Fee\": \"Kohaletoimetamise tasu\",\n};\n","export default {\n\t\"Unknown address\": \"Tundmatu aadress\",\n\t\"No address available\": \"Aadress puudub\",\n\t\"Update Delivery Address\": \"Uuenda kohaletoimetamise aadress\",\n\tCountry: \"Riik\",\n\tCity: \"Linn\",\n\t\"Baker Street\": \"Nizami tänav\",\n\tAddress: \"Aadress\",\n\t\"House number\": \"Majanumber\",\n\t\"Additional number\": \"Korteri number\",\n\t\"Example: Door code is 555\": \"Näide: Uksekood on 555\",\n\t\"Delivery Instructions\": \"Kohaletoimetamise juhised\",\n\tAzerbaijan: \"Aserbaidžaan\",\n\tFloor: \"Põrand\",\n\t\"Enter address\": \"Sisesta aadress\",\n};\n","export default {\n\t\"Create an account or log in\": \"Loo konto või logi sisse\",\n\t\"Phone number\": \"Telefoninumber\",\n\t\"I don't have an email\": \"Mul ei ole e-posti aadressi\",\n\t\"We sent a confirmation code to {{address}}\": \"Saatsime kinnituskoodi aadressile {{address}}\",\n};\n","export default {\n\tEvents: \"Sündmused\",\n\t\"Scrolled to Category\": \"Keriti kategooriasse\",\n\t\"Category Selected\": \"Kategooria valitud\",\n\t\"Product Details\": \"Toote detailid\",\n\t\"Product Added to Order\": \"Toode lisatud tellimusele\",\n};\n","export default {\n\t\"Get Started\": \"Alustage\",\n\t\"Choose Plan\": \"Vali plaan\",\n\t\"Smart QR Menu\": \"Nutikas QR-menüü\",\n\t\"Link-in-bio\": \"Link-in-bio\",\n\t\"Menu Analytics\": \"Menüü Analüütika\",\n\t\"Unlimited Products\": \"Piiramata tooted\",\n\t\"Unlimited Categories\": \"Piiramata kategooriad\",\n\t\"Product variants\": \"Tootevariandid\",\n\t\"Product options\": \"Toote valikud\",\n\t\"Sales reports\": \"Müügiaruanded\",\n\t\"24/7 Support\": \"24/7 tugi\",\n\t\"Multiple Branches\": \"Mitu filiaali\",\n\t\"Table Management\": \"Tabelite haldamine\",\n\t\"Order Management\": \"Tellimuste haldamine\",\n\t\"Mobile App for Owners & Staff\": \"Mobiilirakendus omanikele ja töötajatele\",\n\t\"Point of Sale (POS)\": \"Müügipunkt (POS)\",\n\t\"Delivery Management\": \"Tarnejuhtimine\",\n\t\"Third-Party Delivery Integrations\": \"Kolmanda osapoole tarneintegratsioonid\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay koos mobiiliga\",\n\t\"Event management\": \"Sündmuste haldamine\",\n\t\"Unlimited Users\": \"Piiramatu arv kasutajaid\",\n\t\"/ month\": \"/ kuus\",\n\tmonthly: \"Igakuine\",\n\tannually: \"Igal aastal\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Paindlikud plaanid igale ettevõttele - Lihtne hind, rohkem väärtust!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Vali tellimus, mis sobib sinu ettevõttele. Telli igakuiselt või kord aastas ning säästa rohkem pikaajaliste plaanidega!\",\n\t\"Unlimited Languages\": \"Piiramatu arv keeli\",\n\t\"30-day money-back guarantee\": \"30-päevane raha tagasi garantii\",\n\t\"Limited Time Only\": \"Ainult piiratud ajaks\",\n\t\"/ lifetime\": \"/ eluaegne\",\n\t\"Try for free\": \"Proovi tasuta\",\n\t\"No credit card needed\": \"Krediitkaarti pole vaja\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Esmaspäev\",\n\t\"WEEKDAY-1\": \"Teisipäev\",\n\t\"WEEKDAY-2\": \"Kolmapäev\",\n\t\"WEEKDAY-3\": \"Neljapäev\",\n\t\"WEEKDAY-4\": \"Reede\",\n\t\"WEEKDAY-5\": \"Laupäev\",\n\t\"WEEKDAY-6\": \"Pühapäev\",\n\tClosed: \"Suletud\",\n\t\"Opening Hours\": \"Lahtiolekuajad\",\n\t\"Delivery Hours\": \"Kohaletoimetamise ajad\",\n};\n","import { SUPPORTED_LOCALES } from \"src/modules/view/constants\";\nimport * as businessConstants from \"src/modules/business/constants\";\n\nimport locales from \"./locales\";\n\nexport const getTranslations = (locale: string, ns: string) => {\n\ttry {\n\t\tconst supportedLocale = SUPPORTED_LOCALES.includes(locale)\n\t\t\t? locale\n\t\t\t: businessConstants.DEFAULT_LANGUAGE;\n\n\t\tconst translations = locales[supportedLocale as never][ns] || {};\n\n\t\tconst t = (key: string, options?: Record<string, string>) => {\n\t\t\ttry {\n\t\t\t\tconst translation = translations[key] || key;\n\n\t\t\t\tif (options) {\n\t\t\t\t\treturn Object.keys(options).reduce(\n\t\t\t\t\t\t(acc, k) => acc.replace(`{{${k}}}`, options[k]),\n\t\t\t\t\t\ttranslation\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn translation;\n\t\t\t} catch (error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error(error);\n\t\t\t\treturn key;\n\t\t\t}\n\t\t};\n\n\t\treturn { t };\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t\treturn { t: (key: string) => key };\n\t}\n};\n","import { getTranslations } from \"src/services/translation\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nexport const useTranslation = (ns: string = \"common\", params?: { language?: string }) => {\n\tconst language = businessHooks.useLanguage();\n\tconst locale = params?.language || language;\n\n\tconst { t } = getTranslations(locale, ns);\n\n\treturn { t };\n};\n","import { useMemo } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport { Customer, CustomerAddress } from \"./models\";\n\nexport const useAvailableCustomer = (): Customer => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer || ({} as Customer);\n};\n\nexport const useCustomerAddress = (): CustomerAddress => {\n\tconst { customer } = useOrderContext();\n\n\tconst address = customer?.addresses?.[customer?.addresses?.length - 1];\n\n\treturn address || ({} as CustomerAddress);\n};\n\nexport const useCustomerId = (): number => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer?.id;\n};\n\nexport const useCustomerEmail = (): string => {\n\tconst { customer } = useOrderContext();\n\n\treturn useMemo(() => customer?.email, [customer?.email]);\n};\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\tphoneNumber: string;\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","import { FormErrors } from \"@sorocraft/ui\";\nimport { checkIsValidEmail } from \"@sorocraft/js-utils\";\n\nimport * as viewUtils from \"src/modules/view/utils\";\n\nimport {\n\tCustomerAddress,\n\tCustomerAuthForm,\n\tCustomerAuthPhoneForm,\n\tCustomerAuthStep,\n} from \"./models\";\n\nexport const preparePhoneNumber = (form: CustomerAuthPhoneForm) => {\n\tconst phoneNumber = `${form.countryCode}${form.phoneNumber}`.replaceAll(\"+\", \"\");\n\n\treturn phoneNumber;\n};\n\nexport const validateForm = (form: CustomerAuthForm, step: CustomerAuthStep): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { phoneNumber, email, otp } = form || {};\n\n\tswitch (step) {\n\t\tcase CustomerAuthStep.PHONE: {\n\t\t\tconst { isValid, error } = viewUtils.validatePhoneNumber(phoneNumber);\n\t\t\tif (!isValid) errors.phoneNumber = error;\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.OTP: {\n\t\t\tconst { isValid, error } = viewUtils.validatePhoneNumber(phoneNumber);\n\t\t\tif (!isValid) errors.phoneNumber = error;\n\n\t\t\tif (!otp || otp.length !== 6) {\n\t\t\t\terrors.otp = \"Invalid OTP\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.EMAIL: {\n\t\t\tif (!email || !checkIsValidEmail(email)) {\n\t\t\t\terrors.email = \"Invalid Email Address\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn errors;\n};\n\nexport const validateAddressForm = (form: CustomerAddress): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { countryCode, cityName, street, houseNumber } = form || {};\n\n\tif (!countryCode) errors.countryCode = \"COUNTRY_REQUIRED\";\n\tif (!cityName) errors.cityName = \"CITY_REQUIRED\";\n\tif (!street) errors.street = \"STREET_REQUIRED\";\n\tif (!houseNumber) errors.houseNumber = \"STREET_NUMBER_REQUIRED\";\n\n\treturn errors;\n};\n\nexport const formatCityLine = (fields: (string | undefined)[]) => {\n\treturn (fields || []).filter(Boolean).join(\", \");\n};\n\nexport const formatAddressLine = (\n\tstreet: string,\n\thouseNumber: string,\n\tadditionalNumber: string\n) => {\n\tconst house = [houseNumber, additionalNumber].filter(Boolean).join(\"/\");\n\tconst fullAddress = [street, house].filter(Boolean).join(\" \");\n\n\treturn fullAddress;\n};\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\nimport { useEffect, useState } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as customerHooks from \"src/modules/customer/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as businessHooks from \"src/modules/business/hooks\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport { generateOrderItemsId, getOrderItemPrice } from \"./utils\";\nimport {\n\tOrder,\n\tOrderFormattedPriceDetails,\n\tOrderItem,\n\tOrderPayload,\n\tOrderPriceDetails,\n\tOrderStep,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nexport const useOrderPriceDetails = (): OrderPriceDetails => {\n\tconst { orderItems, order } = useOrderContext();\n\tconst { deliveryFeeAmount } = branchHooks.useBranchSettings();\n\n\tconst result = Object.values(orderItems || {}).reduce(\n\t\t(total, item: OrderItem) => {\n\t\t\tconst { totalGross, totalNet, totalTax } = getOrderItemPrice(item);\n\t\t\tconst totalPriceWithTax = total.totalPriceWithTax + totalGross;\n\t\t\treturn {\n\t\t\t\ttotalPriceWithTax,\n\t\t\t\ttotalPriceWithoutTax: total.totalPriceWithoutTax + totalNet,\n\t\t\t\ttotalTax: total.totalTax + totalTax,\n\t\t\t\ttotalPriceWithTaxAndFees: totalPriceWithTax,\n\t\t\t};\n\t\t},\n\t\t{\n\t\t\ttotalPriceWithTax: 0,\n\t\t\ttotalPriceWithoutTax: 0,\n\t\t\ttotalTax: 0,\n\t\t\ttotalPriceWithTaxAndFees: 0,\n\t\t}\n\t);\n\n\tif (order?.orderType === OrderType.DELIVERY && deliveryFeeAmount > 0) {\n\t\tresult.totalPriceWithTaxAndFees += deliveryFeeAmount;\n\t}\n\n\treturn result;\n};\n\nexport const useOrderFormattedPriceDetails = (): OrderFormattedPriceDetails => {\n\tconst { totalPriceWithTax, totalPriceWithoutTax, totalTax, totalPriceWithTaxAndFees } =\n\t\tuseOrderPriceDetails();\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\n\treturn {\n\t\ttotalPriceWithTax: priceFormatter(totalPriceWithTax, currency, language),\n\t\ttotalPriceWithoutTax: priceFormatter(totalPriceWithoutTax, currency, language),\n\t\ttotalTax: priceFormatter(totalTax, currency, language),\n\t\ttotalPriceWithTaxAndFees: priceFormatter(totalPriceWithTaxAndFees, currency, language),\n\t};\n};\n\nexport const usePrepareOrder = (existingOrderData: Partial<Order> = {}): OrderPayload => {\n\tconst businessId = businessHooks.useBusinessId();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\n\tconst { order, orderItems } = useOrderContext();\n\tconst { totalPriceWithTax, totalPriceWithoutTax, totalTax, totalPriceWithTaxAndFees } =\n\t\tuseOrderPriceDetails();\n\tconst address = customerHooks.useCustomerAddress();\n\tconst customerId = customerHooks.useCustomerId();\n\tconst { deliveryFeeAmount } = branchHooks.useBranchSettings();\n\n\tconst {\n\t\tworkingDayId,\n\t\ttableId,\n\t\temployeeId,\n\t\torderType,\n\t\tpaymentMethod,\n\t\tnote,\n\t\tvat = 0,\n\t} = { ...order, ...existingOrderData };\n\n\treturn {\n\t\tbranchId: selectedBranch?.id,\n\t\tbusinessId,\n\t\tworkingDayId,\n\t\ttableId,\n\t\tcustomerId,\n\t\tcustomerAddressId: address.id,\n\t\temployeeId,\n\t\torderType,\n\t\ttotalPriceWithTax,\n\t\ttotalPriceWithTaxAndFees,\n\t\ttotalPriceWithoutTax,\n\t\ttotalTax,\n\t\titems: Object.values(orderItems || {}),\n\t\tvat,\n\t\tpaymentMethod,\n\t\tnote,\n\t\tdeliveryFee: orderType === OrderType.DELIVERY ? deliveryFeeAmount : undefined,\n\t};\n};\n\nexport const useTotalOrderItemsCount = () => {\n\tconst { orderItems } = useOrderContext();\n\n\treturn Object.values(orderItems || {}).reduce((sum, item) => sum + item.quantity, 0);\n};\n\nexport const useProductQuantityInOrder = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number | null;\n\tselectedAddons: SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\tconst orderItemsId = generateOrderItemsId(productId, variantId, selectedAddons);\n\n\treturn orderItems[orderItemsId]?.quantity || 0;\n};\n\nexport const useProductQuantityInOrderWithAllVariants = (productId: number): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\t// get all order Items items with the same product id\n\tconst productOrderItems = Object.values(orderItems).filter(\n\t\t(item) => item.productId === productId\n\t);\n\n\t// get the total quantity of all order Items items with the same product id\n\tconst totalQuantity = productOrderItems.reduce((sum, item) => sum + item.quantity, 0);\n\n\treturn totalQuantity;\n};\n\nexport const useOrderItemPrice = (item: OrderItem) => {\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst { totalGross } = getOrderItemPrice(item);\n\n\treturn {\n\t\ttotalPrice: totalGross,\n\t\tformattedTotalPrice: priceFormatter(totalGross, currency, language),\n\t};\n};\n\nexport const useDeliveryDistanceError = (): string | null => {\n\tconst { t } = useTranslation(\"error\");\n\tconst branchCoordinates = branchHooks.useBranchCoordinates();\n\tconst maxDeliveryDistance = branchHooks.useMaxDeliveryDistance();\n\tconst { latitude, longitude } = customerHooks.useCustomerAddress();\n\n\tconst [error, setError] = useState<string | null>(null);\n\n\tuseEffect(() => {\n\t\tconst hasValidCustomerAddress = !!latitude && !!longitude;\n\t\tconst hasValidBranchCoordinates = !isEmpty(branchCoordinates);\n\n\t\tconst checkDistance = async () => {\n\t\t\tif (!hasValidCustomerAddress || !hasValidBranchCoordinates) {\n\t\t\t\treturn setError(\"INVALID_ADDRESS\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst distance = await customerServices.getCustomerDistance(branchCoordinates, {\n\t\t\t\t\tlatitude,\n\t\t\t\t\tlongitude,\n\t\t\t\t});\n\n\t\t\t\tsetError(!distance || distance > maxDeliveryDistance ? \"OUT_OF_DELIVERY_RANGE\" : null);\n\t\t\t} catch {\n\t\t\t\tsetError(\"OUT_OF_DELIVERY_RANGE\");\n\t\t\t}\n\t\t};\n\n\t\tcheckDistance();\n\t}, [latitude, longitude, branchCoordinates, maxDeliveryDistance]);\n\n\treturn error ? t(error) : null;\n};\n\nexport const useDeliveryAmountError = (): string | null => {\n\tconst { t } = useTranslation(\"order\");\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst minDeliveryAmount = branchHooks.useMinDeliveryAmount();\n\tconst { totalPriceWithTax } = useOrderPriceDetails();\n\n\tif (totalPriceWithTax < minDeliveryAmount) {\n\t\tconst amount = priceFormatter(minDeliveryAmount, currency, language);\n\t\treturn t(\"Minimum order amount for delivery is {{amount}}\", { amount });\n\t}\n\n\treturn null;\n};\n\nexport const useOrderErrorInDetails = (): string | null => {\n\tconst { order, orderStep } = useOrderContext();\n\tconst deliveryDistanceError = useDeliveryDistanceError();\n\tconst deliveryAmountError = useDeliveryAmountError();\n\tconst { t } = useTranslation(\"error\");\n\n\t// Only check errors at DETAILS step\n\tif (orderStep !== OrderStep.DETAILS) return null;\n\n\tif (!order?.orderType) return t(\"NO_ORDER_TYPE\");\n\tif (order.orderType === OrderType.DELIVERY) return deliveryAmountError || deliveryDistanceError;\n\n\treturn null;\n};\n","import {\n\tColumn,\n\tFormErrors,\n\tInput,\n\tInputType,\n\tonChangeEventType,\n\tRow,\n\tSelectOption,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\nimport { isNumber } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport {\n\tconstants as viewConstants,\n\thooks as viewHooks,\n\tutils as viewUtils,\n} from \"src/modules/view\";\nimport { models as customerModels, utils as customerUtils } from \"src/modules/customer\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (phoneNumber: string) => void;\n}\n\nconst PhoneStep = ({ formErrors, onChange }: Props) => {\n\tconst countryCodeOptions: SelectOption[] = viewConstants.SUPPORTED_COUNTRIES.map(\n\t\t({ phoneCode }) => ({\n\t\t\tlabel: phoneCode,\n\t\t\tvalue: phoneCode,\n\t\t})\n\t);\n\n\tconst hostname = viewHooks.useHostname();\n\tconst language = businessHooks.useLanguage();\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst [form, setForm] = useState<customerModels.CustomerAuthPhoneForm>({\n\t\tcountryCode: countryCodeOptions[0].value as string,\n\t\tphoneNumber: \"\",\n\t});\n\n\tconst { url: baseUrl } = viewUtils.getBaseUrl(hostname, language);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst { name, value } = e?.target || {};\n\n\t\tif (!name) return;\n\n\t\tconst trimmedValue = value?.trim() ?? \"\";\n\n\t\tif (name === \"phoneNumber\" && trimmedValue !== \"\" && !isNumber(trimmedValue)) return;\n\n\t\tconst updatedForm = { ...form, [name]: trimmedValue };\n\n\t\tconst preparedPhoneNumber = customerUtils.preparePhoneNumber(updatedForm);\n\t\tonChange(preparedPhoneNumber);\n\n\t\tsetForm(updatedForm);\n\t};\n\n\treturn (\n\t\t<Column gap={1} fullWidth>\n\t\t\t<Row fullWidth alignItems=\"flex-start\">\n\t\t\t\t<Input\n\t\t\t\t\tname=\"countryCode\"\n\t\t\t\t\toptions={countryCodeOptions}\n\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\tclassName={styles.countryCode}\n\t\t\t\t\tvalue={form.countryCode}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t/>\n\t\t\t\t<Input\n\t\t\t\t\tname=\"phoneNumber\"\n\t\t\t\t\tplaceholder={t(\"Phone number\")}\n\t\t\t\t\ttype={InputType.TEL}\n\t\t\t\t\tfullWidth\n\t\t\t\t\tvalue={form.phoneNumber}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\terrorMessage={tError(formErrors.phoneNumber)}\n\t\t\t\t/>\n\t\t\t</Row>\n\t\t\t<div className={styles.terms}>\n\t\t\t\t<div>\n\t\t\t\t\tBy clicking the button above, you agree to our{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/terms`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tTerms of Service\n\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\tand{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/privacy`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tPrivacy Policy\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Column>\n\t);\n};\nexport default PhoneStep;\n","import { Column, OTPInput, Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\taddress: string;\n\terrorMessage?: string;\n\tonChange: (otp: string) => void;\n}\n\nconst OTPStep = ({ address, errorMessage, onChange }: Props) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\t// Ensure updates happen after render, not during render\n\tconst handleOTPChange = (otp: string) => {\n\t\tqueueMicrotask(() => {\n\t\t\tonChange(otp);\n\t\t});\n\t};\n\n\treturn (\n\t\t<Column gap={2}>\n\t\t\t<Text fullWidth align=\"center\" color=\"muted\">\n\t\t\t\t{t(\"We sent a confirmation code to {{address}}\", { address })}\n\t\t\t</Text>\n\n\t\t\t<OTPInput\n\t\t\t\tonChangeOTP={handleOTPChange}\n\t\t\t\terrorMessage={errorMessage ? tError(errorMessage) : undefined}\n\t\t\t\tinputMode=\"numeric\"\n\t\t\t/>\n\t\t</Column>\n\t);\n};\n\nexport default OTPStep;\n","import {\n\tButton,\n\tColumn,\n\tFormErrors,\n\tInput,\n\tInputType,\n\tonChangeEventType,\n\tUIElementType,\n} from \"@sorocraft/ui\";\nimport { useCallback, useEffect, useState } from \"react\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (email: string) => void;\n\tonCancel: () => void;\n}\n\nconst EmailStep = ({ formErrors, onChange, onCancel }: Props) => {\n\tconst customerEmail = customerHooks.useCustomerEmail();\n\tconst [email, setEmail] = useState(customerEmail || \"\");\n\n\tconst { t: tAuth } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\tconst handleChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tconst newValue = e.target?.value ?? \"\";\n\t\t\tsetEmail(newValue);\n\t\t\tonChange(newValue);\n\t\t},\n\t\t[onChange]\n\t);\n\n\tuseEffect(() => {\n\t\tconst updateEmailIfNeeded = async () => {\n\t\t\tif (customerEmail && customerEmail !== email) {\n\t\t\t\tsetEmail(customerEmail);\n\t\t\t}\n\t\t};\n\n\t\tupdateEmailIfNeeded();\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [customerEmail]);\n\n\treturn (\n\t\t<Column className={styles.container} alignItems=\"center\" gap={0}>\n\t\t\t<Input\n\t\t\t\tname=\"email\"\n\t\t\t\ttype={InputType.EMAIL}\n\t\t\t\tplaceholder=\"Email\"\n\t\t\t\tfullWidth\n\t\t\t\tvalue={email}\n\t\t\t\tonChange={handleChange}\n\t\t\t\terrorMessage={formErrors.email ? tError(formErrors.email) : undefined}\n\t\t\t/>\n\n\t\t\t{!email && (\n\t\t\t\t<Button\n\t\t\t\t\tonClick={onCancel}\n\t\t\t\t\tlabel={tAuth(\"I don't have an email\")}\n\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\n\nexport default EmailStep;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./HoursList.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ntype Props = {\n\ttitle?: string;\n\tdays: branchModels.BranchWorkDay[];\n};\n\nconst HoursList = ({ title, days }: Props) => {\n\tconst { t } = useTranslation(\"branch\");\n\n\tif (isEmpty(days)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={0.5} fullWidth>\n\t\t\t{title && (\n\t\t\t\t<Text weight=\"medium\" className={styles.title}>\n\t\t\t\t\t{t(title)}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{days.map(({ day, hours }) => {\n\t\t\t\tconst isClosed = !hours;\n\t\t\t\tconst timeText = isClosed ? t(\"Closed\") : `${hours.openAt} - ${hours.closeAt}`;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row key={day} justifyContent=\"space-between\" fullWidth>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\">\n\t\t\t\t\t\t\t{t(`WEEKDAY-${day}`)}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\" color={isClosed ? UIElementType.DANGER : \"normal\"}>\n\t\t\t\t\t\t\t{timeText}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default HoursList;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column } from \"@sorocraft/ui\";\n\nimport styles from \"./BranchBusinessHours.module.scss\";\n\nimport { models as branchModels, hooks as branchHooks } from \"src/modules/branch\";\n\nimport HoursList from \"./HoursList\";\n\ntype Props = {\n\topeningHours: branchModels.Branch[\"openingHours\"];\n\tdeliveryHours: branchModels.Branch[\"deliveryHours\"];\n};\n\nconst BranchBusinessHours = ({ openingHours, deliveryHours }: Props) => {\n\tconst openingDays = openingHours?.days || [];\n\tconst deliveryDays = deliveryHours?.days || [];\n\n\tconst isDeliveryEnabled = branchHooks.useIsDeliveryEnabled();\n\n\tif (isEmpty(openingDays)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={2}>\n\t\t\t<HoursList days={openingDays} />\n\t\t\t{isDeliveryEnabled && <HoursList title=\"Delivery Hours\" days={deliveryDays} />}\n\t\t</Column>\n\t);\n};\n\nexport default BranchBusinessHours;\n","import { useEffect, useState, useCallback } from \"react\";\nimport { SIZE, IconButton } from \"@sorocraft/ui\";\nimport { ChevronUp } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ScrollToTop.module.scss\";\n\ninterface Props {\n\tsize: SIZE;\n\tzIndex?: number;\n}\n\nconst ScrollToTop = ({ size, zIndex = 100 }: Props) => {\n\tconst [showGoTop, setShowGoTop] = useState(false);\n\n\tconst handleScroll = useCallback(() => {\n\t\tconst shouldShow = window.scrollY > 100;\n\n\t\t// Only update state if it actually changes\n\t\tif (shouldShow !== showGoTop) {\n\t\t\tsetShowGoTop(shouldShow);\n\t\t}\n\t}, [showGoTop]);\n\n\tconst handleScrollTop = () => {\n\t\twindow.scrollTo({ left: 0, top: 0, behavior: \"smooth\" });\n\t};\n\n\tuseEffect(() => {\n\t\twindow.addEventListener(\"scroll\", handleScroll);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"scroll\", handleScroll);\n\t\t};\n\t}, [handleScroll]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tvisible: showGoTop,\n\t\t\t})}\n\t\t\tstyle={{ zIndex }}\n\t\t>\n\t\t\t<IconButton icon={ChevronUp} size={size} onClick={handleScrollTop} />\n\t\t</div>\n\t);\n};\nexport default ScrollToTop;\n","import { ReactNode } from \"react\";\n\nimport styles from \"./BranchCard.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\ninterface Props {\n\tchildren: ReactNode;\n\tid: number;\n}\n\nconst BranchCardParent = ({ children, id }: Props) => {\n\tconst clearRootPath = branchHooks.useNormalizedRootPath();\n\tconst onBranchSelect = branchHooks.useOnBranchSelect();\n\n\tif (onBranchSelect) {\n\t\treturn (\n\t\t\t<div className={styles.item} onClick={() => onBranchSelect(id)}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<a href={`${clearRootPath}/${id}`} className={styles.item}>\n\t\t\t{children}\n\t\t</a>\n\t);\n};\nexport default BranchCardParent;\n","import { classNames } from \"@sorocraft/js-utils\";\nimport { Column, Row, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchCard.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport BranchCardParent from \"./Parent\";\n\ninterface Props {\n\tbranch: branchModels.Branch;\n}\n\nconst BranchCard = ({ branch }: Props) => {\n\tconst { id, address, coverPhoto, name } = branch || {};\n\tconst business = businessHooks.useBusiness();\n\tconst venueName = `${business.name} ${name}`;\n\n\treturn (\n\t\t<BranchCardParent id={id}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tnoImage: !coverPhoto,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{coverPhoto && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<Column\n\t\t\t\t\tjustifyContent=\"flex-end\"\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tfullHeight\n\t\t\t\t\tclassName={styles.info}\n\t\t\t\t\tgap={0.5}\n\t\t\t\t>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tvariant=\"h2\"\n\t\t\t\t\t\tclassName={styles.name}\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tweight=\"bold\"\n\t\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{venueName}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Row alignItems=\"center\" gap={0.5} justifyContent=\"center\" fullWidth>\n\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t<span className={styles.address}>{address}</span>\n\t\t\t\t\t</Row>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t</BranchCardParent>\n\t);\n};\nexport default BranchCard;\n","import { Container } from \"@sorocraft/ui\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport BranchCard from \"./BranchCard\";\n\nconst Branches = () => {\n\tconst branches = branchHooks.useList();\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.container}>\n\t\t\t\t{branches.map((branch) => (\n\t\t\t\t\t<BranchCard key={branch.id} branch={branch} />\n\t\t\t\t))}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { MenuAddon } from \"../addon/models\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId?: number;\n}\n\nexport interface ProductVariantTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslation[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n\nexport interface DashboardProduct extends Omit<Product, \"addons\"> {\n\taddons: number[];\n}\n","export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOptionTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\tprice: number;\n\ttranslations: MenuAddonOptionTranslation[];\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\ttranslations: MenuAddonTranslation[];\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n}\n","import { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport {\n\tMenuAddon,\n\tMenuAddonOption,\n\tMenuAddonOptionTranslation,\n\tMenuAddonTranslation,\n} from \"./models\";\n\nexport const getAddonTranslation = (addon: MenuAddon, language: string): MenuAddonTranslation => {\n\treturn (addon?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as MenuAddonTranslation;\n};\n\nexport const getAddonOptionTranslation = (\n\toption: MenuAddonOption,\n\tlanguage: string\n): MenuAddonOptionTranslation => {\n\treturn (option?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as MenuAddonOptionTranslation;\n};\n\nexport const getOptionPrice = ({\n\toption,\n\tcurrency,\n\tlanguage,\n}: {\n\toption: MenuAddonOption;\n\tcurrency?: string;\n\tlanguage?: string;\n}) => {\n\tconst { price } = option || {};\n\n\treturn {\n\t\ttotalPrice: price,\n\t\tformattedTotalPrice: priceFormatter(price, currency || \"USD\", language || \"en\"),\n\t};\n};\n\nexport const getAddonOptionRawPrice = (addon: MenuAddon, optionId: number): number => {\n\treturn (addon?.options || []).find(({ id }) => id === optionId)?.price || 0;\n};\n\nexport const getOptionTitles = (\n\toptions: MenuAddonOption[],\n\toptionIds: number | number[],\n\tlanguage: string\n): string => {\n\tif (Array.isArray(optionIds)) {\n\t\treturn (options || [])\n\t\t\t.filter(({ id }) => optionIds.includes(id))\n\t\t\t.map(({ translations }) => translations.find((t) => t.language === language)?.title || \"\")\n\t\t\t.filter(Boolean)\n\t\t\t.join(\", \");\n\t} else {\n\t\tconst option = (options || []).find(({ id }) => id === optionIds);\n\t\treturn option?.translations.find((t) => t.language === language)?.title || \"\";\n\t}\n};\n\nexport const getAddonTitle = (addon: MenuAddon, language: string): string => {\n\treturn addon?.translations?.find?.((t) => t.language === language)?.title || \"\";\n};\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\n\nimport { Product, ProductTranslation, ProductVariant, ProductVariantTranslation } from \"./models\";\n\nimport { MenuAddon, MenuAddonSelectType } from \"src/modules/addon/models\";\nimport { getAddonOptionRawPrice } from \"src/modules/addon/utils\";\nimport * as orderModels from \"src/modules/order/models\";\n\nexport const calculateTotalPrice = (price: number = 0, quantity: number = 1, vat: number = 0) => {\n\treturn price * quantity * (1 + vat / 100);\n};\n\nexport const getProductTranslation = (\n\tproduct: Pick<Product, \"translations\">,\n\tlanguage: string\n): ProductTranslation => {\n\treturn (product?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as ProductTranslation;\n};\n\nexport const getProductRawPrice = (\n\tproduct: Pick<Product, \"price\" | \"vat\">,\n\tquantity: number = 1\n) => {\n\tconst { price = 0, vat = 0 } = product || {};\n\treturn calculateTotalPrice(price, quantity, vat);\n};\n\nexport const getProductPrice = (\n\tproduct: Pick<Product, \"price\" | \"vat\">,\n\tcurrency: string,\n\tlanguage: string,\n\tquantity: number = 1\n) => {\n\tconst totalPrice = getProductRawPrice(product, quantity);\n\n\treturn {\n\t\ttotalPrice: totalPrice,\n\t\tformattedTotalPrice: priceFormatter(totalPrice, currency, language),\n\t};\n};\n\nexport const getProductVariant = (\n\tproduct: Pick<Product, \"variants\">,\n\tvariantId: number\n): ProductVariant => {\n\treturn product?.variants?.find?.((item) => item.id === variantId) || ({} as ProductVariant);\n};\n\nexport const getSelectedOptionsTotalPrice = (\n\tproduct: Product,\n\tselectedAddons: orderModels.SelectedAddons = {},\n\tquantity: number\n): number => {\n\t// Filter addons that are selected by the user\n\tconst selectedAddonsList = (product?.addons || []).filter((addon) =>\n\t\tObject.prototype.hasOwnProperty.call(selectedAddons, addon.id)\n\t);\n\n\t// Calculate the total price\n\tconst optionsTotalPrice = selectedAddonsList.reduce((total: number, addon: MenuAddon) => {\n\t\tconst { id: addonId, selectType } = addon;\n\n\t\t// Handle SINGLE selection\n\t\tif (selectType === MenuAddonSelectType.SINGLE) {\n\t\t\tconst selectedOptionId = selectedAddons[addonId] as number;\n\t\t\treturn total + getAddonOptionRawPrice(addon, selectedOptionId);\n\t\t}\n\n\t\t// Handle MULTIPLE selection\n\t\tconst selectedOptionIds = (selectedAddons[addonId] || []) as number[];\n\t\tconst multipleOptionsPrice = selectedOptionIds.reduce(\n\t\t\t(multipleTotal, optionId) => multipleTotal + getAddonOptionRawPrice(addon, optionId),\n\t\t\t0\n\t\t);\n\n\t\treturn total + multipleOptionsPrice;\n\t}, 0);\n\n\treturn optionsTotalPrice * quantity;\n};\n\nexport const getProductVariantRawPrice = (\n\tvariantId: number,\n\tproduct: Pick<Product, \"variants\" | \"vat\">,\n\tquantity?: number\n) => {\n\tconst variant = getProductVariant(product, variantId);\n\tconst { vat } = product || {};\n\tconst { price } = variant || {};\n\treturn calculateTotalPrice(price, quantity, vat);\n};\n\nexport const getProductVariantPrice = ({\n\tvariantId,\n\tcurrency = \"USD\",\n\tlanguage = \"en\",\n\tproduct,\n\tquantity = 1,\n}: {\n\tvariantId: number;\n\tcurrency?: string;\n\tlanguage?: string;\n\tproduct: Pick<Product, \"variants\" | \"vat\">;\n\tquantity?: number;\n}) => {\n\tconst totalPrice = getProductVariantRawPrice(variantId, product, quantity);\n\n\treturn {\n\t\ttotalPrice: totalPrice,\n\t\tformattedTotalPrice: priceFormatter(totalPrice, currency, language),\n\t};\n};\n\nexport const getProductVariantTranslation = (\n\tvariant: ProductVariant,\n\tlanguage: string\n): ProductVariantTranslation => {\n\treturn (variant?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as ProductVariantTranslation;\n};\n\nexport const getProductOrderRawPrice = ({\n\tproduct,\n\tvariantId,\n\tquantity = 1,\n\tselectedAddons,\n\tnoVat = false,\n}: {\n\tproduct: Product;\n\tvariantId: number | null;\n\tquantity: number;\n\tselectedAddons: orderModels.SelectedAddons;\n\tnoVat?: boolean;\n}): { price: number; optionsPrice: number; total: number } => {\n\tif (isEmpty(product)) return { price: 0, optionsPrice: 0, total: 0 };\n\n\tconst productData: Product = { ...product, vat: noVat ? 0 : product.vat };\n\tconst selectedOptionsTotalPrice = getSelectedOptionsTotalPrice(\n\t\tproductData,\n\t\tselectedAddons,\n\t\tquantity\n\t);\n\tconst price = variantId\n\t\t? getProductVariantRawPrice(variantId, productData, quantity)\n\t\t: getProductRawPrice(productData, quantity);\n\n\treturn {\n\t\tprice,\n\t\toptionsPrice: selectedOptionsTotalPrice,\n\t\ttotal: price + selectedOptionsTotalPrice,\n\t};\n};\n\nexport const getProductOrderPrice = ({\n\tproduct,\n\tvariantId,\n\tquantity = 1,\n\tcurrency,\n\tlanguage,\n\tselectedAddons,\n\tnoVat = false,\n}: {\n\tproduct: Product;\n\tvariantId: number | null;\n\tquantity: number;\n\tcurrency: string;\n\tlanguage: string;\n\tselectedAddons: orderModels.SelectedAddons;\n\tnoVat?: boolean;\n}) => {\n\tconst { total } = getProductOrderRawPrice({\n\t\tproduct,\n\t\tvariantId,\n\t\tquantity,\n\t\tselectedAddons,\n\t\tnoVat,\n\t});\n\n\treturn {\n\t\ttotalPrice: total,\n\t\tformattedTotalPrice: priceFormatter(total, currency, language),\n\t};\n};\n\nexport const getProductAddon = (product: Product, addonId: number): MenuAddon => {\n\treturn (product?.addons || []).find(({ id }) => id === addonId) || ({} as MenuAddon);\n};\n","import { useOrderContext } from \"src/store/order\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderModels from \"src/modules/order/models\";\nimport { useStoreContext } from \"src/store\";\n\nimport { Product } from \"./models\";\n\nexport const useProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons: orderModels.SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\tconst item = orderItems[orderItemsId];\n\n\treturn item?.quantity || 1;\n};\n\nexport const useList = (): Product[] => {\n\tconst { products } = useStoreContext();\n\n\treturn products || [];\n};\n\nexport const useProductById = (productId: number): Product => {\n\tconst { products } = useStoreContext();\n\tconst product = products?.find?.(({ id }) => id === productId);\n\n\treturn (product || {}) as Product;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Category, CategoryTranslation } from \"./models\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n\nexport const getCategoryNameById = (\n\tcategoryId: number,\n\tcategories: Category[],\n\tlanguage: string\n): string => {\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name;\n};\n","const GOAL_BASE_NAME = \"digital_menu\";\n\nexport const CATEGORY_SELECTED = `${GOAL_BASE_NAME}_category_select`;\nexport const CATEGORY_SCROLLED = `${GOAL_BASE_NAME}_category_scroll`;\nexport const PRODUCT_DETAILS = `${GOAL_BASE_NAME}_product_details`;\nexport const PRODUCT_ADD_ORDER = `${GOAL_BASE_NAME}_product_add_cart`;\nexport const PRODUCT_VIEW_CHANGED = `${GOAL_BASE_NAME}_product_view_changed`;\n\nexport const GOALS = [CATEGORY_SELECTED, CATEGORY_SCROLLED, PRODUCT_DETAILS, PRODUCT_ADD_ORDER];\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Categories.module.scss\";\n\nimport { models as menuModels } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\ninterface Props {\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tskipTracking?: boolean;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({\n\tcategoryProductMap = [],\n\tlanguage,\n\tselectedCategoryId,\n\tskipTracking = false,\n\tonSelectCategory,\n}: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\tconst carouselRef = useRef<HTMLDivElement>(null);\n\n\tconst scrollToCategoryBlock = useCallback(() => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[selectedCategoryId];\n\t\tif (!categoryBlock || !carouselRef.current) return;\n\n\t\tconst carouselWidth = carouselRef.current.clientWidth;\n\t\tconst categoryLeft = categoryBlock.offsetLeft;\n\t\tconst categoryWidth = categoryBlock.offsetWidth;\n\n\t\tconst scrollLeft = categoryLeft - carouselWidth / 2 + categoryWidth / 2;\n\t\tcarouselRef.current.scrollTo({ left: scrollLeft, behavior: \"smooth\" });\n\t}, [selectedCategoryId]);\n\n\tconst handleSelectCategory = (id: number, name?: string) => {\n\t\tif (id === selectedCategoryId) return;\n\n\t\tonSelectCategory(id);\n\t\tif (skipTracking) return;\n\t\ttrackEvent(analyticsConstants.CATEGORY_SELECTED, { name });\n\t};\n\n\tconst handleGetCarouselRef = (ref: RefObject<HTMLDivElement>) => {\n\t\tif (!ref?.current) return;\n\t\tcarouselRef.current = ref.current;\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedCategoryId) scrollToCategoryBlock();\n\t}, [selectedCategoryId, scrollToCategoryBlock]);\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1} onGetRef={handleGetCarouselRef}>\n\t\t\t\t{(categoryProductMap || []).map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id, name)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\t\tif (el) categoryBlocksRef.current[id] = el;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n\tonClick?: () => void;\n}\n\nconst ProductsListItem = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\tconst { image160, volume, available } = product || {};\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\tconst { t } = useTranslation(\"order\");\n\n\tconst hasVariant = product?.variants?.length > 0;\n\tconst hasAddons = product?.addons?.length > 0;\n\tconst hasImage = !!image160;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif ((hasVariant || hasAddons) && onClick) return onClick();\n\n\t\taddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tnoImage: !hasImage,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<Row justifyContent=\"space-between\" gap={0}>\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<p className={styles.description}>{description}</p>\n\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t{!!volume && <Text color=\"muted\">{volume}</Text>}\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t<Text size=\"xs\" color=\"danger\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{hasImage && (\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={viewUtils.getImageSource(image160)}\n\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\twidth={160}\n\t\t\t\t\t\theight={90}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{available && (\n\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsGridItem.module.scss\";\n\nimport { utils as productUtils } from \"src/modules/product\";\n\nimport { utils as viewUtils } from \"src/modules/view\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\nconst ProductsGridItem = ({\n\tproduct,\n\tcurrency,\n\tlanguage,\n\tdefaultImage = \"\",\n\tisDashboard = false,\n\tonClick,\n\tonAddProduct,\n}: ProductsGridItemProps) => {\n\tconst { volume, image580, image160, image1024, available } = product || {};\n\tconst image = image580 || image1024 || image160 || defaultImage;\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst hasVariant = product?.variants?.length > 0;\n\tconst hasAddons = product?.addons?.length > 0;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif ((hasVariant || hasAddons) && onClick) return onClick();\n\n\t\tonAddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tisClickable: !!onClick,\n\t\t\t\t\tnoImage: !image,\n\t\t\t\t})}\n\t\t\t\tonClick={onClick}\n\t\t\t>\n\t\t\t\t{image && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={viewUtils.getImageSource(image)}\n\t\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\twidth={580}\n\t\t\t\t\t\t\theight={326}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t\t{!isDashboard && <p className={styles.description}>{description}</p>}\n\n\t\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t\t{!!volume && (\n\t\t\t\t\t\t\t\t\t<Text color=\"white\" className={styles.volume}>\n\t\t\t\t\t\t\t\t\t\t{volume}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t\t<Text color=\"white\" size=\"xs\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{available && (\n\t\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default ProductsGridItem;\n","import { useOrderContext } from \"src/store/order\";\n\nimport ProductsGridItem from \"./ProductsGridItem\";\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\ntype Props = Omit<ProductsGridItemProps, \"onAddProduct\">;\n\nconst ProductsGridItemContainer = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\n\treturn (\n\t\t<ProductsGridItem\n\t\t\tonAddProduct={addProduct}\n\t\t\tproduct={product}\n\t\t\tcurrency={currency}\n\t\t\tlanguage={language}\n\t\t\tonClick={onClick}\n\t\t/>\n\t);\n};\n\nexport default ProductsGridItemContainer;\n","import { Row, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { Minus, Plus } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Quantity.module.scss\";\n\ninterface Props {\n\tisDecreaseDisabled?: boolean;\n\tquantity?: number;\n\tsize?: SIZE;\n\tonIncrease: () => void;\n\tonDecrease: () => void;\n}\n\nconst Quantity = ({\n\tisDecreaseDisabled = false,\n\tquantity = 1,\n\tsize = \"md\",\n\tonIncrease,\n\tonDecrease,\n}: Props) => {\n\treturn (\n\t\t<Row\n\t\t\tclassName={classNames(\n\t\t\t\tstyles,\n\t\t\t\t{\n\t\t\t\t\tcontainer: true,\n\t\t\t\t},\n\t\t\t\t[styles[size]]\n\t\t\t)}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tquantityAction: true,\n\t\t\t\t\tisDisabled: isDecreaseDisabled,\n\t\t\t\t})}\n\t\t\t\tonClick={onDecrease}\n\t\t\t>\n\t\t\t\t<SVGIcon icon={Minus} />\n\t\t\t</div>\n\t\t\t<div className={styles.quantityValue}>{quantity}</div>\n\t\t\t<div className={styles.quantityAction} onClick={onIncrease}>\n\t\t\t\t<SVGIcon icon={Plus} />\n\t\t\t</div>\n\t\t</Row>\n\t);\n};\nexport default Quantity;\n","import { Flex, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { ShoppingBag, Trash } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./ProductInOrder.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tproductId: number;\n\tquantity: number;\n\tisInPublicMenu?: boolean;\n\tlanguage?: string;\n\tonModalClose: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductInOrder = ({\n\tproductId,\n\tquantity,\n\tisInPublicMenu = true,\n\tlanguage,\n\tremoveAllProductVariants,\n\tonModalClose,\n}: Props) => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst handleOpenOrder = () => {\n\t\tsetIsOrderOpen(true);\n\t\tif (onModalClose) onModalClose();\n\t};\n\n\tconst handleRemoveAllFromOrder = () => {\n\t\tremoveAllProductVariants(productId);\n\t};\n\n\tif (quantity <= 0) return null;\n\n\treturn (\n\t\t<Flex className={styles.container} fullWidth justifyContent=\"space-between\" alignItems=\"center\">\n\t\t\t<Flex.Item flex={1} className={styles.title}>\n\t\t\t\t{t(\"In order\")} ({quantity})\n\t\t\t</Flex.Item>\n\n\t\t\t<Flex.Item flex={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticon={Trash}\n\t\t\t\t\t\tonClick={handleRemoveAllFromOrder}\n\t\t\t\t\t\ttype={UIElementType.DANGER}\n\t\t\t\t\t\ttooltip={t(\"Remove from order\")}\n\t\t\t\t\t/>\n\t\t\t\t\t{isInPublicMenu && (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\ticon={ShoppingBag}\n\t\t\t\t\t\t\tonClick={handleOpenOrder}\n\t\t\t\t\t\t\ttype={UIElementType.SUCCESS}\n\t\t\t\t\t\t\ttooltip={t(\"View order\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default ProductInOrder;\n","import { useEffect, useRef } from \"react\";\nimport { Column, Input, InputType, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductVariants.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"variants\" | \"vat\">;\n\tselectedVariant: number;\n\tfocusedSection: string;\n\tlanguage: string;\n\tcurrency: string;\n\tonSelectVariant: (id: number) => void;\n}\n\nconst ProductVariants = ({\n\tproduct,\n\tselectedVariant,\n\tfocusedSection,\n\tlanguage,\n\tcurrency,\n\tonSelectVariant,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst { variants } = product || {};\n\n\tconst isVariantsFocused = focusedSection === \"variant\";\n\n\tuseEffect(() => {\n\t\tif (isVariantsFocused && containerRef.current) {\n\t\t\tcontainerRef.current.scrollIntoView({ behavior: \"smooth\" });\n\t\t}\n\t}, [focusedSection, isVariantsFocused]);\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tfocused: isVariantsFocused,\n\t\t\t})}\n\t\t\tgap={1}\n\t\t\tfullWidth\n\t\t>\n\t\t\t<div className={styles.variantsTitle} ref={containerRef}>\n\t\t\t\t{t(\"Product choices\")}\n\t\t\t</div>\n\t\t\t{(variants || []).map((variant) => {\n\t\t\t\tconst { id } = variant || {};\n\t\t\t\tconst { formattedTotalPrice: formattedTotalVariantPrice } =\n\t\t\t\t\tproductUtils.getProductVariantPrice({\n\t\t\t\t\t\tvariantId: id,\n\t\t\t\t\t\tlanguage,\n\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\tproduct,\n\t\t\t\t\t});\n\n\t\t\t\tconst { title } = productUtils.getProductVariantTranslation(variant, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row\n\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\tjustifyContent=\"space-between\"\n\t\t\t\t\t\tonClick={() => onSelectVariant(id)}\n\t\t\t\t\t\tclassName={styles.variant}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tlabel={title}\n\t\t\t\t\t\t\tname=\"variant\"\n\t\t\t\t\t\t\tonChange={() => onSelectVariant(id)}\n\t\t\t\t\t\t\tchecked={selectedVariant === id}\n\t\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={styles.variantPrice}>{formattedTotalVariantPrice}</div>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductVariants;\n","import { Column, Input, InputType, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductAddons.module.scss\";\n\nimport { models as productModels } from \"src/modules/product\";\nimport { models as addonModels, utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"addons\">;\n\tselectedAddons: orderModels.SelectedAddons;\n\tlanguage: string;\n\tcurrency: string;\n\tonOptionSelect: (selection: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n}\n\nconst ProductAddons = ({ product, selectedAddons, language, currency, onOptionSelect }: Props) => {\n\tconst { addons } = product || {};\n\n\treturn (\n\t\t<Column className={styles.container} gap={1.5} fullWidth>\n\t\t\t{(addons || []).map((addon) => {\n\t\t\t\tconst { id: addonId, options, selectType } = addon || {};\n\t\t\t\tconst { title } = addonUtils.getAddonTranslation(addon, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Column key={addonId}>\n\t\t\t\t\t\t<Text variant=\"bold\">{title}</Text>\n\t\t\t\t\t\t<Column gap={1} fullWidth>\n\t\t\t\t\t\t\t{(options || []).map((option) => {\n\t\t\t\t\t\t\t\tconst { id: optionId } = option || {};\n\n\t\t\t\t\t\t\t\tconst { formattedTotalPrice: formattedTotalOptionPrice } =\n\t\t\t\t\t\t\t\t\taddonUtils.getOptionPrice({\n\t\t\t\t\t\t\t\t\t\toption,\n\t\t\t\t\t\t\t\t\t\tlanguage,\n\t\t\t\t\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tconst { title: optionTitle } = addonUtils.getAddonOptionTranslation(\n\t\t\t\t\t\t\t\t\toption,\n\t\t\t\t\t\t\t\t\tlanguage\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst isSingle = selectType === addonModels.MenuAddonSelectType.SINGLE;\n\t\t\t\t\t\t\t\tconst checked = isSingle\n\t\t\t\t\t\t\t\t\t? selectedAddons[addonId] === optionId\n\t\t\t\t\t\t\t\t\t: ((selectedAddons[addonId] || []) as number[]).includes(optionId);\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Row key={optionId} justifyContent=\"space-between\" className={styles.option}>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tlabel={optionTitle}\n\t\t\t\t\t\t\t\t\t\t\tname={`option-${addonId}`}\n\t\t\t\t\t\t\t\t\t\t\tonChange={() =>\n\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelect({\n\t\t\t\t\t\t\t\t\t\t\t\t\taddonId,\n\t\t\t\t\t\t\t\t\t\t\t\t\toptionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSingle,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRemove: !isSingle && checked,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tchecked={checked}\n\t\t\t\t\t\t\t\t\t\t\ttype={isSingle ? InputType.RADIO : InputType.CHECKBOX}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div className={styles.optionPrice}>{formattedTotalOptionPrice}</div>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</Column>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductAddons;\n","import { Button, Column, IconButton, Modal, Row } from \"@sorocraft/ui\";\nimport { Close } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useCallback, useRef, MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductDetails.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Quantity from \"src/components/Quantity\";\nimport ProductInOrder from \"../ProductInOrder\";\nimport ProductVariants from \"../ProductVariants\";\nimport ProductAddons from \"../ProductAddons\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tlanguage: string;\n\tcurrency: string;\n\tselectedVariant: number | null;\n\tfocusedSection: string | null;\n\tselectedAddons: orderModels.SelectedAddons;\n\tisDecreaseDisabled?: boolean;\n\tquantity: number;\n\tactionTitle: string;\n\tisInPublicMenu?: boolean;\n\tproductQuantityInOrderWithAllVariants: number;\n\tonClose: () => void;\n\tsetSelectedVariant: (selectedVariant: number | null) => void;\n\tonOptionSelect: ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n\tadjustQuantity: (amount: number) => void;\n\tonSubmit: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductDetailsUI = ({\n\tproduct,\n\tlanguage,\n\tcurrency,\n\tselectedVariant,\n\tfocusedSection,\n\tselectedAddons,\n\tisDecreaseDisabled,\n\tquantity,\n\tactionTitle,\n\tisInPublicMenu,\n\tproductQuantityInOrderWithAllVariants,\n\tonClose,\n\tsetSelectedVariant,\n\tonOptionSelect,\n\tadjustQuantity,\n\tonSubmit,\n\tremoveAllProductVariants,\n}: Props) => {\n\tconst modalRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\n\tconst { formattedTotalPrice: formattedTotalOrderPrice } = useMemo(\n\t\t() =>\n\t\t\tproductUtils.getProductOrderPrice({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tlanguage,\n\t\t\t\tcurrency,\n\t\t\t\tvariantId: selectedVariant,\n\t\t\t\tselectedAddons,\n\t\t\t}),\n\t\t[product, quantity, language, currency, selectedVariant, selectedAddons]\n\t);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tif (!modalRef?.current?.contains?.(event?.target as Node)) {\n\t\t\t\tif (onClose) onClose();\n\t\t\t}\n\t\t},\n\t\t[onClose]\n\t);\n\n\tif (isEmpty(product)) return null;\n\n\tconst { image1024, volume, variants, addons, available } = product;\n\tconst hasVariants = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Modal\n\t\t\t\tonClose={onClose}\n\t\t\t\tref={modalRef}\n\t\t\t\tnoBodyPadding\n\t\t\t\tsize=\"small\"\n\t\t\t\tcontent={\n\t\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t{image1024 && (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc={viewUtils.getImageSource(image1024)}\n\t\t\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t\t\t\talt={name || \"product\"}\n\t\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Column className={styles.details} gap={1}>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t\t<div className={styles.price}>{formattedTotalPrice}</div>\n\t\t\t\t\t\t\t\t\t<div className={styles.volume}>{volume}</div>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t{(hasVariants || hasAddons) && (\n\t\t\t\t\t\t\t\t<Column gap={0} className={styles.choices}>\n\t\t\t\t\t\t\t\t\t{hasVariants && (\n\t\t\t\t\t\t\t\t\t\t<ProductVariants\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedVariant={selectedVariant}\n\t\t\t\t\t\t\t\t\t\t\tfocusedSection={focusedSection}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonSelectVariant={setSelectedVariant}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{hasAddons && (\n\t\t\t\t\t\t\t\t\t\t<ProductAddons\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelect={onOptionSelect}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<div className={styles.close}>\n\t\t\t\t\t\t\t<IconButton onClick={onClose} icon={Close} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t<Column>\n\t\t\t\t\t\t<ProductInOrder\n\t\t\t\t\t\t\tproductId={product?.id}\n\t\t\t\t\t\t\tonModalClose={onClose}\n\t\t\t\t\t\t\tisInPublicMenu={isInPublicMenu}\n\t\t\t\t\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\t\t\t\t\tquantity={productQuantityInOrderWithAllVariants}\n\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Row className={styles.addToOrder} gap={0.5}>\n\t\t\t\t\t\t\t<Quantity\n\t\t\t\t\t\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\t\t\t\t\t\tonDecrease={() => adjustQuantity(-1)}\n\t\t\t\t\t\t\t\tonIncrease={() => adjustQuantity(1)}\n\t\t\t\t\t\t\t\tquantity={quantity}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName={styles.addAction}\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tavailable ? (\n\t\t\t\t\t\t\t\t\t\t<Row fullWidth justifyContent=\"space-between\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t\t<span className={styles.actionTitle}>{actionTitle}</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{formattedTotalOrderPrice}</span>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\tt(\"Not available\")\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={onSubmit}\n\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\tdisabled={!available}\n\t\t\t\t\t\t\t\tpaddingBlock={0.5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</Column>\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default ProductDetailsUI;\n","import { trackEvent } from \"@sorocraft/js-utils\";\nimport { useEffect, useMemo, useState, useCallback } from \"react\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport ProductDetailsUI from \"./ProductDetailsUI\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tonClose: () => void;\n}\n\n// Product modal\nconst ProductDetails = ({ product, onClose }: Props) => {\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst { addProduct, updateProduct, removeAllProductVariants } = useOrderContext();\n\tconst [quantity, setQuantity] = useState<number>(1);\n\tconst [isUpdate, setIsUpdate] = useState<boolean>(false);\n\tconst [selectedVariant, setSelectedVariant] = useState<number | null>(null);\n\tconst [focusedSection, setFocusedSection] = useState<string | null>(null);\n\tconst [selectedAddons, setSelectedAddons] = useState<orderModels.SelectedAddons>({});\n\tconst { t } = useTranslation(\"order\");\n\n\tconst productQuantityInOrder = orderHooks.useProductQuantityInOrder({\n\t\tproductId: product?.id,\n\t\tvariantId: selectedVariant,\n\t\tselectedAddons,\n\t});\n\tconst productQuantityInOrderWithAllVariants = orderHooks.useProductQuantityInOrderWithAllVariants(\n\t\tproduct?.id\n\t);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\n\tconst isDecreaseDisabled = isUpdate ? quantity === 0 : quantity === 1;\n\tconst actionTitle = useMemo(\n\t\t() => (isUpdate ? (quantity === 0 ? t(\"Remove from order\") : t(\"Update order\")) : t(\"Add\")),\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[isUpdate, quantity]\n\t);\n\n\tuseEffect(() => {\n\t\tsetQuantity(productQuantityInOrder > 0 ? productQuantityInOrder + 1 : 1);\n\t\tsetIsUpdate(productQuantityInOrder > 0);\n\t}, [productQuantityInOrder, product]);\n\n\tuseEffect(() => {\n\t\tsetSelectedVariant(null);\n\t\tsetSelectedAddons({});\n\t}, [product]);\n\n\tconst handleSetFocusedSection = (section: string) => {\n\t\tsetFocusedSection(section);\n\n\t\tsetTimeout(() => {\n\t\t\tsetFocusedSection(null);\n\t\t}, 200);\n\t};\n\n\tconst handleSubmit = () => {\n\t\tconst hasVariant = product?.variants?.length > 0;\n\n\t\tif (hasVariant && !selectedVariant) return handleSetFocusedSection(\"variant\");\n\n\t\tif (isUpdate) {\n\t\t\tupdateProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t} else {\n\t\t\taddProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity });\n\t\t}\n\t\tif (onClose) onClose();\n\t};\n\n\tconst adjustQuantity = useCallback(\n\t\t(amount: number) => {\n\t\t\tif (amount === -1 && isDecreaseDisabled) return;\n\n\t\t\tsetQuantity((current) => Math.max(0, current + amount));\n\t\t},\n\t\t[isDecreaseDisabled]\n\t);\n\n\tconst handleOptionSelect = ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove = false,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => {\n\t\tsetSelectedAddons((prevForm) => {\n\t\t\t// For single selection, directly replace the value\n\t\t\tif (isSingle) {\n\t\t\t\treturn { ...prevForm, [addonId]: optionId };\n\t\t\t}\n\n\t\t\t// Handle multiple selection\n\t\t\tconst previousSelection = (prevForm[addonId] || []) as number[];\n\t\t\tconst updatedSelection = isRemove\n\t\t\t\t? previousSelection.filter((id) => id !== optionId) // Remove `optionId`\n\t\t\t\t: [...new Set([...previousSelection, optionId])]; // Add `optionId`\n\n\t\t\treturn {\n\t\t\t\t...prevForm,\n\t\t\t\t[addonId]: updatedSelection,\n\t\t\t};\n\t\t});\n\t};\n\n\treturn (\n\t\t<ProductDetailsUI\n\t\t\tproduct={product}\n\t\t\tlanguage={language}\n\t\t\tcurrency={currency}\n\t\t\tselectedVariant={selectedVariant}\n\t\t\tfocusedSection={focusedSection}\n\t\t\tselectedAddons={selectedAddons}\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tquantity={quantity}\n\t\t\tactionTitle={actionTitle}\n\t\t\tonClose={onClose}\n\t\t\tsetSelectedVariant={setSelectedVariant}\n\t\t\tonOptionSelect={handleOptionSelect}\n\t\t\tadjustQuantity={adjustQuantity}\n\t\t\tonSubmit={handleSubmit}\n\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\tproductQuantityInOrderWithAllVariants={productQuantityInOrderWithAllVariants}\n\t\t\tisInPublicMenu\n\t\t/>\n\t);\n};\nexport default ProductDetails;\n","import { Flex, Loading, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderStepper.module.scss\";\n\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tonClick?: () => void;\n\tactionText?: string;\n\tisLoading?: boolean;\n\tisDisabled?: boolean;\n}\n\nconst OrderStepper = ({ actionText, isLoading = false, isDisabled = false, onClick }: Props) => {\n\tconst { orderStep } = useOrderContext();\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst { totalPriceWithTax, totalPriceWithTaxAndFees } =\n\t\torderHooks.useOrderFormattedPriceDetails();\n\n\treturn (\n\t\t<Flex\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisLoading,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tisDisabled,\n\t\t\t})}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems=\"center\"\n\t\t\tonClick={isLoading || isDisabled ? null : onClick}\n\t\t>\n\t\t\t<Flex.Item flex={1}>\n\t\t\t\t<Row alignItems=\"center\">\n\t\t\t\t\t<div className={styles.count}>{totalCount}</div>\n\t\t\t\t\t<div className={styles.actionText}>{isLoading ? <Loading /> : actionText}</div>\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t\t<Flex.Item className={styles.totalPrice} flex={1}>\n\t\t\t\t{orderStep === orderModels.OrderStep.DETAILS ? totalPriceWithTaxAndFees : totalPriceWithTax}\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default OrderStepper;\n","import styles from \"./FloatingOrdersButton.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as orderHooks } from \"src/modules/order\";\n\nimport OrderStepper from \"../OrderStepper\";\n\nconst FloatingOrdersButton = () => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\n\tif (totalCount <= 0) return null;\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<OrderStepper onClick={() => setIsOrderOpen(true)} actionText={t(\"View order\")} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default FloatingOrdersButton;\n","import { Edit, Plus } from \"@sorocraft/ui/icons\";\nimport {\n\tButton,\n\tColumn,\n\tUIElementType,\n\tText,\n\tuseModalContext,\n\tAlertBox,\n\tTextBanner,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useState } from \"react\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as orderModels,\n\tservices as orderServices,\n\thooks as orderHooks,\n\tconstants as orderConstants,\n} from \"src/modules/order\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderStepper from \"../OrderStepper\";\n\ninterface Props {\n\tisOrderItemsEmpty: boolean;\n\torderError: string | null;\n}\n\nconst OrderDrawerFooter = ({ isOrderItemsEmpty = false, orderError }: Props) => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst {\n\t\torder,\n\t\torderStep,\n\t\torderItems,\n\t\tsetOrderStep,\n\t\tsetIsOrderOpen,\n\t\tsetTrackingId,\n\t\tupdateOrderErrors,\n\t\tresetErrors,\n\t} = useOrderContext();\n\tconst { setModal } = useModalContext();\n\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst availableCustomer = customerHooks.useAvailableCustomer();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst orderPayload = orderHooks.usePrepareOrder();\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst orderNote = order?.note;\n\tconst hasOrderNote = !!orderNote;\n\tconst showOrderNote = isOrderEnabled && orderStep === orderModels.OrderStep.CART;\n\tconst isServing = isOpen || isDelivering;\n\tconst isSubmitDisabled = !!orderError || !isServing;\n\n\tconst closeDrawer = () => setIsOrderOpen(false);\n\tconst handleAddNote = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_NOTES, params: { note: orderNote } });\n\t};\n\n\tconst createOrder = async (): Promise<string> => {\n\t\ttry {\n\t\t\tsetAPIError(\"\");\n\t\t\tsetIsLoading(true);\n\t\t\tconst response = await orderServices.createOrder(orderPayload);\n\t\t\treturn response.trackingId;\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t});\n\n\t\t\treturn \"\";\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst goToNextStep = async () => {\n\t\t// Check if customer is logged in\n\t\tif (isEmpty(availableCustomer)) {\n\t\t\treturn setModal({\n\t\t\t\tid: viewConstants.MODALS.AUTH,\n\t\t\t});\n\t\t}\n\n\t\tresetErrors();\n\n\t\tif (orderStep === orderModels.OrderStep.DETAILS) {\n\t\t\tif (\n\t\t\t\torder.orderType === orderModels.OrderType.DELIVERY &&\n\t\t\t\tisEmpty(availableCustomer?.addresses)\n\t\t\t) {\n\t\t\t\treturn updateOrderErrors(\"customer\");\n\t\t\t}\n\n\t\t\tif (order.orderType === orderModels.OrderType.DINE_IN && !order?.tableId) {\n\t\t\t\treturn updateOrderErrors(\"tableId\");\n\t\t\t}\n\n\t\t\tif (isEmpty(orderItems)) {\n\t\t\t\treturn updateOrderErrors(\"items\");\n\t\t\t}\n\n\t\t\tconst orderTrackingId = await createOrder();\n\n\t\t\tif (!orderTrackingId) return;\n\n\t\t\tsetTrackingId(orderTrackingId);\n\t\t}\n\n\t\tconst currentStepIndex =\n\t\t\torderConstants.ORDER_STEPS.findIndex((step) => step === orderStep) || 0;\n\n\t\tconst nextStepIndex = currentStepIndex + 1;\n\n\t\tif (nextStepIndex >= orderConstants.ORDER_STEPS.length) return;\n\n\t\tconst nextStep = orderConstants.ORDER_STEPS[nextStepIndex];\n\t\tsetOrderStep(nextStep);\n\t};\n\n\tconst getActionText = () => {\n\t\tif (!isOrderEnabled) return \"Subtotal\";\n\n\t\tif (!isServing) return \"Closed Now\";\n\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.CART:\n\t\t\t\treturn \"Go to checkout\";\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn \"Place order\";\n\n\t\t\tdefault:\n\t\t\t\treturn \"Continue\";\n\t\t}\n\t};\n\n\tconst orderStepperAction = isOrderEnabled && isServing ? goToNextStep : null;\n\n\treturn (\n\t\t<Column className={styles.footer} fullWidth>\n\t\t\t{!!apiError && (\n\t\t\t\t<AlertBox message={tError(apiError)} type=\"error\" onClear={() => setAPIError(\"\")} />\n\t\t\t)}\n\t\t\t{!!orderError && <TextBanner text={orderError} type={UIElementType.DANGER} fullWidth />}\n\t\t\t{showOrderNote && (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={\n\t\t\t\t\t\thasOrderNote ? (\n\t\t\t\t\t\t\t<Text>{order.note}</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t<Text>{t(\"Add an order note\")}</Text>\n\t\t\t\t\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t\t\t\t\t{t(\"Special instructions, allergies, etc.\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tonClick={handleAddNote}\n\t\t\t\t\tsize=\"xxxl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttype={UIElementType.LIGHT}\n\t\t\t\t\tclassName={styles.noteButton}\n\t\t\t\t\ticon={hasOrderNote ? Edit : Plus}\n\t\t\t\t\ticonSize=\"md\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={t(\"Add items\")}\n\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t/>\n\t\t\t) : orderStep !== orderModels.OrderStep.COMPLETED ? (\n\t\t\t\t<OrderStepper\n\t\t\t\t\tactionText={t(getActionText())}\n\t\t\t\t\tonClick={orderStepperAction}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tisDisabled={isSubmitDisabled}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerFooter;\n","import { API } from \"src/services/api\";\n\nimport { OrderPayload } from \"./models\";\n\nexport const createOrder = async (\n\torder: OrderPayload\n): Promise<{\n\ttrackingId: string;\n}> => {\n\treturn API.post(\"customer/order\", order);\n};\n","import { SIZE } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductQuantity.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { hooks as productHooks } from \"src/modules/product\";\n\nimport Quantity from \"src/components/Quantity\";\n\ninterface Props {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tmin?: number;\n\tsize?: SIZE;\n\tisDisabled: boolean;\n}\n\nconst ProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tmin = 1,\n\tsize = \"md\",\n\tselectedAddons,\n\tisDisabled = false,\n}: Props) => {\n\tconst quantity = productHooks.useProductQuantity({ productId, variantId, selectedAddons });\n\tconst product = productHooks.useProductById(productId);\n\tconst { updateProduct } = useOrderContext();\n\n\tconst isDecreaseDisabled = quantity === min;\n\n\tif (isDisabled) {\n\t\treturn <div className={styles.quantity}>{quantity}</div>;\n\t}\n\n\treturn (\n\t\t<Quantity\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tonDecrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity - 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tonIncrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity + 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tquantity={quantity}\n\t\t\tsize={size}\n\t\t/>\n\t);\n};\nexport default ProductQuantity;\n","import { ReactNode } from \"react\";\nimport { Text } from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ntype Props = {\n\titem: orderModels.OrderItem;\n\tproduct: productModels.Product;\n\tlanguage: string;\n};\n\nconst OrderItemOptionsInfo = ({ item, product, language }: Props): ReactNode => {\n\treturn (\n\t\t<>\n\t\t\t{(item.addons || []).map(({ addonId, options }) => {\n\t\t\t\tconst addon = productUtils.getProductAddon(product, addonId);\n\t\t\t\tconst addonOptions = addon?.options || [];\n\t\t\t\tconst selectedOptions = addonOptions.filter((option) =>\n\t\t\t\t\toptions?.some(({ optionId }) => optionId === option.id)\n\t\t\t\t);\n\n\t\t\t\tif (isEmpty(addon) || isEmpty(selectedOptions)) return null;\n\n\t\t\t\tconst addonTitle = addonUtils.getAddonTranslation(addon, language)?.title;\n\t\t\t\tconst optionTitles = selectedOptions\n\t\t\t\t\t.map((option) => addonUtils.getAddonOptionTranslation(option, language)?.title)\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.join(\", \");\n\n\t\t\t\tif (!addonTitle || !optionTitles) return null;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Text color=\"muted\" size=\"xs\" key={addonId}>\n\t\t\t\t\t\t{addonTitle}: {optionTitles}\n\t\t\t\t\t</Text>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default OrderItemOptionsInfo;\n","import { Column, Row, Text } from \"@sorocraft/ui\";\nimport { useMemo } from \"react\";\n\nimport styles from \"./OrderListItem.module.scss\";\n\nimport { models as orderModels, utils as orderUtils, hooks as orderHooks } from \"src/modules/order\";\nimport { utils as productUtils, hooks as productHooks } from \"src/modules/product\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport ProductQuantity from \"../ProductQuantity\";\nimport OrderItemOptionsInfo from \"./OptionsInfo\";\n\ninterface Props {\n\titem: orderModels.OrderItem;\n\tisDisabled: boolean;\n}\n\nconst OrderListItem = ({ item, isDisabled = false }: Props) => {\n\tconst { productId } = item || {};\n\tconst variantId = item?.variant?.variantId;\n\tconst selectedAddons = orderUtils.getSelectedAddonsFromOrderItems(item);\n\tconst product = productHooks.useProductById(productId);\n\tconst variant = productUtils.getProductVariant(product, variantId);\n\tconst language = businessHooks.useLanguage();\n\tconst { image160 } = product;\n\tconst { title: variantTitle } = productUtils.getProductVariantTranslation(variant, language);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = orderHooks.useOrderItemPrice(item);\n\n\treturn (\n\t\t<Row className={styles.container} gap={1} alignItems=\"flex-start\">\n\t\t\t{image160 && (\n\t\t\t\t<img\n\t\t\t\t\tsrc={viewUtils.getImageSource(image160)}\n\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\twidth={80}\n\t\t\t\t\theight={45}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div className={styles.data}>\n\t\t\t\t<div className={styles.name}>{name}</div>\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t{!!variantTitle && (\n\t\t\t\t\t\t<Text color=\"muted\" size=\"xs\">\n\t\t\t\t\t\t\t{variantTitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t<OrderItemOptionsInfo item={item} product={product} language={language} />\n\t\t\t\t</Column>\n\t\t\t\t<div className={styles.price}>{formattedTotalPrice}</div>\n\t\t\t</div>\n\t\t\t<ProductQuantity\n\t\t\t\tproductId={productId}\n\t\t\t\tvariantId={variantId}\n\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tmin={0}\n\t\t\t\tisDisabled={isDisabled}\n\t\t\t/>\n\t\t</Row>\n\t);\n};\nexport default OrderListItem;\n","import { Column, Text, Description } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst OrderNoItems = () => {\n\tconst { t } = useTranslation(\"order\");\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.noItems}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<Text variant=\"h2\">{t(\"Empty order\")}</Text>\n\t\t\t<Description text={t(\"You don't have any items in your order\")} />\n\t\t</Column>\n\t);\n};\nexport default OrderNoItems;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderListItem from \"../OrderListItem\";\nimport OrderNoItems from \"./OrderNoItems\";\n\ninterface Props {\n\tisDisabled?: boolean;\n}\n\nconst OrderItemsList = ({ isDisabled = false }: Props) => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<OrderNoItems />\n\t\t\t) : (\n\t\t\t\t<div className={styles.items}>\n\t\t\t\t\t{Object.entries(orderItems || {}).map(([itemId, item]) => (\n\t\t\t\t\t\t<OrderListItem key={itemId} item={item} isDisabled={isDisabled} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default OrderItemsList;\n","import styles from \"./OrderDrawer.module.scss\";\n\nimport OrderItemsList from \"../OrderItemsList\";\n\nconst OrderDrawerCart = () => (\n\t<div className={styles.content}>\n\t\t<OrderItemsList />\n\t</div>\n);\nexport default OrderDrawerCart;\n","import { Text, UIElementType } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst NoAddressContent = () => {\n\tconst { t } = useTranslation(\"customer\");\n\n\treturn <Text color={UIElementType.DANGER}>{t(\"No address available\")}</Text>;\n};\nexport default NoAddressContent;\n","import { Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as customerHooks, utils as customerUtils } from \"src/modules/customer\";\n\nconst AddressContent = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { t } = useTranslation(\"customer\");\n\tconst { additionalNumber, street, houseNumber, cityName, countryCode } = address;\n\tconst firstLine = customerUtils.formatAddressLine(street, houseNumber, additionalNumber);\n\tconst secondLine = customerUtils.formatCityLine([cityName, countryCode]);\n\n\treturn (\n\t\t<>\n\t\t\t<Text>{firstLine || t(\"Unknown address\")}</Text>\n\t\t\t{secondLine && (\n\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t{secondLine}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</>\n\t);\n};\nexport default AddressContent;\n","import { Column, Row, SVGIcon, useModalContext } from \"@sorocraft/ui\";\nimport { Edit, MarkerPin } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./CustomerAddress.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\n\nimport NoAddressContent from \"./NoAddressContent\";\nimport AddressContent from \"./AddressContent\";\n\nconst CustomerAddress = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { setModal } = useModalContext();\n\n\tconst updateAddress = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_ADDRESS });\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={updateAddress}>\n\t\t\t<Row fullWidth alignItems=\"center\">\n\t\t\t\t<SVGIcon icon={MarkerPin} size=\"md\" />\n\t\t\t\t<Column gap={0} fullWidth>\n\t\t\t\t\t{isEmpty(address) ? <NoAddressContent /> : <AddressContent />}\n\t\t\t\t</Column>\n\t\t\t\t<SVGIcon icon={Edit} size=\"sm\" />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\n\nexport default CustomerAddress;\n","export enum TableShape {\n\tSQUARE = \"SQUARE\",\n\tCIRCLE = \"CIRCLE\",\n\tRECTANGLE = \"RECTANGLE\",\n\tRECTANGLE_VERTICAL = \"RECTANGLE_VERTICAL\",\n\tSINGLE_AT_BAR = \"SINGLE_AT_BAR\",\n\tOTHER = \"OTHER\",\n}\n\nexport enum TableStatus {\n\tVACANT = \"VACANT\", // Free and available\n\tRESERVED = \"RESERVED\", // Booked but not yet seated\n\tOCCUPIED = \"OCCUPIED\", // Currently in use\n\tBLOCKED = \"BLOCKED\", // Temporarily blocked/unavailable\n\tNEEDS_CLEANING = \"NEEDS_CLEANING\", // Dirty, awaiting cleanup\n\tOUT_OF_SERVICE = \"OUT_OF_SERVICE\", // Permanently unavailable repair/maintenance\n\tPENDING_CONFIRMATION = \"PENDING_CONFIRMATION\", // Reservation not yet confirmed\n\tNO_SHOW = \"NO_SHOW\", // Reserved but guest didn’t arrive\n}\n\nexport enum TableLocation {\n\t// Indoor\n\tMAIN_HALL = \"MAIN_HALL\",\n\tPRIVATE_DINING = \"PRIVATE_DINING\",\n\tVIP_ROOM = \"VIP_ROOM\",\n\tBANQUET_HALL = \"BANQUET_HALL\",\n\tBAR_AREA = \"BAR_AREA\",\n\tLOUNGE = \"LOUNGE\",\n\tOPEN_KITCHEN = \"OPEN_KITCHEN\",\n\tBOOTH_SECTION = \"BOOTH_SECTION\",\n\tMEZZANINE = \"MEZZANINE\",\n\tWINE_CELLAR = \"WINE_CELLAR\",\n\n\t// Outdoor\n\tTERRACE = \"TERRACE\",\n\tPATIO = \"PATIO\",\n\tGARDEN = \"GARDEN\",\n\tCOURTYARD = \"COURTYARD\",\n\tROOFTOP = \"ROOFTOP\",\n\tBALCONY = \"BALCONY\",\n\tSIDEWALK = \"SIDEWALK\",\n\tPOOLSIDE = \"POOLSIDE\",\n\n\t// Special Sections\n\tSMOKING_AREA = \"SMOKING_AREA\",\n\tNON_SMOKING = \"NON_SMOKING\",\n\tFAMILY_SECTION = \"FAMILY_SECTION\",\n\tKIDS_AREA = \"KIDS_AREA\",\n\tWAITING_AREA = \"WAITING_AREA\",\n\tDANCE_FLOOR = \"DANCE_FLOOR\",\n}\n\nexport interface Table {\n\tid: number;\n\tbusinessId: number;\n\tbranchId: number;\n\tname: string;\n\tseatCount: number;\n\tshape: TableShape;\n\tlocation: TableLocation;\n\tstatus: TableStatus;\n}\n\nexport interface TableState {\n\ttables: Table[];\n}\n\nexport type TableForm = Omit<Table, \"id\" | \"businessId\" | \"branchId\"> & {\n\tbranchId: string | number;\n};\n\nexport type TableUpdate = Partial<Omit<Table, \"id\" | \"businessId\">>;\n\nexport type TableFilter = Partial<Pick<Table, \"branchId\" | \"shape\" | \"location\" | \"status\">>;\n\nexport type TableFilterParams = { field: keyof TableFilter; value: TableFilter[keyof TableFilter] };\n","import {\n\tColumn,\n\tRow,\n\tText,\n\tInput,\n\tInputType,\n\tSelectOption,\n\tUIElementType,\n\tonChangeEventType,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderTable.module.scss\";\n\nimport { models as tableModels } from \"src/modules/table\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useCallback } from \"react\";\n\ninterface Props {\n\tpreDefinedTable: tableModels.Table;\n\ttableOptions: SelectOption[];\n\tselectedTableId: number;\n\terror?: string;\n\tdisableIfPreDefined?: boolean;\n\tlanguage?: string;\n\tonChange: (tableId: number | null) => void;\n}\n\nconst OrderTableUI = ({\n\tpreDefinedTable,\n\ttableOptions,\n\tselectedTableId,\n\terror,\n\tdisableIfPreDefined,\n\tlanguage,\n\tonChange,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst hasPreDefinedTable = !isEmpty(preDefinedTable);\n\n\tconst handleTableChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tonChange(Number(e?.target?.value) || null);\n\t\t},\n\t\t[onChange]\n\t);\n\n\treturn (\n\t\t<Column className={styles.table} fullWidth gap={0.5}>\n\t\t\t<Row fullWidth>\n\t\t\t\t{hasPreDefinedTable && disableIfPreDefined ? (\n\t\t\t\t\t<Text variant=\"bold\">{preDefinedTable.name}</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tname=\"tableId\"\n\t\t\t\t\t\toptions={tableOptions}\n\t\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\t\tclassName={styles.tableInput}\n\t\t\t\t\t\tvalue={selectedTableId}\n\t\t\t\t\t\tonChange={handleTableChange}\n\t\t\t\t\t\tisDisabled={hasPreDefinedTable}\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tplaceholder={t(\"Select Table\")}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{error && <Text color={UIElementType.DANGER}>{t(error)}</Text>}\n\t\t</Column>\n\t);\n};\nexport default OrderTableUI;\n","import { SelectOption } from \"@sorocraft/ui\";\n\nimport { hooks as tableHooks } from \"src/modules/table\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderTableUI from \"./OrderTableUI\";\n\nconst OrderTable = () => {\n\tconst preDefinedTable = tableHooks.usePreDefinedTable();\n\tconst tables = tableHooks.useList();\n\tconst { order, updateOrder, errors } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\n\tconst tableOptions: SelectOption[] = tables.map(({ id, name }) => ({\n\t\tlabel: name,\n\t\tvalue: id,\n\t}));\n\n\treturn (\n\t\t<OrderTableUI\n\t\t\tonChange={(tableId) => updateOrder({ tableId })}\n\t\t\tpreDefinedTable={preDefinedTable}\n\t\t\ttableOptions={tableOptions}\n\t\t\tselectedTableId={order?.tableId}\n\t\t\terror={errors?.tableId}\n\t\t\tlanguage={language}\n\t\t\tdisableIfPreDefined\n\t\t/>\n\t);\n};\nexport default OrderTable;\n","import { Method, Row, SVGIcon, Tooltip, Text, MethodSelection, SIZE_LONG } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderMethods.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\nimport { OrderTypeForMethods } from \"./OrderMethods.types\";\n\ninterface Props {\n\torderTypes: OrderTypeForMethods[];\n\torderType: orderModels.OrderType;\n\tsize?: SIZE_LONG;\n\tonSelect: (method: string | number) => void;\n}\n\nconst OrderMethods = ({ orderTypes, orderType, size, onSelect }: Props) => {\n\tconst { t } = useTranslation(\"error\");\n\n\tconst getOrderMethodTooltipPosition = (index: number) => {\n\t\tif (index === 0) return \"right\";\n\t\tif (index + 1 === orderTypes.length) return \"left\";\n\n\t\treturn \"bottom\";\n\t};\n\n\tconst createOrderMethod = (\n\t\t{ type, icon, title, isDisabled }: OrderTypeForMethods,\n\t\tindex: number\n\t): Method => ({\n\t\tvalue: type,\n\t\tisDisabled,\n\t\tlabel: (\n\t\t\t<Tooltip\n\t\t\t\thint={isDisabled ? t(\"ORDER_TYPE_DISABLED_AT_THIS_TIME\") : null}\n\t\t\t\tposition={getOrderMethodTooltipPosition(index)}\n\t\t\t>\n\t\t\t\t<Row gap={0.5} flexWrap=\"nowrap\">\n\t\t\t\t\t<SVGIcon icon={icon} />\n\t\t\t\t\t<Text color={type === orderType && !isDisabled ? \"white\" : \"normal\"} whiteSpace=\"nowrap\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</Text>\n\t\t\t\t</Row>\n\t\t\t</Tooltip>\n\t\t),\n\t});\n\n\tconst orderMethods: Method[] = orderTypes.reduce<Method[]>((methods, order, index) => {\n\t\tif (!order.isVisible) return methods;\n\t\tmethods.push(createOrderMethod(order, index));\n\t\treturn methods;\n\t}, []);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<MethodSelection\n\t\t\t\tmethods={orderMethods}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tselectedMethod={orderType}\n\t\t\t\tfullWidth\n\t\t\t\tsize={size}\n\t\t\t\tgap={0.5}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderMethods;\n","import { Column, Row, SIZE, Text } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderPaymentSummary.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\ttextSize: SIZE;\n\ttotalPriceWithoutTax: number;\n\ttotalPriceWithTax: number;\n\tdeliveryFee: number;\n\ttotalTax: number;\n\tcurrency: string;\n\tlanguage: string;\n\torderType: orderModels.OrderType;\n}\n\nconst OrderPaymentSummary = ({\n\ttextSize,\n\ttotalPriceWithoutTax = 0,\n\ttotalPriceWithTax = 0,\n\tdeliveryFee = 0,\n\ttotalTax,\n\tcurrency,\n\tlanguage,\n\torderType,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst totalPriceWithoutTaxFormatted = priceFormatter(totalPriceWithoutTax, currency, language);\n\tconst totalPriceWithTaxFormatted = priceFormatter(totalPriceWithTax, currency, language);\n\tconst totalTaxFormatted = priceFormatter(totalTax, currency, language);\n\tconst deliveryFeeFormatted = priceFormatter(deliveryFee, currency, language);\n\n\treturn (\n\t\t<Column className={styles.container} fullWidth gap={0}>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Items\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalPriceWithoutTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Tax\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && (\n\t\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t\t<Text size={textSize}>{t(\"Delivery Fee\")}</Text>\n\t\t\t\t\t<Text size={textSize}>{deliveryFeeFormatted}</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{t(\"Total\")}\n\t\t\t\t</Text>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{totalPriceWithTaxFormatted}\n\t\t\t\t</Text>\n\t\t\t</Row>\n\t\t</Column>\n\t);\n};\nexport default OrderPaymentSummary;\n","import { Accordion, Column, Input, InputType, Method, Padding, Row } from \"@sorocraft/ui\";\nimport { Delivery, Grid, ShoppingBag } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nimport CustomerAddress from \"../Customer/CustomerAddress\";\nimport OrderItemsList from \"../OrderItemsList\";\nimport OrderTable from \"./OrderTable\";\nimport OrderMethods from \"../OrderMethods\";\nimport { OrderTypeForMethods } from \"../OrderMethods/OrderMethods.types\";\nimport OrderPaymentSummary from \"../OrderPaymentSummary\";\n\nconst OrderDrawerDetails = () => {\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst {\n\t\torder: { orderType, paymentMethod },\n\t\tupdateOrder,\n\t} = useOrderContext();\n\tconst { totalPriceWithTaxAndFees, totalPriceWithoutTax, totalTax } =\n\t\torderHooks.useOrderPriceDetails();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled, deliveryFeeAmount } =\n\t\tbranchHooks.useBranchSettings();\n\tconst { t } = useTranslation(\"order\");\n\n\tconst orderTypes: OrderTypeForMethods[] = [\n\t\t{\n\t\t\ttype: orderModels.OrderType.DELIVERY,\n\t\t\ticon: Delivery,\n\t\t\ttitle: t(\"Delivery\"),\n\t\t\tisDisabled: !isDelivering,\n\t\t\tisVisible: deliveryOrderEnabled,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.DINE_IN,\n\t\t\ticon: Grid,\n\t\t\ttitle: t(\"Dine in\"),\n\t\t\tisDisabled: !isOpen,\n\t\t\tisVisible: dineInOrderEnabled,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.PICK_UP,\n\t\t\ticon: ShoppingBag,\n\t\t\ttitle: t(\"Pickup\"),\n\t\t\tisDisabled: !isOpen,\n\t\t\tisVisible: pickupOrderEnabled,\n\t\t},\n\t];\n\n\tconst paymentMethods: Method[] = [\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CASH,\n\t\t\tlabel: t(\"Cash\"),\n\t\t},\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CARD,\n\t\t\tlabel: t(\"Card\"),\n\t\t},\n\t];\n\n\treturn (\n\t\t<Column className={styles.content} gap={1}>\n\t\t\t<OrderMethods\n\t\t\t\torderTypes={orderTypes}\n\t\t\t\torderType={orderType}\n\t\t\t\tsize=\"small\"\n\t\t\t\tonSelect={(method) => updateOrder({ orderType: method as orderModels.OrderType })}\n\t\t\t/>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && <CustomerAddress />}\n\t\t\t{orderType === orderModels.OrderType.DINE_IN && (\n\t\t\t\t<Padding paddingInline={1} fullWidth>\n\t\t\t\t\t<OrderTable />\n\t\t\t\t</Padding>\n\t\t\t)}\n\t\t\t<Row className={styles.paymentMethods}>\n\t\t\t\t{paymentMethods.map(({ label, value }) => (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tlabel={label as string}\n\t\t\t\t\t\tname=\"paymentMethod\"\n\t\t\t\t\t\tonChange={() => updateOrder({ paymentMethod: value as orderModels.PaymentMethod })}\n\t\t\t\t\t\tchecked={paymentMethod === value}\n\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tkey={value}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Row>\n\t\t\t<Accordion\n\t\t\t\ttitle={t(\"Order summary\")}\n\t\t\t\tcontent={<OrderItemsList isDisabled />}\n\t\t\t\tfullWidth\n\t\t\t\tstyle=\"no-shadow\"\n\t\t\t\tnoPadding\n\t\t\t\theaderPaddingInline={1}\n\t\t\t\theaderPaddingBlock={1}\n\t\t\t\ttitleVariant=\"h5\"\n\t\t\t/>\n\t\t\t<OrderPaymentSummary\n\t\t\t\ttextSize=\"sm\"\n\t\t\t\ttotalPriceWithoutTax={totalPriceWithoutTax}\n\t\t\t\ttotalPriceWithTax={totalPriceWithTaxAndFees}\n\t\t\t\ttotalTax={totalTax}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t\tdeliveryFee={deliveryFeeAmount}\n\t\t\t\torderType={orderType}\n\t\t\t/>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerDetails;\n","import { Column, Link, Padding, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { Check } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as viewHooks } from \"src/modules/view\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst OrderDrawerCompleted = () => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { trackingId } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst hostname = viewHooks.useHostname();\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.content}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t>\n\t\t\t<SVGIcon icon={Check} size=\"xxl\" color={UIElementType.SUCCESS} />\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text variant=\"h1\" align=\"center\">\n\t\t\t\t\t{t(\"Your Order is Completed!\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text align=\"center\">\n\t\t\t\t\t{t(\"Thank you! We've received your order and it will be delivered shortly.\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={5} paddingBlock={2} fullWidth>\n\t\t\t\t<Link\n\t\t\t\t\thref={`https://${hostname}/${language}/order/${trackingId}`}\n\t\t\t\t\ttitle={t(\"Track order\")}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t/>\n\t\t\t</Padding>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerCompleted;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useRef, MouseEvent } from \"react\";\nimport { Drawer } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderDrawerFooter from \"./OrderDrawerFooter\";\nimport OrderDrawerCart from \"./OrderDrawerCart\";\nimport OrderDrawerDetails from \"./OrderDrawerDetails\";\nimport OrderDrawerCompleted from \"./OrderDrawerCompleted\";\n\nconst OrderDrawer = () => {\n\tconst { isOrderOpen, orderItems } = useOrderContext();\n\tconst { orderStep, setOrderStep, resetOrder } = useOrderContext();\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\");\n\tconst orderErrorInDetails = orderHooks.useOrderErrorInDetails();\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst hasOrderErrorInDetails = !!orderErrorInDetails;\n\tconst hasLargeFooter =\n\t\tisOrderEnabled && (orderStep === orderModels.OrderStep.CART || hasOrderErrorInDetails);\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\tconst closeDrawer = () => {\n\t\tresetOrder();\n\t};\n\n\tconst handleClickOutside = (event: MouseEvent<HTMLElement>) => {\n\t\tif (!contentRef?.current?.contains?.(event?.target as Node)) {\n\t\t\tcloseDrawer();\n\t\t}\n\t};\n\n\tconst handleBack = () => {\n\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t};\n\n\tconst renderContent = () => {\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn <OrderDrawerDetails />;\n\n\t\t\tcase orderModels.OrderStep.COMPLETED:\n\t\t\t\treturn <OrderDrawerCompleted />;\n\n\t\t\tdefault:\n\t\t\t\treturn <OrderDrawerCart />;\n\t\t}\n\t};\n\n\tif (!isOrderOpen) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Drawer\n\t\t\t\tref={contentRef}\n\t\t\t\tonClose={closeDrawer}\n\t\t\t\tisOpen={isOrderOpen}\n\t\t\t\ttitle={t(\"Your order\")}\n\t\t\t\tonBack={orderStep === orderModels.OrderStep.CART ? undefined : handleBack}\n\t\t\t\tcontent={renderContent()}\n\t\t\t\tfooter={\n\t\t\t\t\t<OrderDrawerFooter\n\t\t\t\t\t\tisOrderItemsEmpty={isOrderItemsEmpty}\n\t\t\t\t\t\torderError={orderErrorInDetails}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\thasLargeFooter={hasLargeFooter}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderDrawer;\n","import { RefObject, useEffect, memo, useState } from \"react\";\nimport { Column, DivElementMap, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\nimport { Grid, List } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Products.module.scss\";\n\nimport { utils as productUtils, models as productModels } from \"src/modules/product\";\nimport { utils as categoryUtils } from \"src/modules/category\";\nimport { models as menuModels } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport ProductsListItem from \"../ProductsListItem\";\nimport { ProductsGridItemContainer } from \"../ProductsGridItem\";\nimport ProductDetails from \"../ProductDetails\";\nimport FloatingOrdersButton from \"../FloatingOrdersButton\";\nimport OrderDrawer from \"../OrderDrawer\";\n\ninterface Props {\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcontainerRef: RefObject<HTMLDivElement>;\n\tcurrency: string;\n\tlanguage: string;\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({\n\t\tcategoryProductMap = [],\n\t\tcurrency,\n\t\tlanguage,\n\t\tproductBlocksRef,\n\t\tcontainerRef,\n\t\tonCategoryInView,\n\t}: Props) => {\n\t\tconst [selectedProduct, setSelectedProduct] = useState<productModels.Product | null>(null);\n\t\tconst [view, setView] = useState<productModels.ProductView>(productModels.ProductView.LIST);\n\n\t\tconst views = [\n\t\t\t{\n\t\t\t\ticon: List,\n\t\t\t\ttype: productModels.ProductView.LIST,\n\t\t\t},\n\t\t\t{\n\t\t\t\ticon: Grid,\n\t\t\t\ttype: productModels.ProductView.GRID,\n\t\t\t},\n\t\t];\n\n\t\tconst handleSelectView = (type: productModels.ProductView) => {\n\t\t\tsetView(type);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_VIEW_CHANGED, { name: type });\n\t\t};\n\n\t\tconst handleSelectProduct = (product: productModels.Product) => {\n\t\t\tconst { name } = productUtils.getProductTranslation(product, language);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_DETAILS, { name });\n\n\t\t\tsetSelectedProduct(product);\n\t\t};\n\n\t\tuseEffect(() => {\n\t\t\t// Create an IntersectionObserver instance\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\t// Calculate the center of the viewport\n\t\t\t\t\tconst viewportCenter = (containerRef?.current?.clientHeight || 1000) / 2;\n\n\t\t\t\t\tlet closestCategoryId: string | null = null;\n\t\t\t\t\tlet closestDistance = Infinity;\n\n\t\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\t\tconst rect = entry.boundingClientRect;\n\t\t\t\t\t\t\tconst elementCenter = rect.top + rect.height / 2;\n\t\t\t\t\t\t\tconst distanceToCenter = Math.abs(elementCenter - viewportCenter);\n\n\t\t\t\t\t\t\t// Check if this element is closer to the center\n\t\t\t\t\t\t\tif (distanceToCenter < closestDistance) {\n\t\t\t\t\t\t\t\tclosestDistance = distanceToCenter;\n\t\t\t\t\t\t\t\tclosestCategoryId = entry.target.getAttribute(\"data-category-id\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// Update the active category if it has changed\n\t\t\t\t\tif (closestCategoryId) {\n\t\t\t\t\t\tonCategoryInView(Number(closestCategoryId));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthreshold: 0.1, // Adjust as needed (10% visibility)\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// Observe each product block\n\t\t\tObject.entries(productBlocksRef.current || {}).forEach(([categoryId, element]) => {\n\t\t\t\tif (element) {\n\t\t\t\t\telement.setAttribute(\"data-category-id\", categoryId); // Add a data attribute\n\t\t\t\t\tobserver.observe(element);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\t// Cleanup the observer\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, containerRef, onCategoryInView]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Row className={styles.view} alignItems=\"center\">\n\t\t\t\t\t{views.map(({ icon, type }) => (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tkey={type}\n\t\t\t\t\t\t\ticon={icon}\n\t\t\t\t\t\t\tonClick={() => handleSelectView(type)}\n\t\t\t\t\t\t\ttype={type === view ? UIElementType.PRIMARY : UIElementType.DEFAULT}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<Column>\n\t\t\t\t\t{(categoryProductMap || []).map((category) => {\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\t\t\t\t\t\tconst { id, products } = category;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\tif (el) {\n\t\t\t\t\t\t\t\t\t\tproductBlocksRef!.current![id] = el;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-category-id={id}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t\t\t{(products || []).map((product) => {\n\t\t\t\t\t\t\t\t\t\t\tif (view === productModels.ProductView.GRID) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ProductsGridItemContainer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t\t<ProductDetails product={selectedProduct} onClose={() => setSelectedProduct(null)} />\n\t\t\t\t<FloatingOrdersButton />\n\t\t\t\t<OrderDrawer />\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.categoryProductMap === nextProps.categoryProductMap &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t}\n);\n\nProducts.displayName = \"Products\";\n\nexport default Products;\n","import { RefObject, useCallback, useEffect, useRef, useState } from \"react\";\nimport { DivElementMap } from \"@sorocraft/ui\";\nimport { isEmpty, trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./MenuContent.module.scss\";\n\nimport { hooks as productHooks } from \"src/modules/product\";\nimport { hooks as categoryHooks, utils as categoryUtils } from \"src/modules/category\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as menuUtils } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport Categories from \"../Categories\";\nimport Products from \"../Products\";\n\ninterface Props {\n\tcontainerRef: RefObject<HTMLDivElement>;\n}\n\nconst MenuContent = ({ containerRef }: Props) => {\n\tconst products = productHooks.useList();\n\tconst categories = categoryHooks.useList();\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\n\tconst categoryProductMap = menuUtils.prepareCategoryAndProductMap(categories, products);\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\n\tconst canUserScroll = useRef<boolean>(true);\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\n\t\tif (!productBlock) return;\n\n\t\tsetTimeout(() => {\n\t\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t\t}, 100);\n\n\t\tsetTimeout(() => {\n\t\t\tcanUserScroll.current = true;\n\t\t}, 1000);\n\t};\n\n\tconst handleSelectCategory = useCallback(async (categoryId: number) => {\n\t\tcanUserScroll.current = false;\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t}, []);\n\n\tconst handleCategoryInView = useCallback(\n\t\t(categoryId: number) => {\n\t\t\tif (!canUserScroll?.current) return;\n\t\t\tconst name = categoryUtils.getCategoryNameById(categoryId, categories, language);\n\t\t\ttrackEvent(analyticsConstants.CATEGORY_SCROLLED, { name });\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t},\n\t\t[categories, language]\n\t);\n\n\tconst handleCategoryFromURL = useCallback(async () => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tconst searchParams = new URLSearchParams(window.location.search);\n\t\tconst categoryIdFromURL = Number(searchParams.get(\"category\"));\n\t\tif (!categoryIdFromURL) return;\n\n\t\tconst categoryToSelect = (categories || []).find(({ id }) => id === categoryIdFromURL);\n\t\tif (isEmpty(categoryToSelect)) return;\n\n\t\thandleSelectCategory(categoryIdFromURL);\n\t}, [categories, handleSelectCategory]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line react-hooks/set-state-in-effect\n\t\thandleCategoryFromURL();\n\t}, [handleCategoryFromURL]);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Categories\n\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\tlanguage={language}\n\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t/>\n\t\t\t<Products\n\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\tcontainerRef={containerRef}\n\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default MenuContent;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nimport { Category } from \"./models\";\nimport { getCategoryTranslation } from \"./utils\";\n\nexport const useList = (): Category[] => {\n\tconst { categories } = useStoreContext();\n\n\treturn categories || [];\n};\n\nexport const useCategoryNameById = (categoryId: number): string => {\n\tconst { categories } = useStoreContext() || {};\n\tconst language = businessHooks.useLanguage();\n\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name;\n};\n","import * as categoryModels from \"src/modules/category/models\";\nimport * as productModels from \"src/modules/product/models\";\n\nimport { CategoryProductMap } from \"./models\";\n\nexport const prepareCategoryAndProductMap = (\n\tcategories: categoryModels.Category[],\n\tproducts: productModels.Product[]\n): CategoryProductMap[] => {\n\tconst productMap = products.reduce<Record<number, productModels.Product[]>>((map, product) => {\n\t\tif (!product.visible) return map;\n\n\t\tconst categoryId = Number(product.categoryId);\n\t\tif (!map[categoryId]) {\n\t\t\tmap[categoryId] = [];\n\t\t}\n\t\tmap[categoryId].push(product);\n\t\treturn map;\n\t}, {});\n\n\treturn categories\n\t\t.map((category) => ({\n\t\t\t...category,\n\t\t\tproducts: (productMap[Number(category.id)] || []) as productModels.Product[],\n\t\t}))\n\t\t.filter((category) => category?.products?.length > 0);\n};\n","import { ModalProvider, ModalsMap } from \"@sorocraft/ui\";\nimport { useEffect, useRef } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport { models as menuModels } from \"src/modules/menu\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { StoreProvider } from \"src/store\";\n\nimport { constants as viewConstants, hooks as viewHooks } from \"src/modules/view\";\nimport { OrderProvider, useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nimport Header from \"./Header\";\nimport AddUpdateNote from \"./Modals/AddUpdateNote\";\nimport AuthModal from \"./Modals/Auth\";\nimport AddUpdateAddress from \"./Modals/AddUpdateAddress\";\nimport BranchBusinessHours from \"./Modals/BranchBusinessHours\";\nimport ScrollToTop from \"../ScrollToTop\";\nimport Branches from \"./Branches\";\nimport MenuContent from \"./MenuContent\";\n\nconst MODALS_MAP: ModalsMap = {\n\t[viewConstants.MODALS.ADD_UPDATE_NOTES]: AddUpdateNote,\n\t[viewConstants.MODALS.AUTH]: AuthModal,\n\t[viewConstants.MODALS.ADD_UPDATE_ADDRESS]: AddUpdateAddress,\n\t[viewConstants.MODALS.BRANCH_BUSINESS_HOURS]: BranchBusinessHours,\n};\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = () => {\n\tconst { getCustomer } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst hostname = viewHooks.useHostname();\n\tconst isInDashboard = viewHooks.useIsInDashboard();\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst branchId = branchHooks.useBranchId();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\tconst showMenu = hasSingleBranch || branchId;\n\n\tconst { url: baseUrl, domain } = viewUtils.getBaseUrl(hostname, language);\n\n\tuseEffect(() => {\n\t\tif (isInDashboard) return;\n\t\tgetCustomer();\n\t}, [getCustomer, isInDashboard]);\n\n\treturn (\n\t\t<div className={styles.container} ref={containerRef}>\n\t\t\t<Header />\n\t\t\t{showMenu ? <MenuContent containerRef={containerRef} /> : <Branches />}\n\n\t\t\t<ScrollToTop size=\"md\" zIndex={10} />\n\n\t\t\t{!!hostname && (\n\t\t\t\t<a rel=\"noopener noreferrer\" target=\"_blank\" href={baseUrl} className={styles.footer}>\n\t\t\t\t\t{domain}\n\t\t\t\t</a>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst PublicMenuWithContext = ({ data }: Props) => {\n\treturn (\n\t\t<StoreProvider value={data || ({} as menuModels.PublicMenuData)}>\n\t\t\t<OrderProvider>\n\t\t\t\t<ModalProvider modalsMap={MODALS_MAP}>\n\t\t\t\t\t<PublicMenu />\n\t\t\t\t</ModalProvider>\n\t\t\t</OrderProvider>\n\t\t</StoreProvider>\n\t);\n};\n\nexport default PublicMenuWithContext;\n","import {\n\tButton,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tRow,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\n\nimport styles from \"./AddUpdateNote.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateNote = ({ params }: ModalComponentProps) => {\n\tconst { modalRef, note } = params;\n\tconst [noteContent, setNoteContent] = useState<string>(note || \"\");\n\tconst { setModal } = useModalContext();\n\tconst { updateOrder } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSubmit = () => {\n\t\tupdateOrder({ note: noteContent });\n\t\tsetModal(null);\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\theader={<div>{t(\"Add an order note\")}</div>}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.container}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\ttype={InputType.TEXT_AREA}\n\t\t\t\t\t\tplaceholder={t(\n\t\t\t\t\t\t\t\"Specify any allergies, special requests, or ingredients you want to add or remove\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tvalue={noteContent}\n\t\t\t\t\t\tonChange={(e) => setNoteContent(e?.target?.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Row justifyContent=\"flex-end\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={tCommon(\"Cancel\")}\n\t\t\t\t\t\tonClick={closeModal}\n\t\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button label={tCommon(\"Save\")} onClick={handleSubmit} size=\"md\" />\n\t\t\t\t</Row>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateNote;\n","import {\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFormErrors,\n\tModal,\n\tModalComponentProps,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n} from \"src/modules/customer\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\nimport { logException } from \"src/modules/common/services\";\nimport { services as viewServices } from \"src/modules/view\";\n\nimport PhoneStep from \"./PhoneStep\";\nimport OTPStep from \"./OTPStep\";\nimport EmailStep from \"./EmailStep\";\n\nconst Auth = ({ params }: ModalComponentProps) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst { setOrderStep, getCustomer, customer } = useOrderContext();\n\n\tconst [form, setForm] = useState<customerModels.CustomerAuthForm>({\n\t\tphoneNumber: \"\",\n\t\totp: \"\",\n\t\temail: \"\",\n\t});\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState(\"\");\n\tconst [currentStep, setCurrentStep] = useState<customerModels.CustomerAuthStep>(\n\t\tcustomerModels.CustomerAuthStep.PHONE\n\t);\n\n\tconst steps = [\n\t\tcustomerModels.CustomerAuthStep.PHONE,\n\t\tcustomerModels.CustomerAuthStep.OTP,\n\t\tcustomerModels.CustomerAuthStep.EMAIL,\n\t];\n\n\tconst { modalRef } = params;\n\n\tconst handleClose = () => setModal(null);\n\n\tconst completeAuth = () => {\n\t\tsetOrderStep(orderModels.OrderStep.DETAILS);\n\t\tsetModal(null);\n\t};\n\n\tconst goToNextStep = () => {\n\t\tconst currentIndex = steps.indexOf(currentStep);\n\t\tconst nextStep = steps[currentIndex + 1];\n\t\tif (nextStep) return setCurrentStep(nextStep);\n\t\tcompleteAuth();\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(field: keyof customerModels.CustomerAuthForm) => (value: string) => {\n\t\t\tsetForm((prev) => ({ ...prev, [field]: value }));\n\t\t},\n\t\t[]\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\n\t\ttry {\n\t\t\tconst isEmailStep = currentStep === customerModels.CustomerAuthStep.EMAIL;\n\t\t\tconst emailUnchanged = customer?.email === form.email;\n\t\t\tconst emailCleared = !!customer?.email && !form.email;\n\n\t\t\t// Skip API call if email didn’t change\n\t\t\tif (isEmailStep && (emailUnchanged || emailCleared)) {\n\t\t\t\treturn goToNextStep();\n\t\t\t}\n\n\t\t\t// Validate form\n\t\t\tconst errors = customerUtils.validateForm(form, currentStep);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\n\t\t\tswitch (currentStep) {\n\t\t\t\tcase customerModels.CustomerAuthStep.PHONE: {\n\t\t\t\t\tconst response = await customerServices.loginCustomer(form.phoneNumber);\n\t\t\t\t\t// TODO: errors field gelir check ele. docs-da var.\n\t\t\t\t\tif (response?.status !== 200) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.OTP: {\n\t\t\t\t\tconst response = await customerServices.verifyOTP(form.otp, form.phoneNumber);\n\t\t\t\t\tif (!response?.accessToken) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tviewServices.storage.saveAuthToken(response);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.EMAIL: {\n\t\t\t\t\tconst response = await customerServices.update({ email: form.email });\n\t\t\t\t\tif (response?.status !== 200) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tawait getCustomer();\n\t\t\tgoToNextStep();\n\t\t} catch (error: any) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tlogException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/Auth/Auth.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst renderStep = () => {\n\t\tswitch (currentStep) {\n\t\t\tcase customerModels.CustomerAuthStep.OTP:\n\t\t\t\treturn (\n\t\t\t\t\t<OTPStep\n\t\t\t\t\t\taddress={form.phoneNumber}\n\t\t\t\t\t\terrorMessage={formErrors?.otp}\n\t\t\t\t\t\tonChange={handleChange(\"otp\")}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase customerModels.CustomerAuthStep.EMAIL:\n\t\t\t\treturn (\n\t\t\t\t\t<EmailStep\n\t\t\t\t\t\tonChange={handleChange(\"email\")}\n\t\t\t\t\t\tonCancel={completeAuth}\n\t\t\t\t\t\tformErrors={formErrors}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tdefault:\n\t\t\t\treturn <PhoneStep onChange={handleChange(\"phoneNumber\")} formErrors={formErrors} />;\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Create an account or log in\")}\n\t\t\tonClose={handleClose}\n\t\t\tcontent={\n\t\t\t\t<Column className={styles.content} fullWidth>\n\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{renderStep()}\n\t\t\t\t</Column>\n\t\t\t}\n\t\t\tfooter={<Button label={tCommon(\"Continue\")} onClick={handleSubmit} size=\"lg\" fullWidth />}\n\t\t/>\n\t);\n};\n\nexport default Auth;\n","import {\n\tAddressAutocomplete,\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFlex,\n\tFormErrors,\n\tGoogleSuggestion,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tonChangeEventType,\n\tText,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./AddUpdateAddress.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n\thooks as customerHooks,\n} from \"src/modules/customer\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateAddress = ({ params }: ModalComponentProps) => {\n\tconst initialCountryCode = viewConstants.SUPPORTED_COUNTRIES[0].code;\n\n\tconst { getCustomer } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst {\n\t\tid,\n\t\tcountryCode = initialCountryCode,\n\t\tcityName = \"\",\n\t\tstreet = \"\",\n\t\thouseNumber = \"\",\n\t\tfloor,\n\t\tadditionalNumber = \"\",\n\t\tinstructions = \"\",\n\t\tlongitude,\n\t\tlatitude,\n\t\tpostCode,\n\t} = customerHooks.useCustomerAddress();\n\n\tconst initalForm: customerModels.CustomerAddress = {\n\t\taddressId: id,\n\t\tcountryCode,\n\t\tcityName,\n\t\tstreet,\n\t\thouseNumber,\n\t\tadditionalNumber,\n\t\tinstructions,\n\t\tfloor,\n\t\tlatitude,\n\t\tlongitude,\n\t\tpostCode,\n\t};\n\n\tconst { modalRef } = params;\n\tconst { t } = useTranslation(\"customer\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst [form, setForm] = useState<customerModels.CustomerAddress>(initalForm);\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\n\tconst adressError =\n\t\tformErrors.countryCode || formErrors.cityName || formErrors.street || formErrors.houseNumber;\n\n\tconst defaultAdressText = customerUtils.formatAddressLine(\n\t\tinitalForm.street,\n\t\tinitalForm.houseNumber,\n\t\tundefined\n\t);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst name = e?.target?.name;\n\t\tconst value = e?.target?.value;\n\n\t\tsetForm((currentForm) => ({\n\t\t\t...currentForm,\n\t\t\t[name]: value,\n\t\t}));\n\t};\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSelectGoogleSuggestion = useCallback(\n\t\t(suggestion: GoogleSuggestion) => {\n\t\t\tconst updatedForm = {\n\t\t\t\t...form,\n\t\t\t\tcountryCode: suggestion.countryCode,\n\t\t\t\tcityName: suggestion.cityName,\n\t\t\t\tstreet: suggestion.street,\n\t\t\t\thouseNumber: suggestion.houseNumber,\n\t\t\t\tlatitude: suggestion.lat,\n\t\t\t\tlongitude: suggestion.long,\n\t\t\t\tpostCode: suggestion.postCode,\n\t\t\t};\n\n\t\t\tconst errors = customerUtils.validateAddressForm(updatedForm);\n\n\t\t\tsetForm(updatedForm);\n\t\t\tsetFormErrors(errors);\n\t\t},\n\t\t[form]\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\t\ttry {\n\t\t\tconst errors = customerUtils.validateAddressForm(form);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\t\t\tsetIsLoading(true);\n\n\t\t\tconst response = await customerServices.update({ address: form });\n\t\t\tif (response?.status !== 200) {\n\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t}\n\t\t\tgetCustomer();\n\t\t\tcloseModal();\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Update Delivery Address\")}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t<Column fullWidth>\n\t\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Column fullWidth gap={0.5}>\n\t\t\t\t\t\t\t<AddressAutocomplete\n\t\t\t\t\t\t\t\tonSelect={handleSelectGoogleSuggestion}\n\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\torigin={{ lat: selectedBranch?.latitude, lng: selectedBranch?.longitude }}\n\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\tdefaultAdressText={defaultAdressText}\n\t\t\t\t\t\t\t\tplaceHolder={t(\"Enter address\")}\n\t\t\t\t\t\t\t\tinputLabel={t(\"Address\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{adressError && <Text color={UIElementType.DANGER}>{tError(adressError)}</Text>}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<Flex gap={1}>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"floor\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Floor\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"7\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.floor}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.floor)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"additionalNumber\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Additional number\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"17\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.additionalNumber}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.additionalNumber)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tname=\"instructions\"\n\t\t\t\t\t\t\tplaceholder={t(\"Example: Door code is 555\")}\n\t\t\t\t\t\t\tlabel={t(\"Delivery Instructions\")}\n\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\tvalue={form.instructions}\n\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\terrorMessage={tError(formErrors.instructions)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Button\n\t\t\t\t\tlabel={tCommon(\"Save\")}\n\t\t\t\t\tonClick={handleSubmit}\n\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateAddress;\n","import { Modal, ModalComponentProps, useModalContext } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport BranchBusinessHoursUI from \"src/components/PublicMenu/Header/BranchBusinessHours\";\n\nconst BranchBusinessHours = ({ params }: ModalComponentProps) => {\n\tconst { setModal } = useModalContext();\n\tconst { t } = useTranslation(\"branch\");\n\n\tconst { modalRef, openingHours, deliveryHours } = params;\n\n\tconst closeModal = () => setModal(null);\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={<BranchBusinessHoursUI openingHours={openingHours} deliveryHours={deliveryHours} />}\n\t\t\ttitle={t(\"Opening Hours\")}\n\t\t/>\n\t);\n};\nexport default BranchBusinessHours;\n","import { useCallback, useRef } from \"react\";\nimport { CloseDropdownRef, DropDown, DropDownMenuItem, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./Events.module.scss\";\n\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tcurrentGoal: string;\n\tlanguage?: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst EventsToolbar = ({ currentGoal, language, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\tconst closeDropdownRef = useRef<CloseDropdownRef>({});\n\n\tconst getGoalTitle = (goal: string) => {\n\t\tswitch (goal) {\n\t\t\tcase analyticsConstants.CATEGORY_SCROLLED:\n\t\t\t\treturn t(\"Scrolled to Category\");\n\t\t\tcase analyticsConstants.CATEGORY_SELECTED:\n\t\t\t\treturn t(\"Category Selected\");\n\t\t\tcase analyticsConstants.PRODUCT_DETAILS:\n\t\t\t\treturn t(\"Product Details\");\n\t\t\tcase analyticsConstants.PRODUCT_ADD_ORDER:\n\t\t\t\treturn t(\"Product Added to Order\");\n\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t}\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(goal: string) => {\n\t\t\tsetGoal(goal);\n\t\t\tcloseDropdownRef?.current?.close?.();\n\t\t},\n\t\t[setGoal]\n\t);\n\n\treturn (\n\t\t<DropDown\n\t\t\taction={getGoalTitle(currentGoal)}\n\t\t\tactionSize=\"large\"\n\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\tcloseRef={closeDropdownRef}\n\t\t\tmenu={\n\t\t\t\t<div className={styles.toolbarMenu}>\n\t\t\t\t\t{analyticsConstants.GOALS.map((goal) => (\n\t\t\t\t\t\t<DropDownMenuItem key={goal} onClick={() => handleChange(goal)}>\n\t\t\t\t\t\t\t{getGoalTitle(goal)}\n\t\t\t\t\t\t</DropDownMenuItem>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default EventsToolbar;\n","import { Card, BarChart, Loading, BarChartData } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport EventsToolbar from \"./EventsToolbar\";\n\ninterface Props {\n\tdata: BarChartData[];\n\tisLoading?: boolean;\n\tlanguage?: string;\n\tgoal: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst Events = ({ data, isLoading = false, language, goal, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\n\treturn (\n\t\t<Card\n\t\t\ttitle={t(\"Events\")}\n\t\t\ttoolbar={<EventsToolbar language={language} currentGoal={goal} setGoal={setGoal} />}\n\t\t>\n\t\t\t{isLoading ? <Loading /> : <BarChart data={data} />}\n\t\t</Card>\n\t);\n};\nexport default Events;\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n\tLIFETIME = \"lifeTime\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n\tribbonText?: string;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n\nexport enum SubscriptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tEXPIRED = \"EXPIRED\",\n\tCANCELLED = \"CANCELLED\",\n}\n\nexport type BillingInterval = \"MONTH\" | \"YEAR\";\n\nexport interface Subscription {\n\tid: number;\n\tbillingInterval: BillingInterval;\n\tbillingIntervalCount: number;\n\tstartDate: string;\n\tendDate: string;\n\tinterval: PricingInterval;\n\tstatus: SubscriptionStatus;\n\tbusiness_id?: number;\n\tplanName: string;\n}\n","import { PlanType, PricingPlans } from \"./models\";\n\nexport const PRICING: PricingPlans = {\n\tappetizer: {\n\t\ttitle: \"Appetizer\",\n\t\tprice: {\n\t\t\tmonthly: 9,\n\t\t\tannually: 7,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tmainCourse: {\n\t\ttitle: \"Main Course\",\n\t\tprice: {\n\t\t\tmonthly: 19,\n\t\t\tannually: 15,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tchefsSpecial: {\n\t\ttitle: \"Chef's Special\",\n\t\tprice: {\n\t\t\tmonthly: 49,\n\t\t\tannually: 39,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tlifeTime: {\n\t\ttitle: \"Lifetime\",\n\t\tprice: {\n\t\t\tmonthly: 49,\n\t\t\tannually: 49,\n\t\t},\n\t\tribbonText: \"Limited Time Only\",\n\t\t// discountedPrice: 0,\n\t},\n};\n\nexport const PRICING_BENEFITS = [\n\t{\n\t\ttitle: \"Smart QR Menu\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Link-in-bio\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Menu Analytics\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Users\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Products\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Categories\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Languages\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Product variants\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Product options\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Premium Support\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"SEO\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Sales reports\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Table Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Order Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Delivery Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Multiple Branches\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Point of Sale (POS)\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: false,\n\t},\n\t{\n\t\ttitle: \"Mobile App for Owners & Staff\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: false,\n\t},\n\t// {\n\t// \ttitle: \"RestaroundPay with Mobile\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: true,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// },\n\t// {\n\t// \ttitle: \"Event management\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: true,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// },\n\t// {\n\t// \ttitle: \"Third-Party Delivery Integrations\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: false,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// \t[PlanType.LIFETIME]: false,\n\t// },\n];\n\nexport const LIFETIME_PROMO_CODES = [\"LIFETIME_49\"];\n","import { priceFormatter } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./Pricing.module.scss\";\n\nimport {\n\tmodels as subscriptionModels,\n\tconstants as subscriptionConstants,\n} from \"src/modules/subscription\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tplan: subscriptionModels.PlanType;\n\tlanguage: string;\n\tinterval: subscriptionModels.PricingInterval;\n\tcurrency: string;\n}\n\nconst PricingPlanAmount = ({ plan, language, interval, currency }: Props) => {\n\tconst { t } = useTranslation(\"pricing\", {\n\t\tlanguage,\n\t});\n\n\tconst { price, discountedPrice } = subscriptionConstants.PRICING[plan];\n\tconst intervalPrice = price[interval];\n\tconst intervalPriceText =\n\t\tplan === subscriptionModels.PlanType.LIFETIME ? \"/ lifetime\" : \"/ month\";\n\n\tif (discountedPrice !== undefined) {\n\t\treturn (\n\t\t\t<Column gap={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<span className={styles.discountedPrice}>\n\t\t\t\t\t\t{priceFormatter(discountedPrice, currency, language)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className={styles.originalPrice}>\n\t\t\t\t\t\t{priceFormatter(intervalPrice, currency, language)}\n\t\t\t\t\t</span>\n\t\t\t\t</Row>\n\t\t\t\t<Text size=\"sm\">{t(intervalPriceText)}</Text>\n\t\t\t</Column>\n\t\t);\n\t}\n\treturn (\n\t\t<Row gap={0.5}>\n\t\t\t<Text size=\"xxl\" variant=\"bold\">\n\t\t\t\t{priceFormatter(intervalPrice, currency, language)}\n\t\t\t</Text>\n\t\t\t<Text size=\"sm\">{t(intervalPriceText)}</Text>\n\t\t</Row>\n\t);\n};\nexport default PricingPlanAmount;\n","import { Card, SVGIcon, UIElementType, Button, Row } from \"@sorocraft/ui\";\nimport { Check, Minus, ShieldDollar } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { ReactNode, useState } from \"react\";\n\nimport styles from \"./Pricing.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as subscriptionModels,\n\tconstants as subscriptionConstants,\n} from \"src/modules/subscription\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport PricingPlanAmount from \"./PricingPlanAmount\";\n\ninterface Props {\n\tcurrency: string;\n\tlanguage: string;\n\tisLoading?: boolean;\n\tpromoCode?: string | null;\n\tonPlanSelect?: (plan: subscriptionModels.PlanType) => void;\n\tonIntervalSelect?: (interval: subscriptionModels.PricingInterval) => void;\n}\n\ninterface PlanParentProps {\n\tchildren: ReactNode;\n\tplan: subscriptionModels.PlanType;\n}\n\nconst Pricing = ({\n\tcurrency,\n\tlanguage,\n\tisLoading = false,\n\tonPlanSelect,\n\tonIntervalSelect,\n}: Props) => {\n\tconst [selectedInterval, setSelectedInterval] =\n\t\tuseState<subscriptionModels.PricingInterval>(\"annually\");\n\tconst { t } = useTranslation(\"pricing\", {\n\t\tlanguage,\n\t});\n\n\tconst plans: subscriptionModels.PlanType[] = [\n\t\tsubscriptionModels.PlanType.APPETIZER,\n\t\tsubscriptionModels.PlanType.MAIN_COURSE,\n\t\tsubscriptionModels.PlanType.CHEFS_SPECIAL,\n\t];\n\tconst intervals: Array<subscriptionModels.PricingInterval> = [\"annually\", \"monthly\"];\n\tconst isDashboard = Boolean(onPlanSelect);\n\tconst actionTitle = isDashboard ? \"Choose Plan\" : \"Try for free\";\n\n\tconst handleSelectInterval = (interval: subscriptionModels.PricingInterval) => {\n\t\tsetSelectedInterval(interval);\n\t\tif (onIntervalSelect) {\n\t\t\tonIntervalSelect(interval);\n\t\t}\n\t};\n\n\tconst PlanParent = ({ children, plan }: PlanParentProps) => {\n\t\tconst { ribbonText } = subscriptionConstants.PRICING[plan];\n\t\tconst hasRibbon = Boolean(ribbonText);\n\n\t\tconst commonProps = {\n\t\t\tclassName: classNames(styles, { plan: true, hasRibbon }),\n\t\t\t\"data-ribbon\": t(ribbonText),\n\t\t};\n\n\t\tif (onPlanSelect) {\n\t\t\treturn (\n\t\t\t\t<div {...commonProps} onClick={() => !isLoading && onPlanSelect(plan)}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<a\n\t\t\t\t{...commonProps}\n\t\t\t\thref={viewUtils.getRegisterUrl(language, `pricing-${plan}`)}\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.intervals}>\n\t\t\t\t{intervals.map((interval) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={interval}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\tinterval: true,\n\t\t\t\t\t\t\tactive: selectedInterval === interval,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tonClick={() => handleSelectInterval(interval)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(interval)}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div className={styles.plans}>\n\t\t\t\t{plans.map((plan) => (\n\t\t\t\t\t<PlanParent key={plan} plan={plan}>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<div className={styles.title}>{t(subscriptionConstants.PRICING[plan].title)}</div>\n\t\t\t\t\t\t\t<div className={styles.price}>\n\t\t\t\t\t\t\t\t<PricingPlanAmount\n\t\t\t\t\t\t\t\t\tplan={plan}\n\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\tinterval={selectedInterval}\n\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={styles.action}>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={t(actionTitle)}\n\t\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\t\ttype={\n\t\t\t\t\t\t\t\t\t\tplan === subscriptionModels.PlanType.MAIN_COURSE\n\t\t\t\t\t\t\t\t\t\t\t? UIElementType.PRIMARY\n\t\t\t\t\t\t\t\t\t\t\t: UIElementType.BORDERED_PRIMARY\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={() => {}}\n\t\t\t\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={styles.benefits}>\n\t\t\t\t\t\t\t\t{!isDashboard && (\n\t\t\t\t\t\t\t\t\t<Row className={styles.moneyBack} gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={ShieldDollar} size=\"sm\" color={UIElementType.SUCCESS} />\n\t\t\t\t\t\t\t\t\t\t<span>{t(\"No credit card needed\")}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{subscriptionConstants.PRICING_BENEFITS.map((benefit) => (\n\t\t\t\t\t\t\t\t\t<div key={benefit.title} className={styles.benefit}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={benefit[plan] ? Check : Minus} size=\"md\" />{\" \"}\n\t\t\t\t\t\t\t\t\t\t<span>{t(benefit.title)}</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</PlanParent>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default Pricing;\n","import { useEffect, useRef } from \"react\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { ShoppingBag } from \"@sorocraft/ui/icons\";\nimport { SVGIcon, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderFAB.module.scss\";\n\ninterface Props {\n\ttotalCount: number;\n\tisVisible: boolean;\n\tonClick?: () => void;\n}\n\nconst OrderFAB = ({ totalCount, isVisible, onClick }: Props) => {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst mountedRef = useRef<boolean>(false);\n\n\tuseEffect(() => {\n\t\tif (!mountedRef.current) return;\n\n\t\tconst el = containerRef.current;\n\t\tif (!el) return;\n\n\t\tel.classList.remove(styles.animate);\n\t\tvoid el.offsetWidth;\n\t\tel.classList.add(styles.animate);\n\t}, [totalCount]);\n\n\tuseEffect(() => {\n\t\tmountedRef.current = true;\n\t}, []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisVisible,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t\tref={containerRef}\n\t\t>\n\t\t\t<SVGIcon icon={ShoppingBag} color={UIElementType.DEFAULT} size=\"md\" />\n\t\t\t<div className={styles.count}>{totalCount}</div>\n\t\t</div>\n\t);\n};\nexport default OrderFAB;\n"],"names":["MODALS","SUPPORTED_LOCALES","SUPPORTED_COUNTRIES","name","code","phoneCode","CO_DOMAIN","DEFAULT_HOSTNAME","DOMAINS","IMAGE_BASE_URL","storage","Storage","validators","number","AZERBAIJANI_PREFIXES","RegExp","join","test","isValid","error","validatePhoneNumber","phoneNumber","cleaned","replace","countryCode","startsWith","nationalNumber","slice","length","validator","getBaseUrl","hostname","language","domain","includes","url","getRegisterUrl","source","tld","getTLD","getImageSource","image","getLogoImageSource","logoImage","getCoverPhotoSource","coverPhoto","StoreContext","createContext","StoreProvider","children","value","_jsx","Provider","useStoreContext","useContext","useHostname","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply","OrderType","OrderStatus","OrderItemStatus","PaymentMethod","OrderStep","SuppressedError","initialOrder","orderType","totalPriceWithTax","totalPriceWithoutTax","totalTax","vat","paymentMethod","CASH","ORDER_STEPS","CART","DETAILS","COMPLETED","OrderErrors","generateOrderItemsId","productId","variantId","selectedAddons","Error","orderItemsId","addonIdsPart","Object","entries","map","addonId","option","optionIds","Array","isArray","sortNumbers","filter","Boolean","getOrderItemPrice","orderItem","price","variant","addons","quantity","basePrice","_a","addonsPrice","reduce","total","addon","addonTotal","options","sum","calculatSingleAddonTotalPrice","calculateTotalAddonPrice","itemNetPrice","itemTax","itemGrossPrice","totalGross","totalNet","getOrderErrorMessages","field","ADDRESS_IS_EMPTY","TABLE_NOT_SELECTED","EMPTY_ITEMS","BRANCH_NOT_SELECTED","FIELD_REQUIRED_ERROR","BASE_API_URL","request","method","endpoint","body","accessToken","getAuthToken","response","fetch","headers","Authorization","credentials","JSON","stringify","data","json","ok","API","update","payload","logException","args_1","errorInfo","trackEvent","message","assign","console","getHoursForDay","schedule","weekDayIndex","days","find","day","hours","splitHours","split","Number","isWithinTimeRange","timeRange","now","Date","openH","openM","openAt","closeH","closeM","closeAt","start","setHours","end","setDate","getDate","useHasSingleBranch","branches","useSelectedBranch","branchId","hasSingleBranch","isEmpty","item","id","useBranchCoordinates","selectedBranch","latitude","longitude","useBranchServes","openingHours","deliveryHours","isOpen","isDelivering","getUTCDay","openHours","deliveryHoursToday","useBranchSettings","settings","useOrderEnabled","deliveryOrderEnabled","dineInOrderEnabled","pickupOrderEnabled","useInitialOrder","defaultOrderType","defaultPaymentMethod","defaultBranchId","tableId","tableHooks.usePreDefinedTableId","branchHooks.useBranchServes","branchSettings","branchHooks.useBranchSettings","DELIVERY","DINE_IN","PICK_UP","orderUtils.getDefaultOrderType","undefined","orderModels.PaymentMethod","OrderContext","order","orderConstants.initialOrder","orderStep","orderModels.OrderStep","orderItems","isOrderOpen","customer","trackingId","errors","updateOrder","setOrderStep","addProduct","updateProduct","removeAllProductVariants","setIsOrderOpen","getCustomer","resetOrder","setTrackingId","updateOrderErrors","resetErrors","OrderProvider","isOrderDefaultOpen","storeHooks.useInitialOrder","setCustomer","useState","setOrder","setOrderItems","setErrors","useCallback","updatedFields","currentOrder","forEach","currentErrors","updateOrderItems","product","note","isAddOperation","variants","orderUtils.generateOrderItemsId","currentOrderItems","existingItem","newQuantity","_b","s","t","p","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","propertyIsEnumerable","__rest","selectedVariant","selectedAddonsPayload","productAddons","addonIdStr","selected","selectedOptionIds","optionId","orderUtils.buildSelectedAddonsPayload","items","updatedOrderItems","acc","viewServices.storage","commonServices.logException","file","force","shouldClose","orderUtils.getOrderErrorMessages","contextValue","useMemo","useOrderContext","BranchSetting","BusinessSetting","useBusiness","business","useCurrency","currency","useLanguage","Languages","isOptionsOpen","setIsOptionsOpen","languages","businessHooks.useLanguage","onLanguageSelect","businessHooks.useOnLanguageSelect","isBilingual","otherLanguages","getFlag","className","styles","container","onClick","_jsxs","Row","alignItems","gap","classNames","src","alt","currentLanguage","BusinessHeader","avatar256","businessHooks.useBusiness","viewUtils.getCoverPhotoSource","width","height","Column","fullWidth","fullHeight","justifyContent","viewUtils.getLogoImageSource","Text","color","align","BackIcon","size","theme","username","businessHooks.useBusinessUsername","window","location","pathname","history","back","SVGIcon","icon","ChevronLeft","HeaderLinks","setModal","useModalContext","phone","wifiPassword","whatsApp","telegram","branchHooks.useSelectedBranch","instagram","tiktok","facebook","isBusinessHoursAvailable","IconLink","Phone","href","shape","Whatsapp","target","Instagram","Telegram","Tiktok","Facebook","Tooltip","hint","Wifi","viewConstants.MODALS","params","Clock","BranchHeader","venueName","businessName","branchHooks.useVenueName","address","branchHooks.useHasSingleBranch","branchHooks.useBranchCoordinates","googleMapLink","Flex","direction","Item","shrink","weight","noMargin","rel","MarkerPin","UIElementType","DEFAULT","Header","locales","az","SOMETHING_WRONG","FIELD_REQUIRED","INVALID_OTP","OTP_RATE_LIMIT_EXCEEDED","FEATURE_NOT_AVAILABLE_FOR_SEGMENT","ORDER_TYPE_DISABLED_FOR_BUSINESS","ORDER_TYPE_DISABLED_AT_THIS_TIME","COUNTRY_REQUIRED","CITY_REQUIRED","STREET_REQUIRED","STREET_NUMBER_REQUIRED","OUT_OF_DELIVERY_RANGE","NO_ORDER_TYPE","Save","Cancel","Continue","Add","Subtotal","Delivery","Pickup","Cash","Items","Tax","Total","Table","Card","Country","City","Address","Azerbaijan","Floor","Events","monthly","annually","Appetizer","Closed","en","ru","tr","nl","et","common","auth","events","pricing","branch","useTranslation","ns","locale","supportedLocale","translations","key","translation","keys","k","getTranslations","useCustomerAddress","addresses","CustomerAuthStep","CustomerAddressType","validateAddressForm","form","cityName","street","houseNumber","formatAddressLine","additionalNumber","useOrderPriceDetails","deliveryFeeAmount","values","totalPriceWithTaxAndFees","usePrepareOrder","existingOrderData","businessId","businessHooks.useBusinessId","customerHooks.useCustomerAddress","customerId","customerHooks.useCustomerId","workingDayId","employeeId","customerAddressId","deliveryFee","useTotalOrderItemsCount","useDeliveryDistanceError","branchCoordinates","maxDeliveryDistance","setError","useEffect","hasValidCustomerAddress","hasValidBranchCoordinates","distance","customerCoordinates","spherical","google","maps","importLibrary","coordinate1","LatLng","coordinate2","computeDistanceBetween","customerServices.getCustomerDistance","useDeliveryAmountError","businessHooks.useCurrency","minDeliveryAmount","amount","priceFormatter","PhoneStep","formErrors","onChange","countryCodeOptions","viewConstants.SUPPORTED_COUNTRIES","label","viewHooks.useHostname","tError","setForm","baseUrl","viewUtils.getBaseUrl","handleChange","trimmedValue","trim","isNumber","updatedForm","preparedPhoneNumber","replaceAll","customerUtils.preparePhoneNumber","Input","type","InputType","SELECT","placeholder","TEL","errorMessage","terms","OTPStep","OTPInput","onChangeOTP","otp","queueMicrotask","inputMode","EmailStep","onCancel","customerEmail","email","customerHooks.useCustomerEmail","setEmail","tAuth","newValue","EMAIL","Button","HoursList","title","isClosed","timeText","whiteSpace","DANGER","BranchBusinessHours","openingDays","deliveryDays","isDeliveryEnabled","branchHooks.useIsDeliveryEnabled","ScrollToTop","zIndex","showGoTop","setShowGoTop","handleScroll","shouldShow","scrollY","addEventListener","removeEventListener","visible","style","IconButton","ChevronUp","scrollTo","left","top","behavior","BranchCardParent","clearRootPath","rootPath","endsWith","branchHooks.useNormalizedRootPath","onBranchSelect","branchHooks.useOnBranchSelect","BranchCard","content","noImage","imageContainer","info","Branches","branchHooks.useList","Container","ProductView","MenuAddonSelectType","getAddonTranslation","getAddonOptionTranslation","getAddonOptionRawPrice","calculateTotalPrice","getProductTranslation","getProductRawPrice","getProductPrice","totalPrice","formattedTotalPrice","getProductVariant","getProductVariantRawPrice","getProductVariantTranslation","getProductOrderRawPrice","noVat","optionsPrice","productData","selectedOptionsTotalPrice","selectType","SINGLE","selectedOptionId","multipleTotal","getSelectedOptionsTotalPrice","useProductById","products","getCategoryTranslation","category","GOAL_BASE_NAME","CATEGORY_SELECTED","CATEGORY_SCROLLED","PRODUCT_DETAILS","PRODUCT_ADD_ORDER","PRODUCT_VIEW_CHANGED","GOALS","Categories","categoryProductMap","selectedCategoryId","skipTracking","onSelectCategory","categoryBlocksRef","useRef","carouselRef","scrollToCategoryBlock","categoryBlock","current","carouselWidth","clientWidth","scrollLeft","offsetLeft","offsetWidth","Carousel","onGetRef","ref","CarouselItem","Chip","analyticsConstants.CATEGORY_SELECTED","handleSelectCategory","BORDERED_PRIMARY","active","el","ProductsListItem","image160","volume","available","description","productUtils.getProductTranslation","productUtils.getProductPrice","hasVariant","hasAddons","hasImage","isClickable","notAvailableText","viewUtils.getImageSource","notAvailable","loading","addToOrder","preventDefault","stopPropagation","analyticsConstants.PRODUCT_ADD_ORDER","Plus","ProductsGridItem","defaultImage","isDashboard","onAddProduct","image580","image1024","ProductsGridItemContainer","Quantity","isDecreaseDisabled","onIncrease","onDecrease","quantityAction","isDisabled","Minus","quantityValue","ProductInOrder","isInPublicMenu","onModalClose","flex","Trash","tooltip","ShoppingBag","SUCCESS","ProductVariants","focusedSection","onSelectVariant","containerRef","isVariantsFocused","scrollIntoView","focused","variantsTitle","formattedTotalVariantPrice","productUtils.getProductVariantPrice","productUtils.getProductVariantTranslation","checked","RADIO","variantPrice","ProductAddons","onOptionSelect","addonUtils.getAddonTranslation","formattedTotalOptionPrice","addonUtils.getOptionPrice","optionTitle","addonUtils.getAddonOptionTranslation","isSingle","addonModels.MenuAddonSelectType","isRemove","CHECKBOX","optionPrice","ProductDetailsUI","actionTitle","productQuantityInOrderWithAllVariants","onClose","setSelectedVariant","adjustQuantity","onSubmit","modalRef","formattedTotalOrderPrice","productUtils.getProductOrderPrice","handleClickOutside","event","contains","hasVariants","Modal","noBodyPadding","details","choices","close","Close","footer","addAction","disabled","paddingBlock","ProductDetails","setQuantity","isUpdate","setIsUpdate","setFocusedSection","setSelectedAddons","productQuantityInOrder","orderHooks.useProductQuantityInOrder","orderHooks.useProductQuantityInOrderWithAllVariants","Math","max","prevForm","previousSelection","updatedSelection","Set","setTimeout","OrderStepper","actionText","isLoading","totalCount","orderHooks.useTotalOrderItemsCount","orderHooks.useOrderFormattedPriceDetails","count","Loading","FloatingOrdersButton","OrderDrawerFooter","isOrderItemsEmpty","orderError","isOrderEnabled","branchHooks.useOrderEnabled","availableCustomer","customerHooks.useAvailableCustomer","orderPayload","orderHooks.usePrepareOrder","setIsLoading","apiError","setAPIError","orderNote","hasOrderNote","showOrderNote","isServing","isSubmitDisabled","createOrder","orderServices.createOrder","errorCode","orderStepperAction","orderModels.OrderType","orderTrackingId","nextStepIndex","orderConstants.ORDER_STEPS","findIndex","nextStep","AlertBox","onClear","TextBanner","text","LIGHT","Edit","iconSize","PRIMARY","getActionText","ProductQuantity","min","productHooks.useProductQuantity","productHooks.useProductById","OrderItemOptionsInfo","_Fragment","productUtils.getProductAddon","selectedOptions","some","addonTitle","optionTitles","OrderListItem","orderUtils.getSelectedAddonsFromOrderItems","productUtils.getProductVariant","variantTitle","orderHooks.useOrderItemPrice","OrderNoItems","noItems","Description","OrderItemsList","itemId","OrderDrawerCart","NoAddressContent","AddressContent","firstLine","customerUtils.formatAddressLine","secondLine","CustomerAddress","TableShape","TableStatus","TableLocation","OrderTableUI","preDefinedTable","tableOptions","selectedTableId","disableIfPreDefined","hasPreDefinedTable","handleTableChange","table","tableInput","OrderTable","tables","tableHooks.usePreDefinedTable","tableHooks.useList","OrderMethods","orderTypes","onSelect","getOrderMethodTooltipPosition","index","orderMethods","methods","isVisible","push","position","flexWrap","createOrderMethod","MethodSelection","selectedMethod","OrderPaymentSummary","textSize","totalPriceWithoutTaxFormatted","totalPriceWithTaxFormatted","totalTaxFormatted","deliveryFeeFormatted","OrderDrawerDetails","orderHooks.useOrderPriceDetails","Grid","paymentMethods","CARD","Padding","paddingInline","Accordion","noPadding","headerPaddingInline","headerPaddingBlock","titleVariant","OrderDrawerCompleted","Check","Link","OrderDrawer","contentRef","orderErrorInDetails","deliveryDistanceError","deliveryAmountError","orderHooks.useOrderErrorInDetails","hasOrderErrorInDetails","hasLargeFooter","closeDrawer","Drawer","onBack","renderContent","Products","memo","productBlocksRef","onCategoryInView","selectedProduct","setSelectedProduct","view","setView","productModels.ProductView","LIST","views","List","GRID","handleSelectProduct","analyticsConstants.PRODUCT_DETAILS","observer","IntersectionObserver","viewportCenter","clientHeight","closestCategoryId","closestDistance","Infinity","entry","isIntersecting","rect","boundingClientRect","elementCenter","distanceToCenter","abs","getAttribute","threshold","categoryId","element","setAttribute","observe","disconnect","analyticsConstants.PRODUCT_VIEW_CHANGED","handleSelectView","categoryUtils.getCategoryTranslation","prevProps","nextProps","displayName","MenuContent","productHooks.useList","categories","categoryHooks.useList","productMap","menuUtils.prepareCategoryAndProductMap","setSelectedCategoryId","canUserScroll","productBlock","block","scrollToProductBlock","handleCategoryInView","categoryUtils.getCategoryNameById","analyticsConstants.CATEGORY_SCROLLED","handleCategoryFromURL","searchParams","URLSearchParams","search","categoryIdFromURL","get","categoryToSelect","MODALS_MAP","MODALS_ADD_UPDATE_NOTES","noteContent","setNoteContent","tCommon","header","TEXT_AREA","MODALS_AUTH","setFormErrors","currentStep","setCurrentStep","customerModels.CustomerAuthStep","PHONE","steps","OTP","completeAuth","goToNextStep","currentIndex","prev","inline","renderStep","isEmailStep","emailUnchanged","emailCleared","viewUtils.validatePhoneNumber","checkIsValidEmail","customerUtils.validateForm","status","customerServices.verifyOTP","saveAuthToken","customerServices.update","MODALS_ADD_UPDATE_ADDRESS","initialCountryCode","floor","instructions","postCode","initalForm","addressId","adressError","defaultAdressText","currentForm","closeModal","handleSelectGoogleSuggestion","suggestion","lat","long","customerUtils.validateAddressForm","AddressAutocomplete","origin","lng","placeHolder","inputLabel","TEXT","MODALS_BRANCH_BUSINESS_HOURS","BranchBusinessHoursUI","PublicMenu","isInDashboard","viewHooks.useIsInDashboard","branchHooks.useBranchId","showMenu","PublicMenuWithContext","ModalProvider","modalsMap","EventsToolbar","currentGoal","setGoal","closeDropdownRef","getGoalTitle","goal","DropDown","action","actionSize","closeRef","menu","toolbarMenu","analyticsConstants.GOALS","DropDownMenuItem","toolbar","BarChart","PlanType","SubscriptionStatus","PRICING","appetizer","mainCourse","chefsSpecial","lifeTime","ribbonText","PRICING_BENEFITS","APPETIZER","MAIN_COURSE","CHEFS_SPECIAL","LIFETIME","PricingPlanAmount","plan","interval","discountedPrice","subscriptionConstants.PRICING","intervalPrice","intervalPriceText","subscriptionModels.PlanType","originalPrice","Pricing","onPlanSelect","onIntervalSelect","selectedInterval","setSelectedInterval","plans","PlanParent","hasRibbon","commonProps","viewUtils.getRegisterUrl","intervals","handleSelectInterval","benefits","moneyBack","ShieldDollar","subscriptionConstants.PRICING_BENEFITS","benefit","OrderFA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W,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,cACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,iBACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,kBACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,qBACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,uBACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,sBACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,mBACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,kBACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,kBACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACCtf,MAAO,MACP,CAAC0e,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAA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,EAACqT,EAAO,CAACC,KAAMytB,EAAQxB,GAAQ1K,GAAQtM,GAAO3V,KAAK,OAAQ,IAC3D5S,EAAA,OAAA,CAAAF,SAAOoO,EAAE6yB,EAAQhhB,WAFRghB,EAAQhhB,eAjCLwf,+oBC7FtB,MAAMyB,GAAW,EAAG1T,aAAY6F,YAAW/hB,cAC1C,MAAMgY,EAAelE,EAAuB,MACtC+b,EAAa/b,GAAgB,GAiBnC,OAfAlJ,EAAU,KACT,IAAKilB,EAAW3b,QAAS,OAEzB,MAAMe,EAAK+C,EAAa9D,QACnBe,IAELA,EAAG6a,UAAUC,OAAOjwB,GAAOkwB,SACtB/a,EAAGV,YACRU,EAAG6a,UAAUG,IAAInwB,GAAOkwB,WACtB,CAAC9T,IAEJtR,EAAU,KACTilB,EAAW3b,SAAU,GACnB,IAGFjU,EAAA,MAAA,CACCJ,UAAWQ,EAAWP,GAAQ,CAC7BC,WAAW,EACXgiB,cAED/hB,QAASA,EACT0U,IAAKsD,EAAYtpB,SAAA,CAEjBE,EAACqT,EAAO,CAACC,KAAMyV,GAAatW,MAAO2D,EAAcC,QAASzD,KAAK,OAC/D5S,EAAA,MAAA,CAAKiR,UAAWC,GAAOuc,MAAK3tB,SAAGwtB","x_google_ignoreList":[5]}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/modules/view/constants.ts","../src/modules/view/services.ts","../src/modules/view/utils.ts","../src/store/index.tsx","../src/modules/view/hooks.ts","../node_modules/tslib/tslib.es6.js","../src/modules/order/models.ts","../src/modules/order/constants.ts","../src/modules/order/utils.ts","../src/constants/env.ts","../src/services/api/index.ts","../src/modules/customer/services.ts","../src/modules/common/services.ts","../src/modules/branch/utils.ts","../src/modules/branch/hooks.ts","../src/modules/store/hooks.ts","../src/modules/table/hooks.ts","../src/store/order.tsx","../src/modules/branch/models.ts","../src/modules/business/models.ts","../src/modules/business/constants.ts","../src/modules/business/hooks.ts","../src/components/PublicMenu/Header/Languages/Languages.tsx","../src/components/PublicMenu/Header/BusinessHeader/BusinessHeader.tsx","../src/components/BackIcon/BackIcon.tsx","../src/components/PublicMenu/Header/BranchHeader/HeaderLinks/HeaderLinks.tsx","../src/components/PublicMenu/Header/BranchHeader/BranchHeader.tsx","../src/components/PublicMenu/Header/Header.tsx","../src/services/translation/locales/index.ts","../src/services/translation/locales/az/index.ts","../src/services/translation/locales/az/error.ts","../src/services/translation/locales/az/common.ts","../src/services/translation/locales/az/order.ts","../src/services/translation/locales/az/customer.ts","../src/services/translation/locales/az/auth.ts","../src/services/translation/locales/az/events.ts","../src/services/translation/locales/az/pricing.ts","../src/services/translation/locales/az/branch.ts","../src/services/translation/locales/en/index.ts","../src/services/translation/locales/en/error.ts","../src/services/translation/locales/en/common.ts","../src/services/translation/locales/en/order.ts","../src/services/translation/locales/en/customer.ts","../src/services/translation/locales/en/auth.ts","../src/services/translation/locales/en/events.ts","../src/services/translation/locales/en/pricing.ts","../src/services/translation/locales/en/branch.ts","../src/services/translation/locales/ru/index.ts","../src/services/translation/locales/ru/error.ts","../src/services/translation/locales/ru/common.ts","../src/services/translation/locales/ru/order.ts","../src/services/translation/locales/ru/customer.ts","../src/services/translation/locales/ru/auth.ts","../src/services/translation/locales/ru/events.ts","../src/services/translation/locales/ru/pricing.ts","../src/services/translation/locales/ru/branch.ts","../src/services/translation/locales/tr/index.ts","../src/services/translation/locales/tr/error.ts","../src/services/translation/locales/tr/common.ts","../src/services/translation/locales/tr/order.ts","../src/services/translation/locales/tr/customer.ts","../src/services/translation/locales/tr/auth.ts","../src/services/translation/locales/tr/events.ts","../src/services/translation/locales/tr/pricing.ts","../src/services/translation/locales/tr/branch.ts","../src/services/translation/locales/nl/index.ts","../src/services/translation/locales/nl/error.ts","../src/services/translation/locales/nl/common.ts","../src/services/translation/locales/nl/order.ts","../src/services/translation/locales/nl/customer.ts","../src/services/translation/locales/nl/auth.ts","../src/services/translation/locales/nl/events.ts","../src/services/translation/locales/nl/pricing.ts","../src/services/translation/locales/nl/branch.ts","../src/services/translation/locales/et/index.ts","../src/services/translation/locales/et/error.ts","../src/services/translation/locales/et/common.ts","../src/services/translation/locales/et/order.ts","../src/services/translation/locales/et/customer.ts","../src/services/translation/locales/et/auth.ts","../src/services/translation/locales/et/events.ts","../src/services/translation/locales/et/pricing.ts","../src/services/translation/locales/et/branch.ts","../src/services/translation/index.ts","../src/hooks/translation.ts","../src/modules/customer/hooks.ts","../src/modules/customer/models.ts","../src/modules/customer/utils.ts","../src/modules/order/hooks.ts","../src/components/PublicMenu/Modals/Auth/PhoneStep.tsx","../src/components/PublicMenu/Modals/Auth/OTPStep.tsx","../src/components/PublicMenu/Modals/Auth/EmailStep.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/HoursList/HoursList.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/ScrollToTop/ScrollToTop.tsx","../src/components/PublicMenu/Branches/BranchCard/Parent.tsx","../src/components/PublicMenu/Branches/BranchCard/BranchCard.tsx","../src/components/PublicMenu/Branches/Branches.tsx","../src/modules/product/models.ts","../src/modules/addon/models.ts","../src/modules/addon/utils.ts","../src/modules/product/utils.ts","../src/modules/product/hooks.ts","../src/modules/category/utils.ts","../src/constants/analytics.ts","../src/components/PublicMenu/Categories/Categories.tsx","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItemContainer.tsx","../src/components/Quantity/Quantity.tsx","../src/components/PublicMenu/ProductInOrder/ProductInOrder.tsx","../src/components/PublicMenu/ProductVariants/ProductVariants.tsx","../src/components/PublicMenu/ProductAddons/ProductAddons.tsx","../src/components/PublicMenu/ProductDetails/ProductDetailsUI.tsx","../src/components/PublicMenu/ProductDetails/ProductDetails.tsx","../src/components/PublicMenu/OrderStepper/OrderStepper.tsx","../src/components/PublicMenu/FloatingOrdersButton/FloatingOrdersButton.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx","../src/modules/order/services.ts","../src/components/PublicMenu/ProductQuantity/ProductQuantity.tsx","../src/components/PublicMenu/OrderListItem/OptionsInfo/OptionsInfo.tsx","../src/components/PublicMenu/OrderListItem/OrderListItem.tsx","../src/components/PublicMenu/OrderItemsList/OrderNoItems.tsx","../src/components/PublicMenu/OrderItemsList/OrderItemsList.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCart.tsx","../src/components/PublicMenu/Customer/CustomerAddress/NoAddressContent/NoAddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/AddressContent/AddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/CustomerAddress.tsx","../src/modules/table/models.ts","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTableUI.tsx","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTable.tsx","../src/components/PublicMenu/OrderMethods/OrderMethods.tsx","../src/components/PublicMenu/OrderPaymentSummary/OrderPaymentSummary.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerDetails.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCompleted.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawer.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/components/PublicMenu/MenuContent/MenuContent.tsx","../src/modules/category/hooks.ts","../src/modules/menu/utils.ts","../src/components/PublicMenu/PublicMenu.tsx","../src/components/PublicMenu/Modals/AddUpdateNote/AddUpdateNote.tsx","../src/components/PublicMenu/Modals/Auth/Auth.tsx","../src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx","../src/components/PublicMenu/Modals/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/Events/EventsToolbar.tsx","../src/components/Events/Events.tsx","../src/modules/subscription/models.ts","../src/modules/subscription/constants.ts","../src/components/Pricing/PricingPlanAmount.tsx","../src/components/Pricing/Pricing.tsx","../src/components/PublicMenu/OrderFAB/OrderFAB.tsx"],"sourcesContent":["export const MODALS = {\n\tADD_UPDATE_NOTES: \"ADD_UPDATE_NOTES\",\n\tAUTH: \"AUTH\",\n\tADD_UPDATE_ADDRESS: \"ADD_UPDATE_ADDRESS\",\n\tBRANCH_BUSINESS_HOURS: \"BRANCH_BUSINESS_HOURS\",\n\tPRODUCT_DETAILS: \"PRODUCT_DETAILS\",\n};\n\nexport const SUPPORTED_LOCALES = [\"en\", \"az\", \"nl\", \"et\", \"tr\", \"ru\"];\nexport const SUPPORTED_COUNTRIES = [\n\t{\n\t\tname: \"Azerbaijan\",\n\t\tcode: \"AZ\",\n\t\tphoneCode: \"+994\",\n\t},\n];\n\nexport const CO_DOMAIN = \"restaround.co\";\nexport const AZ_DOMAIN = \"restaround.az\";\nexport const EE_DOMAIN = \"restaround.ee\";\nexport const NL_DOMAIN = \"restaround.nl\";\n\nexport const DEFAULT_HOSTNAME = CO_DOMAIN;\n\nexport const DOMAINS = [CO_DOMAIN, AZ_DOMAIN, EE_DOMAIN, NL_DOMAIN]; // Supported domains list\n\nexport const IMAGE_BASE_URL = \"https://images.restaround.co\";\n","import { Storage } from \"@sorocraft/js-utils\";\n\nexport const storage = new Storage(\"restaround_cst_act\", \"restaround_cst_rft\");\n","import { CO_DOMAIN, DOMAINS, IMAGE_BASE_URL } from \"./constants\";\n\ninterface ValidationResult {\n\tisValid: boolean;\n\terror?: string;\n}\n\ntype Validator = (cleanedNumber: string) => ValidationResult;\n\nconst validators: Record<string, Validator> = {\n\t\"994\": (number) => {\n\t\tconst AZERBAIJANI_PREFIXES = [\"50\", \"51\", \"10\", \"55\", \"99\", \"70\", \"77\", \"60\"];\n\t\tconst pattern = new RegExp(`^(${AZERBAIJANI_PREFIXES.join(\"|\")})\\\\d{7}$`);\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: `Azerbaijani numbers must be 9 digits and start with ${AZERBAIJANI_PREFIXES.join(\n\t\t\t\t\t\", \"\n\t\t\t\t)}`,\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n\n\t\"31\": (number) => {\n\t\tconst pattern = /^\\d{9}$/;\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: \"Dutch numbers must be exactly 9 digits\",\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n};\n\nexport function validatePhoneNumber(phoneNumber: string): ValidationResult {\n\tif (!phoneNumber) {\n\t\treturn { isValid: false, error: \"FIELD_REQUIRED\" };\n\t}\n\n\tconst cleaned = phoneNumber.replace(/\\D/g, \"\");\n\n\tconst countryCode = cleaned.startsWith(\"994\") ? \"994\" : cleaned.startsWith(\"31\") ? \"31\" : null;\n\n\tif (!countryCode) {\n\t\treturn { isValid: false, error: \"Unsupported country code\" };\n\t}\n\n\tconst nationalNumber = cleaned.slice(countryCode.length);\n\tconst validator = validators[countryCode];\n\n\treturn validator(nationalNumber);\n}\n\nexport const getBaseUrl = (hostname: string, language: string) => {\n\tconst domain = DOMAINS.includes(hostname) ? hostname : CO_DOMAIN;\n\tconst locale = language || \"en\";\n\treturn { url: `https://${domain}/${locale}`, domain };\n};\n\nexport const getTLD = (language: string) => {\n\treturn language === \"az\" ? \"az\" : \"co\";\n};\n\nexport const getRegisterUrl = (language: string, source: string) => {\n\tconst tld = getTLD(language);\n\n\treturn `https://app.restaround.${tld}/auth/register?lang=${language}&utm_source=${source}`;\n};\n\nexport const getImageSource = (image?: string) => {\n\tif (!image) return \"\";\n\n\tif (image.includes(\"base64\") || image.startsWith(\"https://\")) return image;\n\n\treturn `${IMAGE_BASE_URL}/${image}`;\n};\n\nexport const getLogoImageSource = (logoImage?: string) => {\n\tif (!logoImage) return \"https://images.restaround.co/no-photo-128.webp\";\n\n\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n};\n\nexport const getCoverPhotoSource = (coverPhoto?: string) => {\n\tif (!coverPhoto) return \"https://images.restaround.co/restaround-doodle.webp\";\n\n\tif (coverPhoto.includes(\"base64\") || coverPhoto.startsWith(\"https://\")) return coverPhoto;\n\n\treturn `${IMAGE_BASE_URL}/${coverPhoto}`;\n};\n\nconst keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nconst triplet = (e1: number, e2: number, e3: number) =>\n\tkeyStr.charAt(e1 >> 2) +\n\tkeyStr.charAt(((e1 & 3) << 4) | (e2 >> 4)) +\n\tkeyStr.charAt(((e2 & 15) << 2) | (e3 >> 6)) +\n\tkeyStr.charAt(e3 & 63);\n\nexport const rgbDataURL = (r: number, g: number, b: number) =>\n\t`data:image/gif;base64,R0lGODlhAQABAPAA${\n\t\ttriplet(0, r, g) + triplet(b, 255, 255)\n\t}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`;\n","import { createContext, ReactElement, useContext } from \"react\";\n\nimport { models as menuModels } from \"src/modules/menu\";\n\nconst StoreContext = createContext<menuModels.PublicMenuData>({} as menuModels.PublicMenuData);\n\nexport const StoreProvider = ({\n\tchildren,\n\tvalue,\n}: {\n\tchildren: ReactElement;\n\tvalue: menuModels.PublicMenuData;\n}) => {\n\treturn <StoreContext.Provider value={value}>{children}</StoreContext.Provider>;\n};\n\nexport const useStoreContext = () => useContext(StoreContext);\n","import { useStoreContext } from \"src/store\";\n\nimport { DEFAULT_HOSTNAME } from \"./constants\";\n\nexport const useHostname = (): string => {\n\tconst { hostname } = useStoreContext();\n\n\treturn hostname || DEFAULT_HOSTNAME;\n};\n\nexport const useIsInDashboard = (): boolean => {\n\tconst { isInDashboard } = useStoreContext();\n\n\treturn isInDashboard || false;\n};\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import * as customerModels from \"../customer/models\";\n\nexport enum OrderType {\n\tDINE_IN = \"DINE_IN\",\n\tPICK_UP = \"PICK_UP\",\n\tDELIVERY = \"DELIVERY\",\n}\n\nexport enum OrderStatus {\n\tDRAFT = \"DRAFT\",\n\tPENDING = \"PENDING\",\n\tCONFIRMED = \"CONFIRMED\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tOUT_FOR_DELIVERY = \"OUT_FOR_DELIVERY\",\n\tDELIVERED = \"DELIVERED\",\n\tCOMPLETED = \"COMPLETED\",\n\tCANCELLED = \"CANCELLED\",\n\tFAILED = \"FAILED\",\n}\n\nexport enum OrderItemStatus {\n\tPENDING = \"PENDING\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tSERVED = \"SERVED\",\n}\n\nexport enum PaymentMethod {\n\tCASH = \"CASH\",\n\tCARD = \"CARD\",\n\tWALLET = \"WALLET\",\n\tTERMINAL = \"TERMINAL\",\n}\n\nexport interface OrderAddonOption {\n\toptionId: number;\n\tprice: number;\n}\n\nexport interface OrderAddon {\n\tid?: number;\n\taddonId: number;\n\toptions: OrderAddonOption[];\n}\n\nexport interface SelectedAddons {\n\t[key: number]: number | number[];\n}\n\nexport interface OrderItemVariant {\n\tid?: number;\n\tvariantId: number;\n\tprice: number;\n}\n\nexport interface OrderItem {\n\tid?: number;\n\tproductId: number;\n\torderId?: number;\n\tquantity: number;\n\tprice: number;\n\tvariant?: OrderItemVariant;\n\taddons: OrderAddon[];\n\tnote?: string;\n\tstatus?: OrderItemStatus;\n\tvat?: number;\n\tisPaid?: boolean;\n}\n\nexport interface Order {\n\tid?: number;\n\tbusinessId?: number;\n\tbranchId?: number;\n\tworkingDayId?: number;\n\ttableId?: number;\n\temployeeId?: number;\n\torderType: OrderType;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithTaxAndFees?: number;\n\ttotalPriceWithoutTax: number;\n\ttotalTax: number;\n\titems: OrderItem[];\n\tstatus?: OrderStatus;\n\tvat?: number;\n\tpaymentMethod?: PaymentMethod;\n\tnote?: string;\n\tcreatedAt?: number;\n\tupdatedAt?: number;\n\tcustomer?: customerModels.Customer;\n\tdeliveryFee?: number;\n}\n\nexport interface OrderItems {\n\t[key: string]: OrderItem;\n}\n\nexport enum OrderStep {\n\tCART = \"CART\",\n\tDETAILS = \"DETAILS\",\n\tCOMPLETED = \"COMPLETED\",\n}\n\nexport interface OrderPayload extends Order {\n\tcustomerAddressId: number;\n\tcustomerId: number;\n}\n\nexport type OrderPriceDetails = {\n\ttotalPriceWithTax: number;\n\ttotalPriceWithTaxAndFees: number;\n\ttotalPriceWithoutTax: number;\n\ttotalTax: number;\n};\n\nexport type OrderFormattedPriceDetails = {\n\ttotalPriceWithTax: string;\n\ttotalPriceWithTaxAndFees: string;\n\ttotalPriceWithoutTax: string;\n\ttotalTax: string;\n};\n","import { OrderStep, PaymentMethod } from \"./models\";\n\nexport const initialOrder = {\n\torderType: null,\n\ttotalPriceWithTax: 0,\n\ttotalPriceWithoutTax: 0,\n\ttotalTax: 0,\n\tvat: 0,\n\tpaymentMethod: PaymentMethod.CASH,\n};\n\nexport const ORDER_STEPS = [OrderStep.CART, OrderStep.DETAILS, OrderStep.COMPLETED];\n\nexport enum OrderErrors {\n\tFIELD_REQUIRED_ERROR = \"This field is required\",\n\tTABLE_NOT_SELECTED = \"Please select a table\",\n\tADDRESS_IS_EMPTY = \"Please enter an address\",\n\tEMPTY_ITEMS = \"Please choose product\",\n\tBRANCH_NOT_SELECTED = \"Please select a branch\",\n}\n","import { isEmpty, priceFormatter, sortNumbers } from \"@sorocraft/js-utils\";\nimport { IconType } from \"@sorocraft/ui\";\nimport { Check, BagCheck, Delivery, Chef, FileCheck, HourglassHalf } from \"@sorocraft/ui/icons\";\n\nimport {\n\tOrder,\n\tOrderAddon,\n\tOrderAddonOption,\n\tOrderItem,\n\tOrderStatus,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nimport * as addonModels from \"../addon/models\";\nimport * as branchModels from \"../branch/models\";\nimport { OrderErrors } from \"./constants\";\n\nexport const calculatSingleAddonTotalPrice = (addon: OrderAddon) => {\n\treturn addon.options.reduce((sum, option) => sum + option.price, 0);\n};\n\nexport function calculateTotalAddonPrice(addons: OrderAddon[] = [], quantity: number = 1): number {\n\tconst totalAddonsPriceForSingleItem = addons.reduce((total, addon) => {\n\t\tconst addonTotal = calculatSingleAddonTotalPrice(addon);\n\t\treturn total + addonTotal;\n\t}, 0);\n\n\treturn quantity * totalAddonsPriceForSingleItem;\n}\n\nexport const getOrderPrice = (order: Order, currency: string, language: string) => {\n\tconst calculateItemTotal = (price: number, quantity: number, addons: OrderAddon[]) => {\n\t\treturn quantity * price + calculateTotalAddonPrice(addons, quantity);\n\t};\n\n\tlet totalWithoutTax = 0;\n\tlet totalTax = 0;\n\n\tfor (const item of order.items) {\n\t\tconst itemTotal = calculateItemTotal(item.price, item.quantity, item.addons);\n\t\ttotalWithoutTax += itemTotal;\n\n\t\tif (order.vat === undefined && item.vat) {\n\t\t\ttotalTax += (itemTotal * item.vat) / 100;\n\t\t}\n\t}\n\n\tif (order.vat !== undefined) {\n\t\ttotalTax = (totalWithoutTax * order.vat) / 100;\n\t}\n\n\tconst totalWithTax = totalWithoutTax + totalTax;\n\n\treturn {\n\t\ttotalWithoutTax,\n\t\ttotalWithoutTaxFormatted: priceFormatter(totalWithoutTax, currency, language),\n\t\ttotalTax,\n\t\ttotalTaxFormatted: priceFormatter(totalTax, currency, language),\n\t\ttotalWithTax,\n\t\ttotalWithTaxFormatted: priceFormatter(totalWithTax, currency, language),\n\t};\n};\n\nexport const generateOrderItemsId = (\n\tproductId: number,\n\tvariantId: number | null,\n\tselectedAddons?: SelectedAddons\n): string => {\n\tif (!productId) throw new Error(\"Product ID is required\");\n\n\t// Build the order items ID base with productId and variantId\n\tlet orderItemsId = `${productId}`;\n\tif (variantId) {\n\t\torderItemsId += `-${variantId}`;\n\t}\n\n\t// Build the addon part of the ID\n\tconst addonIdsPart = Object.entries(selectedAddons || {})\n\t\t.map(([addonId, option]) => {\n\t\t\tif (!addonId || !option) return null; // Skip invalid entries\n\t\t\tconst optionIds = Array.isArray(option)\n\t\t\t\t? sortNumbers(option).filter(Boolean).join(\"-\")\n\t\t\t\t: `${option}`;\n\t\t\tif (!optionIds) return null;\n\t\t\treturn `${addonId}-${optionIds}`;\n\t\t})\n\t\t.filter(Boolean) // Remove null/undefined values\n\t\t.join(\"-\");\n\n\t// Append addonIdsPart if it's not empty\n\tif (addonIdsPart) {\n\t\torderItemsId += `-${addonIdsPart}`;\n\t}\n\n\treturn orderItemsId;\n};\n\nexport const getOrderItemPrice = (orderItem: OrderItem) => {\n\tconst { price, variant, addons, quantity, vat } = orderItem || {};\n\tconst basePrice = variant?.price ?? price;\n\tconst addonsPrice = calculateTotalAddonPrice(addons, 1); // single item's addon price\n\n\tconst itemNetPrice = basePrice + addonsPrice;\n\t// Currently VAT is applied only on basePrice, not on addons\n\t// TODO: Re-evaluate for European market where tax may apply to addons too\n\tconst itemTax = basePrice * (vat / 100);\n\tconst itemGrossPrice = itemNetPrice + itemTax;\n\n\tconst totalNet = itemNetPrice * quantity;\n\tconst totalTax = itemTax * quantity;\n\tconst totalGross = itemGrossPrice * quantity;\n\n\treturn {\n\t\ttotalGross,\n\t\ttotalNet,\n\t\ttotalTax,\n\t\titemGrossPrice,\n\t\titemNetPrice,\n\t\titemTax,\n\t};\n};\n\nexport const getSelectedAddonsFromOrderItems = (item: OrderItem): SelectedAddons => {\n\tconst selectedAddons: SelectedAddons = {};\n\n\tfor (const { addonId, options = [] } of item.addons || []) {\n\t\tconst optionIds = options.map(({ optionId }) => optionId);\n\t\tselectedAddons[addonId] = optionIds.length === 1 ? optionIds[0] : optionIds;\n\t}\n\n\treturn selectedAddons;\n};\n\nexport const getStatusIcon = (status: OrderStatus): IconType => {\n\tswitch (status) {\n\t\tcase OrderStatus.COMPLETED:\n\t\t\treturn Check;\n\t\tcase OrderStatus.DELIVERED:\n\t\t\treturn BagCheck;\n\t\tcase OrderStatus.OUT_FOR_DELIVERY:\n\t\t\treturn Delivery;\n\t\tcase OrderStatus.PREPARING:\n\t\t\treturn Chef;\n\t\tcase OrderStatus.CONFIRMED:\n\t\t\treturn FileCheck;\n\t\tcase OrderStatus.PENDING:\n\t\t\treturn HourglassHalf;\n\n\t\tdefault:\n\t\t\treturn HourglassHalf;\n\t}\n};\n\nexport const buildSelectedAddonsPayload = (\n\tproductAddons: addonModels.MenuAddon[] = [],\n\tselectedAddons: SelectedAddons = {}\n): OrderAddon[] => {\n\treturn Object.entries(selectedAddons).map(([addonIdStr, selected]) => {\n\t\tconst addonId = Number(addonIdStr);\n\t\tconst selectedOptionIds = Array.isArray(selected) ? selected : [selected];\n\n\t\tconst addon = productAddons.find((addon) => addon.id === addonId);\n\t\tif (isEmpty(addon)) {\n\t\t\treturn {\n\t\t\t\taddonId,\n\t\t\t\toptions: [],\n\t\t\t};\n\t\t}\n\n\t\tconst options: OrderAddonOption[] = (addon.options || [])\n\t\t\t.filter((option) => selectedOptionIds.includes(option.id))\n\t\t\t.map((option) => ({\n\t\t\t\toptionId: option.id,\n\t\t\t\tprice: option.price,\n\t\t\t}));\n\n\t\treturn {\n\t\t\taddonId,\n\t\t\toptions,\n\t\t};\n\t});\n};\n\nexport const getDefaultOrderType = (\n\tsettings: branchModels.BranchSettings,\n\tisOpen: boolean,\n\tisDelivering: boolean\n): OrderType | null => {\n\tif (!settings) return null;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\tif (deliveryOrderEnabled && isDelivering) {\n\t\treturn OrderType.DELIVERY;\n\t}\n\n\tif (dineInOrderEnabled && isOpen) {\n\t\treturn OrderType.DINE_IN;\n\t}\n\n\tif (pickupOrderEnabled && isOpen) {\n\t\treturn OrderType.PICK_UP;\n\t}\n\n\treturn null;\n};\n\nexport const getOrderErrorMessages = (field: keyof Order) => {\n\tswitch (field) {\n\t\tcase \"customer\":\n\t\t\treturn OrderErrors.ADDRESS_IS_EMPTY;\n\n\t\tcase \"tableId\":\n\t\t\treturn OrderErrors.TABLE_NOT_SELECTED;\n\n\t\tcase \"items\":\n\t\t\treturn OrderErrors.EMPTY_ITEMS;\n\n\t\tcase \"branchId\":\n\t\t\treturn OrderErrors.BRANCH_NOT_SELECTED;\n\n\t\tdefault:\n\t\t\treturn OrderErrors.FIELD_REQUIRED_ERROR;\n\t}\n};\n","export const BASE_API_URL = \"https://api.restaround.co/api/v1\";\n","import { BASE_API_URL } from \"src/constants/env\";\nimport { storage } from \"src/modules/view/services\";\n\nconst request = async (method: \"POST\" | \"PATCH\" | \"GET\", endpoint: string, body?: any) => {\n\tconst { accessToken } = storage.getAuthToken();\n\tconst url = `${BASE_API_URL}/${endpoint}`;\n\n\tconst response = await fetch(url, {\n\t\tmethod,\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\tAuthorization: accessToken,\n\t\t},\n\t\tcredentials: \"include\",\n\t\tbody: JSON.stringify(body),\n\t});\n\n\tconst data = await response.json();\n\n\tif (!response.ok) {\n\t\tthrow data;\n\t}\n\n\treturn data;\n};\n\nexport const API = {\n\tpost: (endpoint: string, body: any) => request(\"POST\", endpoint, body),\n\tpatch: (endpoint: string, body: any) => request(\"PATCH\", endpoint, body),\n\tget: (endpoint: string) => request(\"GET\", endpoint),\n};\n","import { API } from \"src/services/api\";\nimport * as viewModels from \"../view/models\";\n\nimport { AuthResponse, Customer, CustomerUpdatePayload } from \"./models\";\n\nexport const getCustomer = async (): Promise<Customer> => {\n\treturn API.get(\"customer\");\n};\n\nexport const loginCustomer = async (phoneNumber: string): Promise<{ status: number }> => {\n\treturn API.post(\"customer\", { phoneNumber });\n};\n\nexport const verifyOTP = async (otp: string, phoneNumber: string): Promise<AuthResponse> => {\n\treturn API.post(\"otp/verify\", { otp, phoneNumber });\n};\n\nexport const update = async (payload: CustomerUpdatePayload) => {\n\treturn API.patch(\"customer\", payload);\n};\n\nexport const getCustomerDistance = async (\n\tbranchCoordinates: viewModels.Coordinates,\n\tcustomerCoordinates: viewModels.Coordinates\n) => {\n\t// eslint-disable-next-line no-undef\n\tconst { spherical } = (await google.maps.importLibrary(\n\t\t\"geometry\"\n\t\t// eslint-disable-next-line no-undef\n\t)) as google.maps.GeometryLibrary;\n\t// eslint-disable-next-line no-undef\n\tconst coordinate1 = new google.maps.LatLng(\n\t\tbranchCoordinates.latitude,\n\t\tbranchCoordinates.longitude\n\t);\n\t// eslint-disable-next-line no-undef\n\tconst coordinate2 = new google.maps.LatLng(\n\t\tcustomerCoordinates.latitude,\n\t\tcustomerCoordinates.longitude\n\t);\n\n\tconst distanceInMeters = spherical.computeDistanceBetween(coordinate1, coordinate2);\n\n\treturn distanceInMeters;\n};\n","import { trackEvent } from \"@sorocraft/js-utils\";\n\nimport { BASE_API_URL } from \"src/constants/env\";\n\nexport const logException = async (error: any = null, errorInfo = {}) => {\n\ttry {\n\t\ttrackEvent(\"error\", { message: error?.message });\n\t\treturn await fetch(`${BASE_API_URL}/log`, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t\tcredentials: \"include\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tmessage: error?.message || JSON.stringify(error),\n\t\t\t\t...errorInfo,\n\t\t\t}),\n\t\t});\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t}\n};\n","import { BranchWorkDays } from \"src/models\";\n\nexport const getHoursForDay = (schedule: BranchWorkDays, weekDayIndex: number) => {\n\treturn (schedule?.days || []).find(({ day }: any) => day === weekDayIndex)?.hours;\n};\n\nexport const splitHours = (hours: string): number[] => {\n\treturn (hours || \"\").split(\":\").map(Number);\n};\n\nexport const isWithinTimeRange = (timeRange?: { openAt: string; closeAt: string }): boolean => {\n\tif (!timeRange) return false;\n\n\tconst now = new Date();\n\tconst [openH, openM] = splitHours(timeRange.openAt);\n\tconst [closeH, closeM] = splitHours(timeRange.closeAt);\n\n\tconst start = new Date(now);\n\tstart.setHours(openH, openM, 0, 0);\n\n\tconst end = new Date(now);\n\tend.setHours(closeH, closeM, 0, 0);\n\n\t// If the end time is earlier than the start, it means it passes midnight\n\tif (end <= start) {\n\t\t// If now is before end, assume it's the next day\n\t\tif (now < end) {\n\t\t\tstart.setDate(start.getDate() - 1);\n\t\t} else {\n\t\t\tend.setDate(end.getDate() + 1);\n\t\t}\n\t}\n\n\treturn now >= start && now <= end;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useMemo } from \"react\";\n\nimport { useStoreContext } from \"src/store\";\n\nimport * as viewModels from \"../view/models\";\nimport { getHoursForDay, isWithinTimeRange } from \"./utils\";\nimport { Branch, BranchServes, BranchSettings } from \"./models\";\n\nexport const useHasSingleBranch = (): boolean => {\n\tconst { branches } = useStoreContext();\n\n\treturn (branches || []).length <= 1;\n};\n\nexport const useSelectedBranch = (): Branch => {\n\tconst { branches, branchId } = useStoreContext();\n\tconst hasSingleBranch = useHasSingleBranch();\n\n\tif (isEmpty(branches)) return {} as Branch;\n\n\tif (hasSingleBranch) {\n\t\treturn branches[0];\n\t}\n\n\treturn branches.find((item) => item.id === Number(branchId)) || ({} as Branch);\n};\n\nexport const useBranchCoordinates = (): viewModels.Coordinates => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn { latitude: selectedBranch?.latitude, longitude: selectedBranch?.longitude };\n};\n\nexport const useBranchAddress = (): string => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn selectedBranch.address || \"\";\n};\n\nexport const useBranchServes = (): BranchServes => {\n\tconst selectedBranch = useSelectedBranch();\n\tconst { openingHours, deliveryHours } = selectedBranch || {};\n\n\tif (!openingHours?.days || !deliveryHours?.days) {\n\t\treturn { isOpen: false, isDelivering: false };\n\t}\n\n\tconst now = new Date();\n\tconst weekDayIndex = (now.getUTCDay() + 6) % 7; // Mon - 0, Tue - 1, ...\n\n\tconst openHours = getHoursForDay(openingHours, weekDayIndex);\n\tconst deliveryHoursToday = getHoursForDay(deliveryHours, weekDayIndex);\n\n\treturn {\n\t\tisOpen: isWithinTimeRange(openHours),\n\t\tisDelivering: isWithinTimeRange(deliveryHoursToday),\n\t};\n};\n\nexport const useBranchSettings = (): BranchSettings => {\n\tconst selectedBranch = useSelectedBranch();\n\n\treturn selectedBranch?.settings || ({} as BranchSettings);\n};\n\nexport const useMaxDeliveryDistance = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.maxDeliveryDistance;\n};\n\nexport const useMinDeliveryAmount = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.minDeliveryAmount;\n};\n\nexport const useOrderEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\tif (isEmpty(settings)) return false;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\treturn deliveryOrderEnabled || dineInOrderEnabled || pickupOrderEnabled;\n};\n\nexport const useIsDeliveryEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\treturn settings?.deliveryOrderEnabled;\n};\n\nexport const useVenueName = () => {\n\tconst { business } = useStoreContext();\n\tconst selectedBranch = useSelectedBranch();\n\tconst hasSingleBranch = useHasSingleBranch();\n\tconst businessName = business?.name || \"Restaround\";\n\n\tif (hasSingleBranch) return businessName;\n\n\tif (selectedBranch?.name) {\n\t\treturn `${businessName} ${selectedBranch.name}`;\n\t}\n\n\treturn businessName;\n};\n\nexport const useBranchId = (): number | undefined => {\n\tconst { branchId } = useStoreContext();\n\n\treturn branchId;\n};\n\nexport const useNormalizedRootPath = (): string => {\n\tconst store = useStoreContext();\n\tconst rootPath = store.rootPath || \"\";\n\n\treturn useMemo(() => (rootPath?.endsWith?.(\"/\") ? rootPath.slice(0, -1) : rootPath), [rootPath]);\n};\n\nexport const useList = (): Branch[] => {\n\tconst { branches } = useStoreContext();\n\n\treturn branches || [];\n};\n\nexport const useOnBranchSelect = (): ((branchId: number) => void) => {\n\tconst { onBranchSelect } = useStoreContext();\n\n\treturn onBranchSelect;\n};\n","// THIS CAN'T BE IMPERTED BY OTHER MODULES\n\nimport * as orderModels from \"src/modules/order/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as tableHooks from \"src/modules/table/hooks\";\n\nexport const useInitialOrder = ({\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId = undefined,\n}: {\n\tdefaultOrderType: orderModels.OrderType;\n\tdefaultPaymentMethod: orderModels.PaymentMethod;\n\tdefaultBranchId: number;\n}): Partial<orderModels.Order> => {\n\tconst tableId = tableHooks.usePreDefinedTableId();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst branchSettings = branchHooks.useBranchSettings();\n\n\tconst orderType =\n\t\tdefaultOrderType || orderUtils.getDefaultOrderType(branchSettings, isOpen, isDelivering);\n\n\treturn {\n\t\tbranchId: defaultBranchId,\n\t\torderType,\n\t\ttableId: tableId ? Number(tableId) : undefined,\n\t\ttotalPriceWithTax: 0,\n\t\ttotalPriceWithoutTax: 0,\n\t\ttotalTax: 0,\n\t\tvat: 0,\n\t\tpaymentMethod: defaultPaymentMethod || orderModels.PaymentMethod.CASH,\n\t};\n};\n","import { useStoreContext } from \"src/store\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { Table } from \"./models\";\n\nexport const useList = (): Table[] => {\n\tconst { tables } = useStoreContext();\n\n\treturn tables;\n};\n\nexport const usePreDefinedTable = (): Table => {\n\tconst { tableId, tables } = useStoreContext();\n\n\tif (!tableId || isEmpty(tables)) return {} as Table;\n\n\treturn tables.find((table) => Number(table.id) === Number(tableId)) || ({} as Table);\n};\n\nexport const usePreDefinedTableId = (): string => {\n\tconst { tableId } = useStoreContext();\n\n\treturn tableId;\n};\n","import {\n\tcreateContext,\n\tDispatch,\n\tReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tSetStateAction,\n} from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { FormErrors } from \"@sorocraft/ui\";\n\nimport * as productModels from \"src/modules/product/models\";\nimport * as orderModels from \"src/modules/order/models\";\nimport * as customerModels from \"src/modules/customer/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderConstants from \"src/modules/order/constants\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as commonServices from \"src/modules/common/services\";\nimport * as viewServices from \"src/modules/view/services\";\nimport * as storeHooks from \"src/modules/store/hooks\";\n\ntype UpdateOrderItemsParams = {\n\tproduct: productModels.Product;\n\tquantity?: number;\n\tvariantId?: number | null;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tnote?: string;\n};\n\ntype OrderContent = {\n\torder: Partial<orderModels.Order>;\n\torderStep: orderModels.OrderStep;\n\torderItems: orderModels.OrderItems;\n\tisOrderOpen: boolean;\n\tcustomer: customerModels.Customer;\n\ttrackingId: string;\n\terrors?: FormErrors;\n\tsetOrderStep: Dispatch<SetStateAction<orderModels.OrderStep>>;\n\tupdateOrder: (updatedFields: Partial<orderModels.Order>) => void;\n\taddProduct: (params: UpdateOrderItemsParams) => void;\n\tupdateProduct: (params: UpdateOrderItemsParams) => void;\n\tremoveAllProductVariants: (productId: number) => void;\n\tsetIsOrderOpen: Dispatch<SetStateAction<boolean>>;\n\tgetCustomer: () => void;\n\tresetOrder: (force?: boolean, shouldClose?: boolean) => void;\n\tsetTrackingId: Dispatch<SetStateAction<string>>;\n\tupdateOrderErrors: (field: keyof orderModels.Order) => void;\n\tresetErrors: () => void;\n};\n\ntype OrderProviderProps = {\n\tchildren: ReactNode;\n\tdefaultOrderType?: orderModels.OrderType;\n\tdefaultPaymentMethod?: orderModels.PaymentMethod;\n\tdefaultBranchId?: number;\n\tisOrderDefaultOpen?: boolean;\n};\n\nconst OrderContext = createContext<OrderContent>({\n\torder: orderConstants.initialOrder,\n\torderStep: orderModels.OrderStep.CART,\n\torderItems: {},\n\tisOrderOpen: false,\n\tcustomer: {} as customerModels.Customer,\n\ttrackingId: \"\",\n\terrors: {},\n\tupdateOrder: () => {},\n\tsetOrderStep: () => {},\n\taddProduct: () => {},\n\tupdateProduct: () => {},\n\tremoveAllProductVariants: () => {},\n\tsetIsOrderOpen: () => {},\n\tgetCustomer: () => {},\n\tresetOrder: () => {},\n\tsetTrackingId: () => {},\n\tupdateOrderErrors: () => {},\n\tresetErrors: () => {},\n} satisfies OrderContent);\n\nexport const OrderProvider = ({\n\tchildren,\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId,\n\tisOrderDefaultOpen = false,\n}: OrderProviderProps) => {\n\tconst initialOrder = storeHooks.useInitialOrder({\n\t\tdefaultOrderType,\n\t\tdefaultPaymentMethod,\n\t\tdefaultBranchId,\n\t});\n\tconst [customer, setCustomer] = useState<customerModels.Customer>({} as customerModels.Customer);\n\tconst [order, setOrder] = useState<Partial<orderModels.Order>>(initialOrder);\n\tconst [orderStep, setOrderStep] = useState<orderModels.OrderStep>(orderModels.OrderStep.CART);\n\tconst [orderItems, setOrderItems] = useState<orderModels.OrderItems>({});\n\tconst [isOrderOpen, setIsOrderOpen] = useState<boolean>(isOrderDefaultOpen);\n\tconst [trackingId, setTrackingId] = useState<string>(\"\");\n\tconst [errors, setErrors] = useState<FormErrors>({});\n\n\tconst updateOrder = useCallback(\n\t\t(updatedFields: Partial<orderModels.Order>) => {\n\t\t\tsetOrder((currentOrder) => ({\n\t\t\t\t...currentOrder,\n\t\t\t\t...updatedFields,\n\t\t\t}));\n\n\t\t\t// Clear proper errors\n\t\t\t[\"branchId\", \"tableId\"].forEach((field) => {\n\t\t\t\tif (updatedFields[field] && errors?.[field]) {\n\t\t\t\t\tsetErrors((currentErrors) => ({ ...currentErrors, [field]: null }));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t[errors]\n\t);\n\n\tconst updateOrderItems = useCallback(\n\t\t({\n\t\t\tproduct,\n\t\t\tquantity,\n\t\t\tvariantId,\n\t\t\tselectedAddons,\n\t\t\tnote,\n\t\t\tisAddOperation,\n\t\t}: UpdateOrderItemsParams & { isAddOperation: boolean }) => {\n\t\t\tif (isEmpty(product) || quantity < 0) return;\n\n\t\t\tconst { id: productId, vat = 0, variants, addons, price } = product;\n\t\t\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\n\t\t\tsetOrderItems((currentOrderItems) => {\n\t\t\t\tconst existingItem = currentOrderItems[orderItemsId];\n\t\t\t\tconst newQuantity = isAddOperation ? (existingItem?.quantity || 0) + quantity : quantity;\n\n\t\t\t\t// Remove item if quantity is zero\n\t\t\t\tif (newQuantity <= 0) {\n\t\t\t\t\tconst { [orderItemsId]: _, ...remainingOrderItems } = currentOrderItems;\n\t\t\t\t\treturn remainingOrderItems;\n\t\t\t\t}\n\n\t\t\t\tconst selectedVariant = variants.find(({ id }) => id === variantId);\n\t\t\t\tconst selectedAddonsPayload: orderModels.OrderAddon[] =\n\t\t\t\t\torderUtils.buildSelectedAddonsPayload(addons, selectedAddons);\n\n\t\t\t\t// Update or add item\n\t\t\t\treturn {\n\t\t\t\t\t...currentOrderItems,\n\t\t\t\t\t[orderItemsId]: {\n\t\t\t\t\t\tproductId,\n\t\t\t\t\t\tquantity: newQuantity,\n\t\t\t\t\t\tprice,\n\t\t\t\t\t\tnote,\n\t\t\t\t\t\tvat,\n\t\t\t\t\t\t...(!isEmpty(selectedVariant) && {\n\t\t\t\t\t\t\tvariant: { variantId: selectedVariant.id, price: selectedVariant.price },\n\t\t\t\t\t\t}),\n\t\t\t\t\t\taddons: selectedAddonsPayload,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tif (isAddOperation && errors?.items) {\n\t\t\t\tsetErrors((currentErrors) => ({ ...currentErrors, items: null }));\n\t\t\t}\n\t\t},\n\t\t[errors?.items]\n\t);\n\n\tconst addProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: true,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems]\n\t);\n\n\tconst updateProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: false,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems]\n\t);\n\n\tconst removeAllProductVariants = useCallback(\n\t\t(productId: number) => {\n\t\t\tif (!productId || isEmpty(orderItems)) return;\n\n\t\t\t// Filter out order items that do not belong to the given productId\n\t\t\tconst updatedOrderItems = Object.entries(orderItems).reduce(\n\t\t\t\t(acc, [orderItemsId, orderItem]) => {\n\t\t\t\t\tif (orderItem.productId !== productId) {\n\t\t\t\t\t\tacc[orderItemsId] = orderItem;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t{} as orderModels.OrderItems\n\t\t\t);\n\n\t\t\t// Update the order items with the remaining items\n\t\t\tsetOrderItems(updatedOrderItems);\n\t\t},\n\t\t[orderItems]\n\t);\n\n\tconst getCustomer = useCallback(async () => {\n\t\ttry {\n\t\t\tconst { accessToken } = viewServices.storage.getAuthToken();\n\t\t\tif (!accessToken) return;\n\n\t\t\tconst response = await customerServices.getCustomer();\n\n\t\t\tif (!response?.id) {\n\t\t\t\tthrow new Error(\"SOMETHING_WENT_WRONG\");\n\t\t\t}\n\n\t\t\tsetCustomer(response);\n\t\t} catch (error) {\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/store/order.tsx\",\n\t\t\t\tmethod: \"getCustomer\",\n\t\t\t});\n\t\t}\n\t}, []);\n\n\tconst resetOrder = useCallback(\n\t\t(force: boolean = false, shouldClose = true) => {\n\t\t\tif (shouldClose) setIsOrderOpen(false);\n\n\t\t\t// clear order if it flow is completed\n\t\t\tif (orderStep === orderModels.OrderStep.COMPLETED || force) {\n\t\t\t\tsetOrder(initialOrder);\n\t\t\t\tsetOrderItems({});\n\t\t\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t\t\t\tsetTrackingId(\"\");\n\t\t\t}\n\t\t},\n\t\t[initialOrder, orderStep]\n\t);\n\n\tconst updateOrderErrors = useCallback((field: keyof orderModels.Order) => {\n\t\tsetErrors((currentErrors) => ({\n\t\t\t...currentErrors,\n\t\t\t[field]: orderUtils.getOrderErrorMessages(field),\n\t\t}));\n\t}, []);\n\n\tconst resetErrors = useCallback(() => {\n\t\tsetErrors({});\n\t}, []);\n\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\tsetOrderStep,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tsetIsOrderOpen,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t}),\n\t\t[\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t]\n\t);\n\n\treturn <OrderContext.Provider value={contextValue}>{children}</OrderContext.Provider>;\n};\n\nexport const useOrderContext = () => useContext(OrderContext);\n","export type BranchWorkHour = {\n\topenAt: string;\n\tcloseAt: string;\n};\n\nexport type BranchWorkDay = {\n\tday: number;\n\thours: BranchWorkHour | null;\n};\n\nexport type BranchWorkDays = {\n\tdays: BranchWorkDay[];\n};\n\nexport interface BranchSettings {\n\tdeliveryOrderEnabled: boolean;\n\tpickupOrderEnabled: boolean;\n\tdineInOrderEnabled: boolean;\n\tmaxDeliveryDistance: number;\n\tminDeliveryAmount: number;\n\tdeliveryFeeAmount: number;\n}\n\nexport enum BranchSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n\tDELIVERY_FEE_AMOUNT = \"deliveryFeeAmount\",\n}\n\nexport interface Branch {\n\tid: number;\n\tname: string;\n\tbusinessId: number;\n\taddress: string;\n\tlongitude?: number;\n\tlatitude?: number;\n\tphone?: string;\n\twhatsApp?: string;\n\ttelegram?: string;\n\twifiPassword?: string;\n\tcreatedAt?: number;\n\tcoverPhoto?: string;\n\tsettings?: BranchSettings;\n\topeningHours?: BranchWorkDays;\n\tdeliveryHours?: BranchWorkDays;\n}\n\nexport type BranchServes = {\n\tisOpen: boolean;\n\tisDelivering: boolean;\n};\n","import * as featureModels from \"../feature/models\";\nimport * as subscriptionModels from \"../subscription/models\";\n\nexport interface BusinessLanguage {\n\tid: number;\n\tcode: string;\n\tbusinessId: number;\n}\n\nexport enum BusinessSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n}\n\nexport interface Business {\n\tid: number;\n\tname: string;\n\tusername: string;\n\tavatar64?: string;\n\tavatar128?: string;\n\tavatar256?: string;\n\tcoverPhoto?: string;\n\tinstagram?: string;\n\tfacebook?: string;\n\ttiktok?: string;\n\tcreatedAt?: number;\n\tcurrency: string;\n\tlanguages: BusinessLanguage[];\n\tsubscriptions?: subscriptionModels.Subscription[];\n\tsegment?: featureModels.FeatureSegment;\n}\n","export const DEFAULT_LANGUAGE = \"en\";\nexport const DEFAULT_CURRENCY = \"AZN\";\n","import { useStoreContext } from \"src/store\";\n\nimport { Business, BusinessLanguage } from \"./models\";\nimport { DEFAULT_CURRENCY, DEFAULT_LANGUAGE } from \"./constants\";\n\nexport const useBusiness = (): Business => {\n\tconst { business } = useStoreContext();\n\n\treturn business || ({} as Business);\n};\n\nexport const useCurrency = () => {\n\tconst { currency } = useBusiness();\n\n\treturn currency || DEFAULT_CURRENCY;\n};\n\nexport const useBusinessId = (): number => {\n\tconst { id } = useBusiness();\n\n\treturn id;\n};\n\nexport const useBusinessUsername = (): string => {\n\tconst { username } = useBusiness();\n\n\treturn username || \"\";\n};\n\nexport const useLanguages = (): BusinessLanguage[] => {\n\tconst business = useBusiness();\n\n\treturn business.languages || [];\n};\n\nexport const useLanguage = (): string => {\n\tconst { language } = useStoreContext();\n\n\treturn language || DEFAULT_LANGUAGE;\n};\n\nexport const useOnLanguageSelect = (): ((code: string) => void) => {\n\tconst { onLanguageSelect } = useStoreContext();\n\n\treturn onLanguageSelect;\n};\n\nexport const useBusinessSegment = () => {\n\tconst { segment } = useBusiness();\n\n\treturn segment;\n};\n","import { useState } from \"react\";\nimport { classNames, Row } from \"@sorocraft/ui\";\n\nimport styles from \"./Languages.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nconst Languages = () => {\n\tconst [isOptionsOpen, setIsOptionsOpen] = useState(false);\n\tconst languages = businessHooks.useLanguages();\n\tconst language = businessHooks.useLanguage();\n\tconst onLanguageSelect = businessHooks.useOnLanguageSelect();\n\n\tconst isBilingual = languages.length > 1;\n\tconst otherLanguages = languages.filter(({ code }) => code !== language) || [];\n\n\tconst getFlag = (code: string) => {\n\t\treturn `https://images.restaround.co/languages/${code}.svg`;\n\t};\n\n\tif (!isBilingual) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={() => setIsOptionsOpen(!isOptionsOpen)}>\n\t\t\t<Row alignItems=\"center\" gap={0}>\n\t\t\t\t<Row\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\toptions: true,\n\t\t\t\t\t\tisOpen: isOptionsOpen,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{otherLanguages.map(({ code }) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={getFlag(code)}\n\t\t\t\t\t\t\tclassName={styles.option}\n\t\t\t\t\t\t\tkey={code}\n\t\t\t\t\t\t\tonClick={() => onLanguageSelect?.(code)}\n\t\t\t\t\t\t\talt={code}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<img src={getFlag(language)} alt={language || \"\"} className={styles.currentLanguage} />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default Languages;\n","import { Column, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./BusinessHeader.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport Languages from \"../Languages\";\n\nconst BusinessHeader = () => {\n\tconst { coverPhoto, avatar256, name } = businessHooks.useBusiness();\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img\n\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\talt={name}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<Column\n\t\t\t\t\tfullWidth\n\t\t\t\t\tfullHeight\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tjustifyContent=\"center\"\n\t\t\t\t\tgap={0.5}\n\t\t\t\t\tclassName={styles.container}\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={viewUtils.getLogoImageSource(avatar256)}\n\t\t\t\t\t\talt={name}\n\t\t\t\t\t\tclassName={styles.logo}\n\t\t\t\t\t\twidth={96}\n\t\t\t\t\t\theight={96}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t\t<Text variant=\"h1\" color=\"white\" className={styles.name} align=\"center\">\n\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</div>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t</div>\n\t);\n};\nexport default BusinessHeader;\n","import { IconTheme, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { ChevronLeft } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BackIcon.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as viewHooks } from \"src/modules/view\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\ninterface Props {\n\tonClick?: () => void;\n\tsize?: SIZE;\n\ttheme?: IconTheme;\n}\n\nconst BackIcon = ({ onClick, size, theme }: Props) => {\n\tconst language = businessHooks.useLanguage();\n\tconst username = businessHooks.useBusinessUsername();\n\tconst isInDashboard = viewHooks.useIsInDashboard();\n\tconst onBranchSelect = branchHooks.useOnBranchSelect();\n\n\tconst handleGoBack = () => {\n\t\tif (isInDashboard) return onBranchSelect?.(\"\" as never);\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tif (!username) return window.history?.back?.();\n\n\t\twindow.location.pathname = `/${language}/${username}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={onClick || handleGoBack}>\n\t\t\t<SVGIcon icon={ChevronLeft} size={size} theme={theme} />\n\t\t</div>\n\t);\n};\nexport default BackIcon;\n","import { IconLink, Row, SVGIcon, Tooltip, useModalContext } from \"@sorocraft/ui\";\nimport {\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n\tClock,\n} from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./HeaderLinks.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { constants as viewConstants } from \"src/modules/view\";\n\nconst HeaderLinks = () => {\n\tconst { setModal } = useModalContext();\n\tconst { phone, wifiPassword, whatsApp, telegram, openingHours, deliveryHours } =\n\t\tbranchHooks.useSelectedBranch();\n\tconst { instagram, tiktok, facebook } = businessHooks.useBusiness();\n\n\tconst isBusinessHoursAvailable = !isEmpty(openingHours?.days) || !isEmpty(deliveryHours?.days);\n\n\tconst openBusinessHours = () => {\n\t\tsetModal({\n\t\t\tid: viewConstants.MODALS.BRANCH_BUSINESS_HOURS,\n\t\t\tparams: { openingHours, deliveryHours },\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.links}>\n\t\t\t\t<Row gap={2} alignItems=\"center\">\n\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t{!!phone && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!whatsApp && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsApp}`}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!instagram && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!telegram && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!tiktok && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!facebook && (\n\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{!!wifiPassword && (\n\t\t\t\t\t\t\t<Tooltip hint={wifiPassword}>\n\t\t\t\t\t\t\t\t<div className={styles.wifiPassword}>\n\t\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{isBusinessHoursAvailable && (\n\t\t\t\t\t\t\t<div className={styles.businessHours} onClick={openBusinessHours}>\n\t\t\t\t\t\t\t\t<SVGIcon icon={Clock} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Row>\n\t\t\t\t</Row>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default HeaderLinks;\n","import { Column, Flex, Row, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchHeader.module.scss\";\n\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport BackIcon from \"src/components/BackIcon\";\nimport Languages from \"../Languages\";\nimport HeaderLinks from \"./HeaderLinks\";\n\nconst BranchHeader = () => {\n\tconst { coverPhoto, avatar256 } = businessHooks.useBusiness();\n\tconst venueName = branchHooks.useVenueName();\n\tconst address = branchHooks.useBranchAddress();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\tconst { latitude, longitude } = branchHooks.useBranchCoordinates();\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img\n\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\talt={venueName}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<Column\n\t\t\t\t\tjustifyContent={hasSingleBranch ? \"flex-end\" : \"space-between\"}\n\t\t\t\t\tfullHeight\n\t\t\t\t\tfullWidth\n\t\t\t\t\tgap={0}\n\t\t\t\t>\n\t\t\t\t\t{!hasSingleBranch && <BackIcon size=\"lg\" theme=\"dark-theme\" />}\n\t\t\t\t\t<Flex direction=\"row\" gap={1} alignItems=\"center\" fullWidth>\n\t\t\t\t\t\t<Flex.Item>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tsrc={viewUtils.getLogoImageSource(avatar256)}\n\t\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\t\tclassName={styles.logo}\n\t\t\t\t\t\t\t\twidth={96}\n\t\t\t\t\t\t\t\theight={96}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t<Flex.Item shrink className={styles.info}>\n\t\t\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tclassName={styles.name}\n\t\t\t\t\t\t\t\t\tvariant=\"h1\"\n\t\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t\t\t\t\tweight=\"bold\"\n\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{venueName}\n\t\t\t\t\t\t\t\t</Text>\n\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t\t\t<span className={styles.addressText}>{address}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t</Flex>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t\t<HeaderLinks />\n\t\t</div>\n\t);\n};\nexport default BranchHeader;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport BusinessHeader from \"./BusinessHeader\";\nimport BranchHeader from \"./BranchHeader\";\n\nconst Header = () => {\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\n\tif (hasSingleBranch || !isEmpty(selectedBranch)) return <BranchHeader />;\n\n\treturn <BusinessHeader />;\n};\nexport default Header;\n","import az from \"./az\";\nimport en from \"./en\";\nimport ru from \"./ru\";\nimport tr from \"./tr\";\nimport nl from \"./nl\";\nimport et from \"./et\";\n\nexport default {\n\taz,\n\ten,\n\tru,\n\ttr,\n\tnl,\n\tet,\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Xəta baş verdi! Zəhmət olmazsa, yenidən cəhd edin.\",\n\tFIELD_REQUIRED: \"Bu xananı doldurmaq mütləqdir\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azərbaycan nömrələri 9 rəqəmli olur və 50, 51, 10, 55, 99, 70, 77 və ya 60 ilə başlamalıdır\",\n\t\"Unsupported country code\": \"Ölkə kodu düzgün deyil\",\n\t\"Invalid OTP\": \"Təsdiq kodu düzgün deyil\",\n\tINVALID_OTP: \"Təsdiq kodu düzgün deyil\",\n\tOTP_RATE_LIMIT_EXCEEDED:\n\t\t\"Təsdiq kodu göndərmək üçün limiti keçmisiniz. Biraz sonra, yenidən yoxlayın\",\n\t\"Invalid Email Address\": \"Email ünvanı düzgün deyil\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu funksiya mövcud tarif planınıza daxil deyil.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sifariş növü aktiv deyil\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Bu sifariş növü indi aktiv deyil\",\n\tCOUNTRY_REQUIRED: \"Ölkə daxil edilməlidir.\",\n\tCITY_REQUIRED: \"Şəhər daxil edilməlidir.\",\n\tSTREET_REQUIRED: \"Küçə adı daxil edilməlidir.\",\n\tSTREET_NUMBER_REQUIRED: \"Ev nömrəsi daxil edilməlidir.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu filial sizin ünvana çatdırılma etmir.\",\n\tNO_ORDER_TYPE: \"Zəhmət olmazsa, sifariş növünü seçin.\",\n};\n","export default {\n\tSave: \"Yadda saxla\",\n\tCancel: \"Ləğv et\",\n\tContinue: \"Davam et\",\n};\n","export default {\n\t\"View order\": \"Şifarişi göstər\",\n\t\"Remove from order\": \"Sifarişdən sil\",\n\t\"Update order\": \"Sifarişi yenilə\",\n\t\"Add to order\": \"Sifarişə əlavə et\",\n\tAdd: \"Əlavə et\",\n\t\"Your order\": \"Sifarişiniz\",\n\tSubtotal: \"Ümumi\",\n\t\"Empty order\": \"Boş sifariş\",\n\t\"You don't have any items in your order\": \"Sifarişinizdə heç bir məhsul yoxdur\",\n\t\"Add items\": \"Məhsul əlavə et\",\n\t\"Add an order note\": \"Restoran üçün qeyd\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Hər hansısa allergiyanız, xüsusi istəkləriniz və ya əlavə etmək, çıxarmaq istədiyiniz inqrediyentlər varsa, qeyd edin.\",\n\t\"Your Order is Completed!\": \"Sifarişiniz tamamlandı!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Təşəkkür edirik! Sifarişinizi qəbul etdik, qısa zamanda çatdırılacaq.\",\n\tDelivery: \"Çatdırılma\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al-apar\",\n\tCash: \"Nağd\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Sifarişdəki məhsullar\",\n\tItems: \"Məhsullar\",\n\tTax: \"Vergi\",\n\tTotal: \"Cəm\",\n\t\"Special instructions, allergies, etc.\": \"Xüsusi istəklər, allergiya və s.\",\n\t\"Go to checkout\": \"Ödənişə keç\",\n\t\"Place order\": \"Sifariş et\",\n\tContinue: \"Davam et\",\n\t\"Not available\": \"Mövcud deyil\",\n\t\"In order\": \"Sifarişdə\",\n\t\"Product choices\": \"Seçimlər\",\n\t\"Track order\": \"Sifarişi izlə\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Çatdırılma üçün sifarişiniz minimum {{amount}} olmalıdır\",\n\t\"This field is required\": \"Bu xana mütləq doldurulmalıdır\",\n\t\"Please select a table\": \"Zəhmət olmazsa, masanı seçin\",\n\t\"Please enter an address\": \"Zəhmət olmazsa, ünvanı daxil edin\",\n\t\"Please choose product\": \"Zəhmət olmazsa, məhsul seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masanı seçin\",\n\tCard: \"Kart ilə\",\n\t\"Closed Now\": \"Hazırda bağlıdır\",\n\t\"Delivery Fee\": \"Çatdırılma\",\n};\n","export default {\n\t\"Unknown address\": \"Ünvan əlavə edilməyib\",\n\t\"No address available\": \"Ünvan əlavə edilməyib\",\n\t\"Update Delivery Address\": \"Çatdırılma ünvanını dəyişin\",\n\tCountry: \"Ölkə\",\n\tCity: \"Şəhər\",\n\t\"Baker Street\": \"Nizami küçəsi\",\n\tAddress: \"Ünvan\",\n\t\"House number\": \"Ev nömrəsi\",\n\t\"Additional number\": \"Mənzil\",\n\t\"Example: Door code is 555\": \"Nümunə: Qapı kodu 555\",\n\t\"Delivery Instructions\": \"Kuryer üçün təlimatlar\",\n\tAzerbaijan: \"Azərbaycan\",\n\tFloor: \"Mərtəbə\",\n\t\"Enter address\": \"Ünvanı daxil edin\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesab yarat və ya daxil ol\",\n\t\"Phone number\": \"Mobil nömrə\",\n\t\"I don't have an email\": \"Email ünvanım yoxdur\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} üçün təsdiq kodunu göndərdik\",\n};\n","export default {\n\tEvents: \"Hərəkətlər\",\n\t\"Scrolled to Category\": \"Kateqoriyaya sürüşdürdü\",\n\t\"Category Selected\": \"Kateqoriya seçildi\",\n\t\"Product Details\": \"Məhsul detalına baxıldı\",\n\t\"Product Added to Order\": \"Sifarişə əlavə edildi\",\n};\n","export default {\n\t\"Get Started\": \"İndi başla\",\n\t\"Choose Plan\": \"Planı seçin\",\n\t\"Smart QR Menu\": \"Ağıllı QR Menyu\",\n\t\"Link-in-bio\": \"Bio üçün link\",\n\t\"Menu Analytics\": \"Menyu analitikası\",\n\t\"Unlimited Products\": \"Limitsiz məhsul\",\n\t\"Unlimited Categories\": \"Limitsiz kateqoriya\",\n\t\"Product variants\": \"Məhsul variantları\",\n\t\"Product options\": \"Məhsul əlavələri\",\n\t\"Sales reports\": \"Satış hesabatı\",\n\t\"24/7 Support\": \"24/7 dəstək\",\n\t\"Multiple Branches\": \"Şöbələr\",\n\t\"Order Management\": \"Sifarişlərin idarə edilməsi\",\n\t\"Table Management\": \"Masaların idarə edilməsi\",\n\t\"Mobile App for Owners & Staff\": \"Rəhbərlik və ofisiantlar üçün Mobil tətbiq\",\n\t\"Point of Sale (POS)\": \"POS-kassa\",\n\t\"Delivery Management\": \"Çatdırılmaların idarə edilməsi\",\n\t\"Third-Party Delivery Integrations\": \"Çatdırılma partnyorlarının inteqrasiyası\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay ilə ödəniş\",\n\t\"Event management\": \"Tədbirlərin idarəsi\",\n\t\"Unlimited Users\": \"Limitsiz istifadəçi\",\n\t\"/ month\": \"/ Ay\",\n\tmonthly: \"Aylıq plan\",\n\tannually: \"İllik plan\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Hər biznesə uyğun tariflər - Sadə qiymətlər, daha çox dəyər!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Biznesinizə uyğun tarif planını seçin. Aylıq və ya illik abunə olun, uzunmüddətli planlarla daha çox qazanın!\",\n\tAppetizer: \"Lite\",\n\t\"Main Course\": \"Plus\",\n\t\"Unlimited Languages\": \"Limitsiz dil seçimi\",\n\t\"30-day money-back guarantee\": \"30 gün ərzində narazı qalsanız, ödəniş geri qaytarılır.\",\n\t\"Limited Time Only\": \"Məhdud müddətə\",\n\t\"/ lifetime\": \"/ birdəfəlik\",\n\t\"Try for free\": \"Pulsuz yoxla\",\n\t\"No credit card needed\": \"Kart tələb olunmur\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Bazar ertəsi\",\n\t\"WEEKDAY-1\": \"Çərşənbə axşamı\",\n\t\"WEEKDAY-2\": \"Çərşənbə\",\n\t\"WEEKDAY-3\": \"Cümə axşamı\",\n\t\"WEEKDAY-4\": \"Cümə\",\n\t\"WEEKDAY-5\": \"Şənbə\",\n\t\"WEEKDAY-6\": \"Bazar\",\n\tClosed: \"Bağlıdır\",\n\t\"Opening Hours\": \"İş saatları\",\n\t\"Delivery Hours\": \"Çatdırılma saatları\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Something went wrong! Please try again later\",\n\tFIELD_REQUIRED: \"This field is required\",\n\tINVALID_OTP: \"Invalid OTP\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP limit has exceeded. Please try again later\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"This feature is not available for your current plan.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"This order type is not available for this business.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"This order type is not available right now.\",\n\tCOUNTRY_REQUIRED: \"Country is required.\",\n\tCITY_REQUIRED: \"City is required.\",\n\tSTREET_REQUIRED: \"Street is required.\",\n\tSTREET_NUMBER_REQUIRED: \"Street number is required.\",\n\tOUT_OF_DELIVERY_RANGE: \"This branch doesn't deliver to your address.\",\n\tNO_ORDER_TYPE: \"Please select an order type.\",\n};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {\n\t\"WEEKDAY-0\": \"Monday\",\n\t\"WEEKDAY-1\": \"Tuesday\",\n\t\"WEEKDAY-2\": \"Wednesday\",\n\t\"WEEKDAY-3\": \"Thursday\",\n\t\"WEEKDAY-4\": \"Friday\",\n\t\"WEEKDAY-5\": \"Saturday\",\n\t\"WEEKDAY-6\": \"Sunday\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Что-то пошло не так! Пожалуйста, попробуйте позже\",\n\tFIELD_REQUIRED: \"Это поле обязательно для заполнения\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Азербайджанские номера должны содержать 9 цифр и начинаться с 50, 51, 10, 55, 99, 70, 77 или 60\",\n\t\"Unsupported country code\": \"Неподдерживаемый код страны\",\n\t\"Invalid OTP\": \"Неверный код подтверждения\",\n\tINVALID_OTP: \"Неверный код подтверждения\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Превышен лимит кодов. Попробуйте позже\",\n\t\"Invalid Email Address\": \"Неверный адрес электронной почты\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Эта функция недоступна в вашем текущем тарифе.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Этот тип заказа недоступен для этого заведения.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Этот тип заказа сейчас недоступен.\",\n\tCOUNTRY_REQUIRED: \"Страна обязательна.\",\n\tCITY_REQUIRED: \"Город обязателен.\",\n\tSTREET_REQUIRED: \"Улица обязательна.\",\n\tSTREET_NUMBER_REQUIRED: \"Номер дома обязателен.\",\n\tOUT_OF_DELIVERY_RANGE: \"Этот филиал не доставляет по вашему адресу.\",\n\tNO_ORDER_TYPE: \"Пожалуйста, выберите тип заказа.\",\n};\n","export default {\n\tSave: \"Сохранить\",\n\tCancel: \"Отменить\",\n\tContinue: \"Продолжить\",\n};\n","export default {\n\t\"View order\": \"Посмотреть заказ\",\n\t\"Remove from order\": \"Удалить из заказа\",\n\t\"Update order\": \"Обновить заказ\",\n\t\"Add to order\": \"Добавить в заказ\",\n\tAdd: \"Добавить\",\n\t\"Your order\": \"Ваш заказ\",\n\t\"Empty order\": \"Пустой заказ\",\n\t\"You don't have any items in your order\": \"В вашем заказе нет продуктов\",\n\t\"Add items\": \"Добавить продукты\",\n\tSubtotal: \"Итого\",\n\tEvents: \"События\",\n\t\"Product choices\": \"Варианты продукта\",\n\t\"In order\": \"В заказе\",\n\t\"Not available\": \"Не доступен\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Укажите, если у вас есть аллергия, особые пожелания или ингредиенты, которые вы хотите добавить или убрать.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Спасибо! Мы получили ваш заказ и скоро доставим его.\",\n\t\"Go to checkout\": \"Перейти к оплате\",\n\t\"Add an order note\": \"Добавить примечание к заказу\",\n\t\"Your Order is Completed!\": \"Ваш заказ завершен!\",\n\tDelivery: \"Доставка\",\n\t\"Dine in\": \"На месте\",\n\tPickup: \"Самовывоз\",\n\tCash: \"Наличные\",\n\t\"POS Terminal\": \"POS-терминал\",\n\t\"Order summary\": \"Обзор заказа\",\n\tItems: \"Продукты\",\n\tTax: \"Налог\",\n\tTotal: \"Итого\",\n\t\"Special instructions, allergies, etc.\": \"Особые инструкции, аллергии и т.д.\",\n\t\"Place order\": \"Оформить заказ\",\n\tContinue: \"Продолжить\",\n\t\"Track order\": \"Отследить заказ\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Минимальная сумма заказа для доставки — {{amount}}\",\n\t\"This field is required\": \"Это поле обязательно для заполнения\",\n\t\"Please select a table\": \"Пожалуйста, выберите столик\",\n\t\"Please enter an address\": \"Пожалуйста, введите адрес\",\n\t\"Please choose product\": \"Пожалуйста, выберите продукт\",\n\tTable: \"Стол\",\n\t\"Select Table\": \"Выбрать столик\",\n\tCard: \"Картой\",\n\t\"Closed Now\": \"Сейчас закрыто\",\n\t\"Delivery Fee\": \"Доставка\",\n};\n","export default {\n\t\"Unknown address\": \"Неизвестный адрес\",\n\t\"No address available\": \"Адрес не доступен\",\n\t\"Update Delivery Address\": \"Обновить адрес доставки\",\n\tCountry: \"Страна\",\n\tCity: \"Город\",\n\t\"Baker Street\": \"Улица Низами\",\n\tAddress: \"Адрес\",\n\t\"House number\": \"Номер дома\",\n\t\"Additional number\": \"Квартира\",\n\t\"Example: Door code is 555\": \"Пример: Код двери 555\",\n\t\"Delivery Instructions\": \"Инструкции по доставке\",\n\tAzerbaijan: \"Азербайджан\",\n\tFloor: \"Этаж\",\n\t\"Enter address\": \"Введите адрес\",\n};\n","export default {\n\t\"Create an account or log in\": \"Создайте аккаунт или войдите\",\n\t\"Phone number\": \"Номер телефона\",\n\t\"I don't have an email\": \"У меня нет электронной почты\",\n\t\"We sent a confirmation code to {{address}}\": \"Мы отправили код подтверждения на {{address}}\",\n};\n","export default {\n\tEvents: \"События\",\n\t\"Scrolled to Category\": \"Прокрутил до категории\",\n\t\"Category Selected\": \"Категория выбрана\",\n\t\"Product Details\": \"Детали продукта\",\n\t\"Product Added to Order\": \"Продукт добавлен в заказ\",\n};\n","export default {\n\t\"Get Started\": \"Начать\",\n\t\"Choose Plan\": \"Выберите план\",\n\t\"Smart QR Menu\": \"Умное меню по QR-коду\",\n\t\"Link-in-bio\": \"Ссылка в био\",\n\t\"Menu Analytics\": \"Аналитика меню\",\n\t\"Unlimited Users\": \"Неограниченные пользователи\",\n\t\"Unlimited Products\": \"Неограниченные продукты\",\n\t\"Unlimited Categories\": \"Неограниченные категории\",\n\t\"Product variants\": \"Варианты продуктов\",\n\t\"Product options\": \"Дополнения к продукту\",\n\t\"Sales reports\": \"Отчеты о продажах\",\n\t\"24/7 Support\": \"24/7 техническая поддержка\",\n\t\"Multiple Branches\": \"Многочисленные филиалы\",\n\t\"Table Management\": \"Управление столами\",\n\t\"Order Management\": \"Управление заказами\",\n\t\"Mobile App for Owners & Staff\": \"Мобильное приложение для владельцев и персонала\",\n\t\"Point of Sale (POS)\": \"POS-касса\",\n\t\"Delivery Management\": \"Управление доставкой\",\n\t\"Third-Party Delivery Integrations\": \"Интеграция со сторонними поставщиками\",\n\t\"RestaroundPay with Mobile\": \"«RestaroundPay» с мобильного\",\n\t\"Event management\": \"Управление мероприятиями\",\n\t\"/ month\": \"/ месяц\",\n\tmonthly: \"Ежемесячный план\",\n\tannually: \"Годовой план\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Тарифы для любого бизнеса - Простой прайс, больше возможностей!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Выберите тарифный план, который подходит вашему бизнесу. Подписывайтесь помесячно или ежегодно и экономьте больше с долгосрочными планами!\",\n\t\"Unlimited Languages\": \"Неограниченное количество языков\",\n\t\"30-day money-back guarantee\": \"Гарантия возврата денег в течение 30 дней\",\n\t\"Limited Time Only\": \"Только ограниченное время\",\n\t\"/ lifetime\": \"/ разово\",\n\t\"Try for free\": \"Попробуйте бесплатно\",\n\t\"No credit card needed\": \"Кредитная карта не требуется\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Понедельник\",\n\t\"WEEKDAY-1\": \"Вторник\",\n\t\"WEEKDAY-2\": \"Среда\",\n\t\"WEEKDAY-3\": \"Четверг\",\n\t\"WEEKDAY-4\": \"Пятница\",\n\t\"WEEKDAY-5\": \"Суббота\",\n\t\"WEEKDAY-6\": \"Воскресенье\",\n\tClosed: \"Закрыто\",\n\t\"Opening Hours\": \"Часы работы\",\n\t\"Delivery Hours\": \"Время доставки\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Bir şeyler yanlış gitti! Lütfen daha sonra tekrar deneyin\",\n\tFIELD_REQUIRED: \"Bu alan zorunludur\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azerbaycan numaraları 9 haneli olmalı ve 50, 51, 10, 55, 99, 70, 77 veya 60 ile başlamalıdır\",\n\t\"Unsupported country code\": \"Desteklenmeyen ülke kodu\",\n\t\"Invalid OTP\": \"Geçersiz doğrulama kodu\",\n\tINVALID_OTP: \"Geçersiz doğrulama kodu\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP sınırı aşıldı. Lütfen daha sonra tekrar deneyin\",\n\t\"Invalid Email Address\": \"Geçersiz e-posta adresi\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu özellik mevcut planınızda yer almıyor.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sipariş türü bu işletmede aktif değil.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Bu sipariş türü şu anda aktif değil.\",\n\tCOUNTRY_REQUIRED: \"Ülke zorunludur.\",\n\tCITY_REQUIRED: \"Şehir zorunludur.\",\n\tSTREET_REQUIRED: \"Sokak adı zorunludur.\",\n\tSTREET_NUMBER_REQUIRED: \"Bina numarası zorunludur.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu şube sizin adrese teslimat yapmıyor.\",\n\tNO_ORDER_TYPE: \"Lütfen bir sipariş türü seçin.\",\n};\n","export default {\n\tSave: \"Kaydet\",\n\tCancel: \"İptal et\",\n\tContinue: \"Devam et\",\n};\n","export default {\n\t\"View order\": \"Siparişi Görüntüle\",\n\t\"Remove from order\": \"Siparişten Kaldır\",\n\t\"Update order\": \"Siparişi Güncelle\",\n\t\"Add to order\": \"Siparişe Ekle\",\n\tAdd: \"Ekle\",\n\t\"Your order\": \"Siparişiniz\",\n\t\"Empty order\": \"Boş sipariş\",\n\t\"You don't have any items in your order\": \"Siparişinizde hiç bir ürün yok\",\n\t\"Add items\": \"Ürün ekle\",\n\tSubtotal: \"Toplam\",\n\tEvents: \"Olaylar\",\n\t\"Product choices\": \"Seçenekler\",\n\t\"In order\": \"Siparişte\",\n\t\"Not available\": \"Mevcut değil\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Herhangi bir alerjiniz, özel isteğiniz ya da eklemek veya çıkarmak istediğiniz malzemeler varsa belirtin.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Teşekkürler! Siparişinizi aldık, kısa süre içinde teslim edilecek.\",\n\t\"Go to checkout\": \"Ödemeye geç\",\n\t\"Add an order note\": \"Sipariş notu ekle\",\n\t\"Your Order is Completed!\": \"Siparişiniz tamamlandı!\",\n\tDelivery: \"Teslimat\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al götür\",\n\tCash: \"Nakit\",\n\t\"POS Terminal\": \"POS Terminali\",\n\t\"Order summary\": \"Sipariş özeti\",\n\tItems: \"Ürünler\",\n\tTax: \"Vergi\",\n\tTotal: \"Toplam\",\n\t\"Special instructions, allergies, etc.\": \"Özel talimatlar, alerjiler vb.\",\n\t\"Place order\": \"Sipariş ver\",\n\tContinue: \"Devam et\",\n\t\"Track order\": \"Siparişi takip et\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Teslimat için minimum sipariş tutarı {{amount}} olmalı\",\n\t\"This field is required\": \"Bu alan zorunludur\",\n\t\"Please select a table\": \"Lütfen bir masa seçin\",\n\t\"Please enter an address\": \"Lütfen bir adres girin\",\n\t\"Please choose product\": \"Lütfen bir ürün seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masa seçin\",\n\tCard: \"Kart ile\",\n\t\"Closed Now\": \"Şu anda kapalı\",\n\t\"Delivery Fee\": \"Teslimat ücreti\",\n};\n","export default {\n\t\"Unknown address\": \"Bilinmeyen adres\",\n\t\"No address available\": \"Adres mevcut değil\",\n\t\"Update Delivery Address\": \"Teslimat adresini güncelle\",\n\tCountry: \"Ülke\",\n\tCity: \"Şehir\",\n\t\"Baker Street\": \"Istiklal Caddesi\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Ev numarası\",\n\t\"Additional number\": \"Daire numarası\",\n\t\"Example: Door code is 555\": \"Örnek: Kapı kodu 555\",\n\t\"Delivery Instructions\": \"Teslimat talimatları\",\n\tAzerbaijan: \"Azerbaycan\",\n\tFloor: \"Kat\",\n\t\"Enter address\": \"Adres girin\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesap oluştur veya giriş yap\",\n\t\"Phone number\": \"Telefon numarası\",\n\t\"I don't have an email\": \"E-posta adresim yok\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} için doğrulama kodu gönderdik\",\n};\n","export default {\n\tEvents: \"Etkinlikler\",\n\t\"Scrolled to Category\": \"Kategoriye kaydırıldı\",\n\t\"Category Selected\": \"Kategori seçildi\",\n\t\"Product Details\": \"Ürün Detayları\",\n\t\"Product Added to Order\": \"Ürün siparişe eklendi\",\n};\n","export default {\n\t\"Get Started\": \"Hemen Başla\",\n\t\"Choose Plan\": \"Planı seçin\",\n\t\"Smart QR Menu\": \"Akıllı QR Menü\",\n\t\"Link-in-bio\": \"Bio için link\",\n\t\"Menu Analytics\": \"Menü Analitiği\",\n\t\"Unlimited Users\": \"Sınırsız kullanıcı\",\n\t\"Unlimited Products\": \"Sınırsız ürün\",\n\t\"Unlimited Categories\": \"Sınırsız kategori\",\n\t\"Product variants\": \"Ürün çeşitleri\",\n\t\"Product options\": \"Ürün seçenekleri\",\n\t\"Sales reports\": \"Satış raporu\",\n\t\"24/7 Support\": \"24/7 Teknik Destek\",\n\t\"Multiple Branches\": \"Şube Yönetimi\",\n\t\"Table Management\": \"Masa Yönetimi\",\n\t\"Order Management\": \"Sipariş Yönetimi\",\n\t\"Mobile App for Owners & Staff\": \"Patron ve Personel için Mobil Uygulama\",\n\t\"Point of Sale (POS)\": \"POS Adisyon Sistemi\",\n\t\"Delivery Management\": \"Paket sipariş yönetimi\",\n\t\"Third-Party Delivery Integrations\": \"Üçüncü Parti Teslimat Entegrasyonları\",\n\t\"RestaroundPay with Mobile\": \"Mobil ile RestaroundPay\",\n\t\"Event management\": \"Etkinlik yönetimi\",\n\t\"/ month\": \"/ Ay\",\n\tmonthly: \"Aylık\",\n\tannually: \"Yıllık\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"İşletmenize uygun abonelik planını seçin. Aylık veya yıllık abone olun, uzun vadeli planlarla daha fazla tasarruf edin!\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Her işletmeye uygun esnek planlar - Basit fiyatlandırma, daha fazla avantaj!\",\n\t\"Unlimited Languages\": \"Sınırsız dil seçeneği\",\n\t\"30-day money-back guarantee\": \"30 gün içinde memnun kalmazsanız, paranız iade.\",\n\t\"Limited Time Only\": \"Sınırlı süreyle\",\n\t\"/ lifetime\": \"/ tek seferlik\",\n\t\"Try for free\": \"Ücretsiz dene\",\n\t\"No credit card needed\": \"Kredi kartı gerekmez\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Pazartesi\",\n\t\"WEEKDAY-1\": \"Salı\",\n\t\"WEEKDAY-2\": \"Çarşamba\",\n\t\"WEEKDAY-3\": \"Perşembe\",\n\t\"WEEKDAY-4\": \"Cuma\",\n\t\"WEEKDAY-5\": \"Cumartesi\",\n\t\"WEEKDAY-6\": \"Pazar\",\n\tClosed: \"Kapalı\",\n\t\"Opening Hours\": \"Çalışma saatleri\",\n\t\"Delivery Hours\": \"Teslimat saatleri\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Er is iets misgegaan! Probeer het later opnieuw\",\n\tFIELD_REQUIRED: \"Dit veld is verplicht\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azerbeidzjaanse nummers moeten 9 cijfers bevatten en beginnen met 50, 51, 10, 55, 99, 70, 77 of 60\",\n\t\"Unsupported country code\": \"Niet-ondersteunde landcode\",\n\t\"Invalid OTP\": \"Ongeldige verificatiecode\",\n\tINVALID_OTP: \"Ongeldige verificatiecode\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Te veel pogingen. Probeer het later opnieuw\",\n\t\"Invalid Email Address\": \"Ongeldig e-mailadres\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Deze functie is niet beschikbaar in je huidige pakket.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Dit type bestelling is niet beschikbaar bij dit bedrijf.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"Dit besteltype is op dit moment niet beschikbaar.\",\n\tCOUNTRY_REQUIRED: \"Land is verplicht.\",\n\tCITY_REQUIRED: \"Stad is verplicht.\",\n\tSTREET_REQUIRED: \"Straat is verplicht.\",\n\tSTREET_NUMBER_REQUIRED: \"Huisnummer is verplicht.\",\n\tOUT_OF_DELIVERY_RANGE: \"Deze vestiging bezorgt niet op jouw adres.\",\n\tNO_ORDER_TYPE: \"Selecteer een besteltype.\",\n};\n","export default {\n\tSave: \"Opslaan\",\n\tCancel: \"Annuleren\",\n\tContinue: \"Doorgaan\",\n};\n","export default {\n\t\"View order\": \"Bestelling bekijken\",\n\t\"Remove from order\": \"Uit bestelling verwijderen\",\n\t\"Update order\": \"Bestelling bijwerken\",\n\t\"Add to order\": \"Aan bestelling toevoegen\",\n\tAdd: \"Toevoegen\",\n\t\"Your order\": \"Uw bestelling\",\n\t\"Empty order\": \"Lege bestelling\",\n\t\"You don't have any items in your order\": \"U heeft geen items in uw bestelling\",\n\t\"Add items\": \"Items toevoegen\",\n\tSubtotal: \"Totaal\",\n\tEvents: \"Gebeurtenissen\",\n\t\"Product choices\": \"Productkeuzes\",\n\t\"In order\": \"In bestelling\",\n\t\"Not available\": \"Niet beschikbaar\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Geef eventuele allergieën, speciale wensen of ingrediënten die je wilt toevoegen of weglaten aan.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Bedankt! We hebben je bestelling ontvangen en bezorgen het zo snel mogelijk.\",\n\t\"Go to checkout\": \"Ga naar afrekenen\",\n\t\"Add an order note\": \"Voeg een bestelopmerking toe\",\n\t\"Your Order is Completed!\": \"Je bestelling is voltooid!\",\n\tDelivery: \"Levering\",\n\t\"Dine in\": \"Ter plaatse\",\n\tPickup: \"Meenemen\",\n\tCash: \"Contant\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Bestellingsoverzicht\",\n\tItems: \"Items\",\n\tTax: \"Belasting\",\n\tTotal: \"Totaal\",\n\t\"Special instructions, allergies, etc.\": \"Speciale instructies, allergieën, enz.\",\n\t\"Place order\": \"Plaats bestelling\",\n\tContinue: \"Doorgaan\",\n\t\"Track order\": \"Volg je bestelling\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimale bestelbedrag voor bezorging is {{amount}}\",\n\t\"This field is required\": \"Dit veld is verplicht\",\n\t\"Please select a table\": \"Selecteer alstublieft een tafel\",\n\t\"Please enter an address\": \"Vul alstublieft een adres in\",\n\t\"Please choose product\": \"Kies alstublieft een product\",\n\tTable: \"Tafel\",\n\t\"Select Table\": \"Kies tafel\",\n\tCard: \"Met je Betaalpas\",\n\t\"Closed Now\": \"Nu gesloten\",\n\t\"Delivery Fee\": \"Bezorgkosten\",\n};\n","export default {\n\t\"Unknown address\": \"Onbekend adres\",\n\t\"No address available\": \"Geen adres beschikbaar\",\n\t\"Update Delivery Address\": \"Werk het afleveradres bij\",\n\tCountry: \"Land\",\n\tCity: \"Stad\",\n\t\"Baker Street\": \"Dam straat\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Huisnummer\",\n\t\"Additional number\": \"Appartementnummer\",\n\t\"Example: Door code is 555\": \"Voorbeeld: Deurcode is 555\",\n\t\"Delivery Instructions\": \"Leveringsinstructies\",\n\tAzerbaijan: \"Azerbeidzjan\",\n\tFloor: \"Verdieping\",\n\t\"Enter address\": \"Voer adres in\",\n};\n","export default {\n\t\"Create an account or log in\": \"Maak een account aan of log in\",\n\t\"Phone number\": \"Telefoonnummer\",\n\t\"I don't have an email\": \"Ik heb geen e-mailadres\",\n\t\"We sent a confirmation code to {{address}}\":\n\t\t\"We hebben een bevestigingscode gestuurd naar {{address}}\",\n};\n","export default {\n\tEvents: \"Gebeurtenissen\",\n\t\"Scrolled to Category\": \"Gescrld naar categorie\",\n\t\"Category Selected\": \"Categorie geselecteerd\",\n\t\"Product Details\": \"Productdetails\",\n\t\"Product Added to Order\": \"Product aan bestelling toegevoegd\",\n};\n","export default {\n\t\"Get Started\": \"Start nu\",\n\t\"Choose Plan\": \"Kies een plan\",\n\t\"Smart QR Menu\": \"Slimme QR-menu\",\n\t\"Link-in-bio\": \"Link-in-bio\",\n\t\"Menu Analytics\": \"Menu analyse\",\n\t\"Unlimited Products\": \"Onbeperkte producten\",\n\t\"Unlimited Categories\": \"Onbeperkte categorieën\",\n\t\"Unlimited Users\": \"Onbeperkte gebruikers\",\n\t\"Product variants\": \"Productvarianten\",\n\t\"Product options\": \"Productopties\",\n\t\"Sales reports\": \"Verkooprapporten\",\n\t\"24/7 Support\": \"24/7 ondersteuning\",\n\t\"Multiple Branches\": \"Meerdere vestigingen\",\n\t\"Table Management\": \"Tafelbeheer\",\n\t\"Order Management\": \"Orderbeheer\",\n\t\"Mobile App for Owners & Staff\": \"Mobiele app voor eigenaren en personeel\",\n\t\"Point of Sale (POS)\": \"Kassasysteem (POS)\",\n\t\"Delivery Management\": \"Leveringsbeheer\",\n\t\"Third-Party Delivery Integrations\": \"Integraties van derden\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay met mobiel\",\n\t\"Event management\": \"Beheer van evenementen\",\n\t\"/ month\": \"/ maand\",\n\tmonthly: \"Maandelijks\",\n\tannually: \"Jaarlijks\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Kies een abonnementsplan dat bij jouw bedrijf past. Abonneer je maandelijks of jaarlijks en bespaar meer met een lange termijn plan!\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Flexibele abonnementen voor elk bedrijf - Eenvoudige prijzen, meer waarde!\",\n\t\"Unlimited Languages\": \"Onbeperkt aantal talen\",\n\t\"30-day money-back guarantee\": \"30 dagen niet-goed-geld-terug garantie\",\n\t\"Limited Time Only\": \"Beperkte tijd\",\n\t\"/ lifetime\": \"/ eenmalig\",\n\t\"Try for free\": \"Probeer gratis\",\n\t\"No credit card needed\": \"Geen creditcard nodig\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Maandag\",\n\t\"WEEKDAY-1\": \"Dinsdag\",\n\t\"WEEKDAY-2\": \"Woensdag\",\n\t\"WEEKDAY-3\": \"Donderdag\",\n\t\"WEEKDAY-4\": \"Vrijdag\",\n\t\"WEEKDAY-5\": \"Zaterdag\",\n\t\"WEEKDAY-6\": \"Zondag\",\n\tClosed: \"Gesloten\",\n\t\"Opening Hours\": \"Openingstijden\",\n\t\"Delivery Hours\": \"Bezorgtijden\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Midagi läks valesti! Palun proovi hiljem uuesti\",\n\tFIELD_REQUIRED: \"See väli on kohustuslik\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Aserbaidžaani numbrid peavad olema 9-kohalised ja algama 50, 51, 10, 55, 99, 70, 77 või 60-ga\",\n\t\"Unsupported country code\": \"Riigikood ei ole toetatud\",\n\t\"Invalid OTP\": \"Vale kinnituskood\",\n\tINVALID_OTP: \"Vale kinnituskood\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Kinnituskoodide limiit ületatud. Proovi hiljem uuesti\",\n\t\"Invalid Email Address\": \"Vigane e-posti aadress\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"See funktsioon ei ole sinu praeguse paketiga saadaval.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"See tellimuse tüüp ei ole selles ettevõttes saadaval.\",\n\tORDER_TYPE_DISABLED_AT_THIS_TIME: \"See tellimuse tüüp ei ole praegu saadaval.\",\n\tCOUNTRY_REQUIRED: \"Riik on kohustuslik.\",\n\tCITY_REQUIRED: \"Linn on kohustuslik.\",\n\tSTREET_REQUIRED: \"Tänav on kohustuslik.\",\n\tSTREET_NUMBER_REQUIRED: \"Maja number on kohustuslik.\",\n\tOUT_OF_DELIVERY_RANGE: \"See filiaal ei toimeta sellele aadressile.\",\n\tNO_ORDER_TYPE: \"Palun vali tellimuse tüüp.\",\n};\n","export default {\n\tSave: \"Salvesta\",\n\tCancel: \"Tühista\",\n\tContinue: \"Jätka\",\n};\n","export default {\n\t\"View order\": \"Vaata tellimust\",\n\t\"Remove from order\": \"Eemalda tellimusest\",\n\t\"Update order\": \"Uuenda tellimust\",\n\t\"Add to order\": \"Lisa tellimusele\",\n\tAdd: \"Lisa\",\n\t\"Your order\": \"Teie tellimus\",\n\t\"Empty order\": \"Tühi tellimus\",\n\t\"You don't have any items in your order\": \"Teie tellimuses pole ühtegi eset\",\n\t\"Add items\": \"Lisa esemeid\",\n\tSubtotal: \"Kokku\",\n\tEvents: \"Sündmused\",\n\t\"Product choices\": \"Tootevalikud\",\n\t\"In order\": \"Tellimuses\",\n\t\"Not available\": \"Ei ole saadaval\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Kui sul on allergiaid, erisoove või soovid mõnda koostisosa lisada või eemaldada, anna sellest teada.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Aitäh! Oleme sinu tellimuse kätte saanud ja toome selle peagi kohale.\",\n\t\"Go to checkout\": \"Mine kassasse\",\n\t\"Add an order note\": \"Lisa tellimuse märkus\",\n\t\"Your Order is Completed!\": \"Teie tellimus on lõpetatud!\",\n\tDelivery: \"Kohaletoimetamine\",\n\t\"Dine in\": \"Sööma jäämine\",\n\tPickup: \"Eemaldamine\",\n\tCash: \"Sularaha\",\n\t\"POS Terminal\": \"POS terminal\",\n\t\"Order summary\": \"Tellimuse kokkuvõte\",\n\tItems: \"Tooted\",\n\tTax: \"Maks\",\n\tTotal: \"Kokku\",\n\t\"Special instructions, allergies, etc.\": \"Erisoovid, allergiad jne.\",\n\t\"Place order\": \"Esita tellimus\",\n\tContinue: \"Jätka\",\n\t\"Track order\": \"Jälgi tellimust\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimaalne tellimuse summa kohaletoimetamiseks on {{amount}}\",\n\t\"This field is required\": \"See väli on kohustuslik\",\n\t\"Please select a table\": \"Palun vali laud\",\n\t\"Please enter an address\": \"Palun sisesta aadress\",\n\t\"Please choose product\": \"Palun vali toode\",\n\tTable: \"Laud\",\n\t\"Select Table\": \"Vali laud\",\n\tCard: \"Kaardiga\",\n\t\"Closed Now\": \"Praegu suletud\",\n\t\"Delivery Fee\": \"Kohaletoimetamise tasu\",\n};\n","export default {\n\t\"Unknown address\": \"Tundmatu aadress\",\n\t\"No address available\": \"Aadress puudub\",\n\t\"Update Delivery Address\": \"Uuenda kohaletoimetamise aadress\",\n\tCountry: \"Riik\",\n\tCity: \"Linn\",\n\t\"Baker Street\": \"Nizami tänav\",\n\tAddress: \"Aadress\",\n\t\"House number\": \"Majanumber\",\n\t\"Additional number\": \"Korteri number\",\n\t\"Example: Door code is 555\": \"Näide: Uksekood on 555\",\n\t\"Delivery Instructions\": \"Kohaletoimetamise juhised\",\n\tAzerbaijan: \"Aserbaidžaan\",\n\tFloor: \"Põrand\",\n\t\"Enter address\": \"Sisesta aadress\",\n};\n","export default {\n\t\"Create an account or log in\": \"Loo konto või logi sisse\",\n\t\"Phone number\": \"Telefoninumber\",\n\t\"I don't have an email\": \"Mul ei ole e-posti aadressi\",\n\t\"We sent a confirmation code to {{address}}\": \"Saatsime kinnituskoodi aadressile {{address}}\",\n};\n","export default {\n\tEvents: \"Sündmused\",\n\t\"Scrolled to Category\": \"Keriti kategooriasse\",\n\t\"Category Selected\": \"Kategooria valitud\",\n\t\"Product Details\": \"Toote detailid\",\n\t\"Product Added to Order\": \"Toode lisatud tellimusele\",\n};\n","export default {\n\t\"Get Started\": \"Alustage\",\n\t\"Choose Plan\": \"Vali plaan\",\n\t\"Smart QR Menu\": \"Nutikas QR-menüü\",\n\t\"Link-in-bio\": \"Link-in-bio\",\n\t\"Menu Analytics\": \"Menüü Analüütika\",\n\t\"Unlimited Products\": \"Piiramata tooted\",\n\t\"Unlimited Categories\": \"Piiramata kategooriad\",\n\t\"Product variants\": \"Tootevariandid\",\n\t\"Product options\": \"Toote valikud\",\n\t\"Sales reports\": \"Müügiaruanded\",\n\t\"24/7 Support\": \"24/7 tugi\",\n\t\"Multiple Branches\": \"Mitu filiaali\",\n\t\"Table Management\": \"Tabelite haldamine\",\n\t\"Order Management\": \"Tellimuste haldamine\",\n\t\"Mobile App for Owners & Staff\": \"Mobiilirakendus omanikele ja töötajatele\",\n\t\"Point of Sale (POS)\": \"Müügipunkt (POS)\",\n\t\"Delivery Management\": \"Tarnejuhtimine\",\n\t\"Third-Party Delivery Integrations\": \"Kolmanda osapoole tarneintegratsioonid\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay koos mobiiliga\",\n\t\"Event management\": \"Sündmuste haldamine\",\n\t\"Unlimited Users\": \"Piiramatu arv kasutajaid\",\n\t\"/ month\": \"/ kuus\",\n\tmonthly: \"Igakuine\",\n\tannually: \"Igal aastal\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Paindlikud plaanid igale ettevõttele - Lihtne hind, rohkem väärtust!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Vali tellimus, mis sobib sinu ettevõttele. Telli igakuiselt või kord aastas ning säästa rohkem pikaajaliste plaanidega!\",\n\t\"Unlimited Languages\": \"Piiramatu arv keeli\",\n\t\"30-day money-back guarantee\": \"30-päevane raha tagasi garantii\",\n\t\"Limited Time Only\": \"Ainult piiratud ajaks\",\n\t\"/ lifetime\": \"/ eluaegne\",\n\t\"Try for free\": \"Proovi tasuta\",\n\t\"No credit card needed\": \"Krediitkaarti pole vaja\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Esmaspäev\",\n\t\"WEEKDAY-1\": \"Teisipäev\",\n\t\"WEEKDAY-2\": \"Kolmapäev\",\n\t\"WEEKDAY-3\": \"Neljapäev\",\n\t\"WEEKDAY-4\": \"Reede\",\n\t\"WEEKDAY-5\": \"Laupäev\",\n\t\"WEEKDAY-6\": \"Pühapäev\",\n\tClosed: \"Suletud\",\n\t\"Opening Hours\": \"Lahtiolekuajad\",\n\t\"Delivery Hours\": \"Kohaletoimetamise ajad\",\n};\n","import { SUPPORTED_LOCALES } from \"src/modules/view/constants\";\nimport * as businessConstants from \"src/modules/business/constants\";\n\nimport locales from \"./locales\";\n\nexport const getTranslations = (locale: string, ns: string) => {\n\ttry {\n\t\tconst supportedLocale = SUPPORTED_LOCALES.includes(locale)\n\t\t\t? locale\n\t\t\t: businessConstants.DEFAULT_LANGUAGE;\n\n\t\tconst translations = locales[supportedLocale as never][ns] || {};\n\n\t\tconst t = (key: string, options?: Record<string, string>) => {\n\t\t\ttry {\n\t\t\t\tconst translation = translations[key] || key;\n\n\t\t\t\tif (options) {\n\t\t\t\t\treturn Object.keys(options).reduce(\n\t\t\t\t\t\t(acc, k) => acc.replace(`{{${k}}}`, options[k]),\n\t\t\t\t\t\ttranslation\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn translation;\n\t\t\t} catch (error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error(error);\n\t\t\t\treturn key;\n\t\t\t}\n\t\t};\n\n\t\treturn { t };\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t\treturn { t: (key: string) => key };\n\t}\n};\n","import { getTranslations } from \"src/services/translation\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nexport const useTranslation = (ns: string = \"common\", params?: { language?: string }) => {\n\tconst language = businessHooks.useLanguage();\n\tconst locale = params?.language || language;\n\n\tconst { t } = getTranslations(locale, ns);\n\n\treturn { t };\n};\n","import { useMemo } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport { Customer, CustomerAddress } from \"./models\";\n\nexport const useAvailableCustomer = (): Customer => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer || ({} as Customer);\n};\n\nexport const useCustomerAddress = (): CustomerAddress => {\n\tconst { customer } = useOrderContext();\n\n\tconst address = customer?.addresses?.[customer?.addresses?.length - 1];\n\n\treturn address || ({} as CustomerAddress);\n};\n\nexport const useCustomerId = (): number => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer?.id;\n};\n\nexport const useCustomerEmail = (): string => {\n\tconst { customer } = useOrderContext();\n\n\treturn useMemo(() => customer?.email, [customer?.email]);\n};\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\tphoneNumber: string;\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","import { FormErrors } from \"@sorocraft/ui\";\nimport { checkIsValidEmail } from \"@sorocraft/js-utils\";\n\nimport * as viewUtils from \"src/modules/view/utils\";\n\nimport {\n\tCustomerAddress,\n\tCustomerAuthForm,\n\tCustomerAuthPhoneForm,\n\tCustomerAuthStep,\n} from \"./models\";\n\nexport const preparePhoneNumber = (form: CustomerAuthPhoneForm) => {\n\tconst phoneNumber = `${form.countryCode}${form.phoneNumber}`.replaceAll(\"+\", \"\");\n\n\treturn phoneNumber;\n};\n\nexport const validateForm = (form: CustomerAuthForm, step: CustomerAuthStep): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { phoneNumber, email, otp } = form || {};\n\n\tswitch (step) {\n\t\tcase CustomerAuthStep.PHONE: {\n\t\t\tconst { isValid, error } = viewUtils.validatePhoneNumber(phoneNumber);\n\t\t\tif (!isValid) errors.phoneNumber = error;\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.OTP: {\n\t\t\tconst { isValid, error } = viewUtils.validatePhoneNumber(phoneNumber);\n\t\t\tif (!isValid) errors.phoneNumber = error;\n\n\t\t\tif (!otp || otp.length !== 6) {\n\t\t\t\terrors.otp = \"Invalid OTP\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.EMAIL: {\n\t\t\tif (!email || !checkIsValidEmail(email)) {\n\t\t\t\terrors.email = \"Invalid Email Address\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn errors;\n};\n\nexport const validateAddressForm = (form: CustomerAddress): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { countryCode, cityName, street, houseNumber } = form || {};\n\n\tif (!countryCode) errors.countryCode = \"COUNTRY_REQUIRED\";\n\tif (!cityName) errors.cityName = \"CITY_REQUIRED\";\n\tif (!street) errors.street = \"STREET_REQUIRED\";\n\tif (!houseNumber) errors.houseNumber = \"STREET_NUMBER_REQUIRED\";\n\n\treturn errors;\n};\n\nexport const formatCityLine = (fields: (string | undefined)[]) => {\n\treturn (fields || []).filter(Boolean).join(\", \");\n};\n\nexport const formatAddressLine = (\n\tstreet: string,\n\thouseNumber: string,\n\tadditionalNumber: string\n) => {\n\tconst house = [houseNumber, additionalNumber].filter(Boolean).join(\"/\");\n\tconst fullAddress = [street, house].filter(Boolean).join(\" \");\n\n\treturn fullAddress;\n};\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\nimport { useEffect, useState } from \"react\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as customerHooks from \"src/modules/customer/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\nimport * as businessHooks from \"src/modules/business/hooks\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport { generateOrderItemsId, getOrderItemPrice } from \"./utils\";\nimport {\n\tOrder,\n\tOrderFormattedPriceDetails,\n\tOrderItem,\n\tOrderPayload,\n\tOrderPriceDetails,\n\tOrderStep,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nexport const useOrderPriceDetails = (): OrderPriceDetails => {\n\tconst { orderItems, order } = useOrderContext();\n\tconst { deliveryFeeAmount } = branchHooks.useBranchSettings();\n\n\tconst result = Object.values(orderItems || {}).reduce(\n\t\t(total, item: OrderItem) => {\n\t\t\tconst { totalGross, totalNet, totalTax } = getOrderItemPrice(item);\n\t\t\tconst totalPriceWithTax = total.totalPriceWithTax + totalGross;\n\t\t\treturn {\n\t\t\t\ttotalPriceWithTax,\n\t\t\t\ttotalPriceWithoutTax: total.totalPriceWithoutTax + totalNet,\n\t\t\t\ttotalTax: total.totalTax + totalTax,\n\t\t\t\ttotalPriceWithTaxAndFees: totalPriceWithTax,\n\t\t\t};\n\t\t},\n\t\t{\n\t\t\ttotalPriceWithTax: 0,\n\t\t\ttotalPriceWithoutTax: 0,\n\t\t\ttotalTax: 0,\n\t\t\ttotalPriceWithTaxAndFees: 0,\n\t\t}\n\t);\n\n\tif (order?.orderType === OrderType.DELIVERY && deliveryFeeAmount > 0) {\n\t\tresult.totalPriceWithTaxAndFees += deliveryFeeAmount;\n\t}\n\n\treturn result;\n};\n\nexport const useOrderFormattedPriceDetails = (): OrderFormattedPriceDetails => {\n\tconst { totalPriceWithTax, totalPriceWithoutTax, totalTax, totalPriceWithTaxAndFees } =\n\t\tuseOrderPriceDetails();\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\n\treturn {\n\t\ttotalPriceWithTax: priceFormatter(totalPriceWithTax, currency, language),\n\t\ttotalPriceWithoutTax: priceFormatter(totalPriceWithoutTax, currency, language),\n\t\ttotalTax: priceFormatter(totalTax, currency, language),\n\t\ttotalPriceWithTaxAndFees: priceFormatter(totalPriceWithTaxAndFees, currency, language),\n\t};\n};\n\nexport const usePrepareOrder = (existingOrderData: Partial<Order> = {}): OrderPayload => {\n\tconst businessId = businessHooks.useBusinessId();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\n\tconst { order, orderItems } = useOrderContext();\n\tconst { totalPriceWithTax, totalPriceWithoutTax, totalTax, totalPriceWithTaxAndFees } =\n\t\tuseOrderPriceDetails();\n\tconst address = customerHooks.useCustomerAddress();\n\tconst customerId = customerHooks.useCustomerId();\n\tconst { deliveryFeeAmount } = branchHooks.useBranchSettings();\n\n\tconst {\n\t\tworkingDayId,\n\t\ttableId,\n\t\temployeeId,\n\t\torderType,\n\t\tpaymentMethod,\n\t\tnote,\n\t\tvat = 0,\n\t} = { ...order, ...existingOrderData };\n\n\treturn {\n\t\tbranchId: selectedBranch?.id,\n\t\tbusinessId,\n\t\tworkingDayId,\n\t\ttableId,\n\t\tcustomerId,\n\t\tcustomerAddressId: address.id,\n\t\temployeeId,\n\t\torderType,\n\t\ttotalPriceWithTax,\n\t\ttotalPriceWithTaxAndFees,\n\t\ttotalPriceWithoutTax,\n\t\ttotalTax,\n\t\titems: Object.values(orderItems || {}),\n\t\tvat,\n\t\tpaymentMethod,\n\t\tnote,\n\t\tdeliveryFee: orderType === OrderType.DELIVERY ? deliveryFeeAmount : undefined,\n\t};\n};\n\nexport const useTotalOrderItemsCount = () => {\n\tconst { orderItems } = useOrderContext();\n\n\treturn Object.values(orderItems || {}).reduce((sum, item) => sum + item.quantity, 0);\n};\n\nexport const useProductQuantityInOrder = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number | null;\n\tselectedAddons: SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\tconst orderItemsId = generateOrderItemsId(productId, variantId, selectedAddons);\n\n\treturn orderItems[orderItemsId]?.quantity || 0;\n};\n\nexport const useProductQuantityInOrderWithAllVariants = (productId: number): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\t// get all order Items items with the same product id\n\tconst productOrderItems = Object.values(orderItems).filter(\n\t\t(item) => item.productId === productId\n\t);\n\n\t// get the total quantity of all order Items items with the same product id\n\tconst totalQuantity = productOrderItems.reduce((sum, item) => sum + item.quantity, 0);\n\n\treturn totalQuantity;\n};\n\nexport const useOrderItemPrice = (item: OrderItem) => {\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst { totalGross } = getOrderItemPrice(item);\n\n\treturn {\n\t\ttotalPrice: totalGross,\n\t\tformattedTotalPrice: priceFormatter(totalGross, currency, language),\n\t};\n};\n\nexport const useDeliveryDistanceError = (): string | null => {\n\tconst { t } = useTranslation(\"error\");\n\tconst branchCoordinates = branchHooks.useBranchCoordinates();\n\tconst maxDeliveryDistance = branchHooks.useMaxDeliveryDistance();\n\tconst { latitude, longitude } = customerHooks.useCustomerAddress();\n\n\tconst [error, setError] = useState<string | null>(null);\n\n\tuseEffect(() => {\n\t\tconst hasValidCustomerAddress = !!latitude && !!longitude;\n\t\tconst hasValidBranchCoordinates = !isEmpty(branchCoordinates);\n\n\t\tconst checkDistance = async () => {\n\t\t\tif (!hasValidCustomerAddress || !hasValidBranchCoordinates) {\n\t\t\t\treturn setError(\"INVALID_ADDRESS\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst distance = await customerServices.getCustomerDistance(branchCoordinates, {\n\t\t\t\t\tlatitude,\n\t\t\t\t\tlongitude,\n\t\t\t\t});\n\n\t\t\t\tsetError(!distance || distance > maxDeliveryDistance ? \"OUT_OF_DELIVERY_RANGE\" : null);\n\t\t\t} catch {\n\t\t\t\tsetError(\"OUT_OF_DELIVERY_RANGE\");\n\t\t\t}\n\t\t};\n\n\t\tcheckDistance();\n\t}, [latitude, longitude, branchCoordinates, maxDeliveryDistance]);\n\n\treturn error ? t(error) : null;\n};\n\nexport const useDeliveryAmountError = (): string | null => {\n\tconst { t } = useTranslation(\"order\");\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst minDeliveryAmount = branchHooks.useMinDeliveryAmount();\n\tconst { totalPriceWithTax } = useOrderPriceDetails();\n\n\tif (totalPriceWithTax < minDeliveryAmount) {\n\t\tconst amount = priceFormatter(minDeliveryAmount, currency, language);\n\t\treturn t(\"Minimum order amount for delivery is {{amount}}\", { amount });\n\t}\n\n\treturn null;\n};\n\nexport const useOrderErrorInDetails = (): string | null => {\n\tconst { order, orderStep } = useOrderContext();\n\tconst deliveryDistanceError = useDeliveryDistanceError();\n\tconst deliveryAmountError = useDeliveryAmountError();\n\tconst { t } = useTranslation(\"error\");\n\n\t// Only check errors at DETAILS step\n\tif (orderStep !== OrderStep.DETAILS) return null;\n\n\tif (!order?.orderType) return t(\"NO_ORDER_TYPE\");\n\tif (order.orderType === OrderType.DELIVERY) return deliveryAmountError || deliveryDistanceError;\n\n\treturn null;\n};\n","import {\n\tColumn,\n\tFormErrors,\n\tInput,\n\tInputType,\n\tonChangeEventType,\n\tRow,\n\tSelectOption,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\nimport { isNumber } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport {\n\tconstants as viewConstants,\n\thooks as viewHooks,\n\tutils as viewUtils,\n} from \"src/modules/view\";\nimport { models as customerModels, utils as customerUtils } from \"src/modules/customer\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (phoneNumber: string) => void;\n}\n\nconst PhoneStep = ({ formErrors, onChange }: Props) => {\n\tconst countryCodeOptions: SelectOption[] = viewConstants.SUPPORTED_COUNTRIES.map(\n\t\t({ phoneCode }) => ({\n\t\t\tlabel: phoneCode,\n\t\t\tvalue: phoneCode,\n\t\t})\n\t);\n\n\tconst hostname = viewHooks.useHostname();\n\tconst language = businessHooks.useLanguage();\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst [form, setForm] = useState<customerModels.CustomerAuthPhoneForm>({\n\t\tcountryCode: countryCodeOptions[0].value as string,\n\t\tphoneNumber: \"\",\n\t});\n\n\tconst { url: baseUrl } = viewUtils.getBaseUrl(hostname, language);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst { name, value } = e?.target || {};\n\n\t\tif (!name) return;\n\n\t\tconst trimmedValue = value?.trim() ?? \"\";\n\n\t\tif (name === \"phoneNumber\" && trimmedValue !== \"\" && !isNumber(trimmedValue)) return;\n\n\t\tconst updatedForm = { ...form, [name]: trimmedValue };\n\n\t\tconst preparedPhoneNumber = customerUtils.preparePhoneNumber(updatedForm);\n\t\tonChange(preparedPhoneNumber);\n\n\t\tsetForm(updatedForm);\n\t};\n\n\treturn (\n\t\t<Column gap={1} fullWidth>\n\t\t\t<Row fullWidth alignItems=\"flex-start\">\n\t\t\t\t<Input\n\t\t\t\t\tname=\"countryCode\"\n\t\t\t\t\toptions={countryCodeOptions}\n\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\tclassName={styles.countryCode}\n\t\t\t\t\tvalue={form.countryCode}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t/>\n\t\t\t\t<Input\n\t\t\t\t\tname=\"phoneNumber\"\n\t\t\t\t\tplaceholder={t(\"Phone number\")}\n\t\t\t\t\ttype={InputType.TEL}\n\t\t\t\t\tfullWidth\n\t\t\t\t\tvalue={form.phoneNumber}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\terrorMessage={tError(formErrors.phoneNumber)}\n\t\t\t\t/>\n\t\t\t</Row>\n\t\t\t<div className={styles.terms}>\n\t\t\t\t<div>\n\t\t\t\t\tBy clicking the button above, you agree to our{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/terms`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tTerms of Service\n\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\tand{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/privacy`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tPrivacy Policy\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Column>\n\t);\n};\nexport default PhoneStep;\n","import { Column, OTPInput, Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\taddress: string;\n\terrorMessage?: string;\n\tonChange: (otp: string) => void;\n}\n\nconst OTPStep = ({ address, errorMessage, onChange }: Props) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\t// Ensure updates happen after render, not during render\n\tconst handleOTPChange = (otp: string) => {\n\t\tqueueMicrotask(() => {\n\t\t\tonChange(otp);\n\t\t});\n\t};\n\n\treturn (\n\t\t<Column gap={2}>\n\t\t\t<Text fullWidth align=\"center\" color=\"muted\">\n\t\t\t\t{t(\"We sent a confirmation code to {{address}}\", { address })}\n\t\t\t</Text>\n\n\t\t\t<OTPInput\n\t\t\t\tonChangeOTP={handleOTPChange}\n\t\t\t\terrorMessage={errorMessage ? tError(errorMessage) : undefined}\n\t\t\t\tinputMode=\"numeric\"\n\t\t\t/>\n\t\t</Column>\n\t);\n};\n\nexport default OTPStep;\n","import {\n\tButton,\n\tColumn,\n\tFormErrors,\n\tInput,\n\tInputType,\n\tonChangeEventType,\n\tUIElementType,\n} from \"@sorocraft/ui\";\nimport { useCallback, useEffect, useState } from \"react\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (email: string) => void;\n\tonCancel: () => void;\n}\n\nconst EmailStep = ({ formErrors, onChange, onCancel }: Props) => {\n\tconst customerEmail = customerHooks.useCustomerEmail();\n\tconst [email, setEmail] = useState(customerEmail || \"\");\n\n\tconst { t: tAuth } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\tconst handleChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tconst newValue = e.target?.value ?? \"\";\n\t\t\tsetEmail(newValue);\n\t\t\tonChange(newValue);\n\t\t},\n\t\t[onChange]\n\t);\n\n\tuseEffect(() => {\n\t\tconst updateEmailIfNeeded = async () => {\n\t\t\tif (customerEmail && customerEmail !== email) {\n\t\t\t\tsetEmail(customerEmail);\n\t\t\t}\n\t\t};\n\n\t\tupdateEmailIfNeeded();\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [customerEmail]);\n\n\treturn (\n\t\t<Column className={styles.container} alignItems=\"center\" gap={0}>\n\t\t\t<Input\n\t\t\t\tname=\"email\"\n\t\t\t\ttype={InputType.EMAIL}\n\t\t\t\tplaceholder=\"Email\"\n\t\t\t\tfullWidth\n\t\t\t\tvalue={email}\n\t\t\t\tonChange={handleChange}\n\t\t\t\terrorMessage={formErrors.email ? tError(formErrors.email) : undefined}\n\t\t\t/>\n\n\t\t\t{!email && (\n\t\t\t\t<Button\n\t\t\t\t\tonClick={onCancel}\n\t\t\t\t\tlabel={tAuth(\"I don't have an email\")}\n\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\n\nexport default EmailStep;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./HoursList.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ntype Props = {\n\ttitle?: string;\n\tdays: branchModels.BranchWorkDay[];\n};\n\nconst HoursList = ({ title, days }: Props) => {\n\tconst { t } = useTranslation(\"branch\");\n\n\tif (isEmpty(days)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={0.5} fullWidth>\n\t\t\t{title && (\n\t\t\t\t<Text weight=\"medium\" className={styles.title}>\n\t\t\t\t\t{t(title)}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{days.map(({ day, hours }) => {\n\t\t\t\tconst isClosed = !hours;\n\t\t\t\tconst timeText = isClosed ? t(\"Closed\") : `${hours.openAt} - ${hours.closeAt}`;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row key={day} justifyContent=\"space-between\" fullWidth>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\">\n\t\t\t\t\t\t\t{t(`WEEKDAY-${day}`)}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\" color={isClosed ? UIElementType.DANGER : \"normal\"}>\n\t\t\t\t\t\t\t{timeText}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default HoursList;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column } from \"@sorocraft/ui\";\n\nimport styles from \"./BranchBusinessHours.module.scss\";\n\nimport { models as branchModels, hooks as branchHooks } from \"src/modules/branch\";\n\nimport HoursList from \"./HoursList\";\n\ntype Props = {\n\topeningHours: branchModels.Branch[\"openingHours\"];\n\tdeliveryHours: branchModels.Branch[\"deliveryHours\"];\n};\n\nconst BranchBusinessHours = ({ openingHours, deliveryHours }: Props) => {\n\tconst openingDays = openingHours?.days || [];\n\tconst deliveryDays = deliveryHours?.days || [];\n\n\tconst isDeliveryEnabled = branchHooks.useIsDeliveryEnabled();\n\n\tif (isEmpty(openingDays)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={2}>\n\t\t\t<HoursList days={openingDays} />\n\t\t\t{isDeliveryEnabled && <HoursList title=\"Delivery Hours\" days={deliveryDays} />}\n\t\t</Column>\n\t);\n};\n\nexport default BranchBusinessHours;\n","import { useEffect, useState, useCallback } from \"react\";\nimport { SIZE, IconButton } from \"@sorocraft/ui\";\nimport { ChevronUp } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ScrollToTop.module.scss\";\n\ninterface Props {\n\tsize: SIZE;\n\tzIndex?: number;\n}\n\nconst ScrollToTop = ({ size, zIndex = 100 }: Props) => {\n\tconst [showGoTop, setShowGoTop] = useState(false);\n\n\tconst handleScroll = useCallback(() => {\n\t\tconst shouldShow = window.scrollY > 100;\n\n\t\t// Only update state if it actually changes\n\t\tif (shouldShow !== showGoTop) {\n\t\t\tsetShowGoTop(shouldShow);\n\t\t}\n\t}, [showGoTop]);\n\n\tconst handleScrollTop = () => {\n\t\twindow.scrollTo({ left: 0, top: 0, behavior: \"smooth\" });\n\t};\n\n\tuseEffect(() => {\n\t\twindow.addEventListener(\"scroll\", handleScroll);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"scroll\", handleScroll);\n\t\t};\n\t}, [handleScroll]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tvisible: showGoTop,\n\t\t\t})}\n\t\t\tstyle={{ zIndex }}\n\t\t>\n\t\t\t<IconButton icon={ChevronUp} size={size} onClick={handleScrollTop} />\n\t\t</div>\n\t);\n};\nexport default ScrollToTop;\n","import { ReactNode } from \"react\";\n\nimport styles from \"./BranchCard.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\ninterface Props {\n\tchildren: ReactNode;\n\tid: number;\n}\n\nconst BranchCardParent = ({ children, id }: Props) => {\n\tconst clearRootPath = branchHooks.useNormalizedRootPath();\n\tconst onBranchSelect = branchHooks.useOnBranchSelect();\n\n\tif (onBranchSelect) {\n\t\treturn (\n\t\t\t<div className={styles.item} onClick={() => onBranchSelect(id)}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<a href={`${clearRootPath}/${id}`} className={styles.item}>\n\t\t\t{children}\n\t\t</a>\n\t);\n};\nexport default BranchCardParent;\n","import { classNames } from \"@sorocraft/js-utils\";\nimport { Column, Row, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchCard.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport BranchCardParent from \"./Parent\";\n\ninterface Props {\n\tbranch: branchModels.Branch;\n}\n\nconst BranchCard = ({ branch }: Props) => {\n\tconst { id, address, coverPhoto, name } = branch || {};\n\tconst business = businessHooks.useBusiness();\n\tconst venueName = `${business.name} ${name}`;\n\n\treturn (\n\t\t<BranchCardParent id={id}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tnoImage: !coverPhoto,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{coverPhoto && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={viewUtils.getCoverPhotoSource(coverPhoto)}\n\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<Column\n\t\t\t\t\tjustifyContent=\"flex-end\"\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tfullHeight\n\t\t\t\t\tclassName={styles.info}\n\t\t\t\t\tgap={0.5}\n\t\t\t\t>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tvariant=\"h2\"\n\t\t\t\t\t\tclassName={styles.name}\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tweight=\"bold\"\n\t\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{venueName}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Row alignItems=\"center\" gap={0.5} justifyContent=\"center\" fullWidth>\n\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t<span className={styles.address}>{address}</span>\n\t\t\t\t\t</Row>\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t</BranchCardParent>\n\t);\n};\nexport default BranchCard;\n","import { Container } from \"@sorocraft/ui\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport BranchCard from \"./BranchCard\";\n\nconst Branches = () => {\n\tconst branches = branchHooks.useList();\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.container}>\n\t\t\t\t{branches.map((branch) => (\n\t\t\t\t\t<BranchCard key={branch.id} branch={branch} />\n\t\t\t\t))}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { MenuAddon } from \"../addon/models\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId?: number;\n}\n\nexport interface ProductVariantTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslation[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n\nexport interface DashboardProduct extends Omit<Product, \"addons\"> {\n\taddons: number[];\n}\n","export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOptionTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\tprice: number;\n\ttranslations: MenuAddonOptionTranslation[];\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\ttranslations: MenuAddonTranslation[];\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n}\n","import { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport {\n\tMenuAddon,\n\tMenuAddonOption,\n\tMenuAddonOptionTranslation,\n\tMenuAddonTranslation,\n} from \"./models\";\n\nexport const getAddonTranslation = (addon: MenuAddon, language: string): MenuAddonTranslation => {\n\treturn (addon?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as MenuAddonTranslation;\n};\n\nexport const getAddonOptionTranslation = (\n\toption: MenuAddonOption,\n\tlanguage: string\n): MenuAddonOptionTranslation => {\n\treturn (option?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as MenuAddonOptionTranslation;\n};\n\nexport const getOptionPrice = ({\n\toption,\n\tcurrency,\n\tlanguage,\n}: {\n\toption: MenuAddonOption;\n\tcurrency?: string;\n\tlanguage?: string;\n}) => {\n\tconst { price } = option || {};\n\n\treturn {\n\t\ttotalPrice: price,\n\t\tformattedTotalPrice: priceFormatter(price, currency || \"USD\", language || \"en\"),\n\t};\n};\n\nexport const getAddonOptionRawPrice = (addon: MenuAddon, optionId: number): number => {\n\treturn (addon?.options || []).find(({ id }) => id === optionId)?.price || 0;\n};\n\nexport const getOptionTitles = (\n\toptions: MenuAddonOption[],\n\toptionIds: number | number[],\n\tlanguage: string\n): string => {\n\tif (Array.isArray(optionIds)) {\n\t\treturn (options || [])\n\t\t\t.filter(({ id }) => optionIds.includes(id))\n\t\t\t.map(({ translations }) => translations.find((t) => t.language === language)?.title || \"\")\n\t\t\t.filter(Boolean)\n\t\t\t.join(\", \");\n\t} else {\n\t\tconst option = (options || []).find(({ id }) => id === optionIds);\n\t\treturn option?.translations.find((t) => t.language === language)?.title || \"\";\n\t}\n};\n\nexport const getAddonTitle = (addon: MenuAddon, language: string): string => {\n\treturn addon?.translations?.find?.((t) => t.language === language)?.title || \"\";\n};\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\n\nimport { Product, ProductTranslation, ProductVariant, ProductVariantTranslation } from \"./models\";\n\nimport { MenuAddon, MenuAddonSelectType } from \"src/modules/addon/models\";\nimport { getAddonOptionRawPrice } from \"src/modules/addon/utils\";\nimport * as orderModels from \"src/modules/order/models\";\n\nexport const calculateTotalPrice = (price: number = 0, quantity: number = 1, vat: number = 0) => {\n\treturn price * quantity * (1 + vat / 100);\n};\n\nexport const getProductTranslation = (\n\tproduct: Pick<Product, \"translations\">,\n\tlanguage: string\n): ProductTranslation => {\n\treturn (product?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as ProductTranslation;\n};\n\nexport const getProductRawPrice = (\n\tproduct: Pick<Product, \"price\" | \"vat\">,\n\tquantity: number = 1\n) => {\n\tconst { price = 0, vat = 0 } = product || {};\n\treturn calculateTotalPrice(price, quantity, vat);\n};\n\nexport const getProductPrice = (\n\tproduct: Pick<Product, \"price\" | \"vat\">,\n\tcurrency: string,\n\tlanguage: string,\n\tquantity: number = 1\n) => {\n\tconst totalPrice = getProductRawPrice(product, quantity);\n\n\treturn {\n\t\ttotalPrice: totalPrice,\n\t\tformattedTotalPrice: priceFormatter(totalPrice, currency, language),\n\t};\n};\n\nexport const getProductVariant = (\n\tproduct: Pick<Product, \"variants\">,\n\tvariantId: number\n): ProductVariant => {\n\treturn product?.variants?.find?.((item) => item.id === variantId) || ({} as ProductVariant);\n};\n\nexport const getSelectedOptionsTotalPrice = (\n\tproduct: Product,\n\tselectedAddons: orderModels.SelectedAddons = {},\n\tquantity: number\n): number => {\n\t// Filter addons that are selected by the user\n\tconst selectedAddonsList = (product?.addons || []).filter((addon) =>\n\t\tObject.prototype.hasOwnProperty.call(selectedAddons, addon.id)\n\t);\n\n\t// Calculate the total price\n\tconst optionsTotalPrice = selectedAddonsList.reduce((total: number, addon: MenuAddon) => {\n\t\tconst { id: addonId, selectType } = addon;\n\n\t\t// Handle SINGLE selection\n\t\tif (selectType === MenuAddonSelectType.SINGLE) {\n\t\t\tconst selectedOptionId = selectedAddons[addonId] as number;\n\t\t\treturn total + getAddonOptionRawPrice(addon, selectedOptionId);\n\t\t}\n\n\t\t// Handle MULTIPLE selection\n\t\tconst selectedOptionIds = (selectedAddons[addonId] || []) as number[];\n\t\tconst multipleOptionsPrice = selectedOptionIds.reduce(\n\t\t\t(multipleTotal, optionId) => multipleTotal + getAddonOptionRawPrice(addon, optionId),\n\t\t\t0\n\t\t);\n\n\t\treturn total + multipleOptionsPrice;\n\t}, 0);\n\n\treturn optionsTotalPrice * quantity;\n};\n\nexport const getProductVariantRawPrice = (\n\tvariantId: number,\n\tproduct: Pick<Product, \"variants\" | \"vat\">,\n\tquantity?: number\n) => {\n\tconst variant = getProductVariant(product, variantId);\n\tconst { vat } = product || {};\n\tconst { price } = variant || {};\n\treturn calculateTotalPrice(price, quantity, vat);\n};\n\nexport const getProductVariantPrice = ({\n\tvariantId,\n\tcurrency = \"USD\",\n\tlanguage = \"en\",\n\tproduct,\n\tquantity = 1,\n}: {\n\tvariantId: number;\n\tcurrency?: string;\n\tlanguage?: string;\n\tproduct: Pick<Product, \"variants\" | \"vat\">;\n\tquantity?: number;\n}) => {\n\tconst totalPrice = getProductVariantRawPrice(variantId, product, quantity);\n\n\treturn {\n\t\ttotalPrice: totalPrice,\n\t\tformattedTotalPrice: priceFormatter(totalPrice, currency, language),\n\t};\n};\n\nexport const getProductVariantTranslation = (\n\tvariant: ProductVariant,\n\tlanguage: string\n): ProductVariantTranslation => {\n\treturn (variant?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as ProductVariantTranslation;\n};\n\nexport const getProductOrderRawPrice = ({\n\tproduct,\n\tvariantId,\n\tquantity = 1,\n\tselectedAddons,\n\tnoVat = false,\n}: {\n\tproduct: Product;\n\tvariantId: number | null;\n\tquantity: number;\n\tselectedAddons: orderModels.SelectedAddons;\n\tnoVat?: boolean;\n}): { price: number; optionsPrice: number; total: number } => {\n\tif (isEmpty(product)) return { price: 0, optionsPrice: 0, total: 0 };\n\n\tconst productData: Product = { ...product, vat: noVat ? 0 : product.vat };\n\tconst selectedOptionsTotalPrice = getSelectedOptionsTotalPrice(\n\t\tproductData,\n\t\tselectedAddons,\n\t\tquantity\n\t);\n\tconst price = variantId\n\t\t? getProductVariantRawPrice(variantId, productData, quantity)\n\t\t: getProductRawPrice(productData, quantity);\n\n\treturn {\n\t\tprice,\n\t\toptionsPrice: selectedOptionsTotalPrice,\n\t\ttotal: price + selectedOptionsTotalPrice,\n\t};\n};\n\nexport const getProductOrderPrice = ({\n\tproduct,\n\tvariantId,\n\tquantity = 1,\n\tcurrency,\n\tlanguage,\n\tselectedAddons,\n\tnoVat = false,\n}: {\n\tproduct: Product;\n\tvariantId: number | null;\n\tquantity: number;\n\tcurrency: string;\n\tlanguage: string;\n\tselectedAddons: orderModels.SelectedAddons;\n\tnoVat?: boolean;\n}) => {\n\tconst { total } = getProductOrderRawPrice({\n\t\tproduct,\n\t\tvariantId,\n\t\tquantity,\n\t\tselectedAddons,\n\t\tnoVat,\n\t});\n\n\treturn {\n\t\ttotalPrice: total,\n\t\tformattedTotalPrice: priceFormatter(total, currency, language),\n\t};\n};\n\nexport const getProductAddon = (product: Product, addonId: number): MenuAddon => {\n\treturn (product?.addons || []).find(({ id }) => id === addonId) || ({} as MenuAddon);\n};\n","import { useOrderContext } from \"src/store/order\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderModels from \"src/modules/order/models\";\nimport { useStoreContext } from \"src/store\";\n\nimport { Product } from \"./models\";\n\nexport const useProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons: orderModels.SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\tconst item = orderItems[orderItemsId];\n\n\treturn item?.quantity || 1;\n};\n\nexport const useList = (): Product[] => {\n\tconst { products } = useStoreContext();\n\n\treturn products || [];\n};\n\nexport const useProductById = (productId: number): Product => {\n\tconst { products } = useStoreContext();\n\tconst product = products?.find?.(({ id }) => id === productId);\n\n\treturn (product || {}) as Product;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Category, CategoryTranslation } from \"./models\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n\nexport const getCategoryNameById = (\n\tcategoryId: number,\n\tcategories: Category[],\n\tlanguage: string\n): string => {\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name || \"\";\n};\n","const GOAL_BASE_NAME = \"digital_menu\";\n\nexport const CATEGORY_SELECTED = `${GOAL_BASE_NAME}_category_select`;\nexport const CATEGORY_SCROLLED = `${GOAL_BASE_NAME}_category_scroll`;\nexport const PRODUCT_DETAILS = `${GOAL_BASE_NAME}_product_details`;\nexport const PRODUCT_ADD_ORDER = `${GOAL_BASE_NAME}_product_add_cart`;\nexport const PRODUCT_VIEW_CHANGED = `${GOAL_BASE_NAME}_product_view_changed`;\n\nexport const GOALS = [CATEGORY_SELECTED, CATEGORY_SCROLLED, PRODUCT_DETAILS, PRODUCT_ADD_ORDER];\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Categories.module.scss\";\n\nimport { models as menuModels } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\ninterface Props {\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tskipTracking?: boolean;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({\n\tcategoryProductMap = [],\n\tlanguage,\n\tselectedCategoryId,\n\tskipTracking = false,\n\tonSelectCategory,\n}: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\tconst carouselRef = useRef<HTMLDivElement>(null);\n\n\tconst scrollToCategoryBlock = useCallback(() => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[selectedCategoryId];\n\t\tif (!categoryBlock || !carouselRef.current) return;\n\n\t\tconst carouselWidth = carouselRef.current.clientWidth;\n\t\tconst categoryLeft = categoryBlock.offsetLeft;\n\t\tconst categoryWidth = categoryBlock.offsetWidth;\n\n\t\tconst scrollLeft = categoryLeft - carouselWidth / 2 + categoryWidth / 2;\n\t\tcarouselRef.current.scrollTo({ left: scrollLeft, behavior: \"smooth\" });\n\t}, [selectedCategoryId]);\n\n\tconst handleSelectCategory = (id: number, name?: string) => {\n\t\tif (id === selectedCategoryId) return;\n\n\t\tonSelectCategory(id);\n\t\tif (skipTracking) return;\n\t\ttrackEvent(analyticsConstants.CATEGORY_SELECTED, { name });\n\t};\n\n\tconst handleGetCarouselRef = (ref: RefObject<HTMLDivElement>) => {\n\t\tif (!ref?.current) return;\n\t\tcarouselRef.current = ref.current;\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedCategoryId) scrollToCategoryBlock();\n\t}, [selectedCategoryId, scrollToCategoryBlock]);\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1} onGetRef={handleGetCarouselRef}>\n\t\t\t\t{(categoryProductMap || []).map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id, name)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\t\tif (el) categoryBlocksRef.current[id] = el;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n\tonClick?: () => void;\n}\n\nconst ProductsListItem = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\tconst { image160, volume, available } = product || {};\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\tconst { t } = useTranslation(\"order\");\n\n\tconst hasVariant = product?.variants?.length > 0;\n\tconst hasAddons = product?.addons?.length > 0;\n\tconst hasImage = !!image160;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif ((hasVariant || hasAddons) && onClick) return onClick();\n\n\t\taddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tnoImage: !hasImage,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<Row justifyContent=\"space-between\" gap={0}>\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<p className={styles.description}>{description}</p>\n\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t{!!volume && <Text color=\"muted\">{volume}</Text>}\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t<Text size=\"xs\" color=\"danger\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{hasImage && (\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={viewUtils.getImageSource(image160)}\n\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\twidth={160}\n\t\t\t\t\t\theight={90}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{available && (\n\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsGridItem.module.scss\";\n\nimport { utils as productUtils } from \"src/modules/product\";\n\nimport { utils as viewUtils } from \"src/modules/view\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\nconst ProductsGridItem = ({\n\tproduct,\n\tcurrency,\n\tlanguage,\n\tdefaultImage = \"\",\n\tisDashboard = false,\n\tonClick,\n\tonAddProduct,\n}: ProductsGridItemProps) => {\n\tconst { volume, image580, image160, image1024, available } = product || {};\n\tconst image = image580 || image1024 || image160 || defaultImage;\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst hasVariant = product?.variants?.length > 0;\n\tconst hasAddons = product?.addons?.length > 0;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif ((hasVariant || hasAddons) && onClick) return onClick();\n\n\t\tonAddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tisClickable: !!onClick,\n\t\t\t\t\tnoImage: !image,\n\t\t\t\t})}\n\t\t\t\tonClick={onClick}\n\t\t\t>\n\t\t\t\t{image && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={viewUtils.getImageSource(image)}\n\t\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\twidth={580}\n\t\t\t\t\t\t\theight={326}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t\t{!isDashboard && <p className={styles.description}>{description}</p>}\n\n\t\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t\t{!!volume && (\n\t\t\t\t\t\t\t\t\t<Text color=\"white\" className={styles.volume}>\n\t\t\t\t\t\t\t\t\t\t{volume}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t\t<Text color=\"white\" size=\"xs\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{available && (\n\t\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default ProductsGridItem;\n","import { useOrderContext } from \"src/store/order\";\n\nimport ProductsGridItem from \"./ProductsGridItem\";\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\ntype Props = Omit<ProductsGridItemProps, \"onAddProduct\">;\n\nconst ProductsGridItemContainer = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\n\treturn (\n\t\t<ProductsGridItem\n\t\t\tonAddProduct={addProduct}\n\t\t\tproduct={product}\n\t\t\tcurrency={currency}\n\t\t\tlanguage={language}\n\t\t\tonClick={onClick}\n\t\t/>\n\t);\n};\n\nexport default ProductsGridItemContainer;\n","import { Row, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { Minus, Plus } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Quantity.module.scss\";\n\ninterface Props {\n\tisDecreaseDisabled?: boolean;\n\tquantity?: number;\n\tsize?: SIZE;\n\tonIncrease: () => void;\n\tonDecrease: () => void;\n}\n\nconst Quantity = ({\n\tisDecreaseDisabled = false,\n\tquantity = 1,\n\tsize = \"md\",\n\tonIncrease,\n\tonDecrease,\n}: Props) => {\n\treturn (\n\t\t<Row\n\t\t\tclassName={classNames(\n\t\t\t\tstyles,\n\t\t\t\t{\n\t\t\t\t\tcontainer: true,\n\t\t\t\t},\n\t\t\t\t[styles[size]]\n\t\t\t)}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tquantityAction: true,\n\t\t\t\t\tisDisabled: isDecreaseDisabled,\n\t\t\t\t})}\n\t\t\t\tonClick={onDecrease}\n\t\t\t>\n\t\t\t\t<SVGIcon icon={Minus} />\n\t\t\t</div>\n\t\t\t<div className={styles.quantityValue}>{quantity}</div>\n\t\t\t<div className={styles.quantityAction} onClick={onIncrease}>\n\t\t\t\t<SVGIcon icon={Plus} />\n\t\t\t</div>\n\t\t</Row>\n\t);\n};\nexport default Quantity;\n","import { Flex, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { ShoppingBag, Trash } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./ProductInOrder.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tproductId: number;\n\tquantity: number;\n\tisInPublicMenu?: boolean;\n\tlanguage?: string;\n\tonModalClose: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductInOrder = ({\n\tproductId,\n\tquantity,\n\tisInPublicMenu = true,\n\tlanguage,\n\tremoveAllProductVariants,\n\tonModalClose,\n}: Props) => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst handleOpenOrder = () => {\n\t\tsetIsOrderOpen(true);\n\t\tif (onModalClose) onModalClose();\n\t};\n\n\tconst handleRemoveAllFromOrder = () => {\n\t\tremoveAllProductVariants(productId);\n\t};\n\n\tif (quantity <= 0) return null;\n\n\treturn (\n\t\t<Flex className={styles.container} fullWidth justifyContent=\"space-between\" alignItems=\"center\">\n\t\t\t<Flex.Item flex={1} className={styles.title}>\n\t\t\t\t{t(\"In order\")} ({quantity})\n\t\t\t</Flex.Item>\n\n\t\t\t<Flex.Item flex={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticon={Trash}\n\t\t\t\t\t\tonClick={handleRemoveAllFromOrder}\n\t\t\t\t\t\ttype={UIElementType.DANGER}\n\t\t\t\t\t\ttooltip={t(\"Remove from order\")}\n\t\t\t\t\t/>\n\t\t\t\t\t{isInPublicMenu && (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\ticon={ShoppingBag}\n\t\t\t\t\t\t\tonClick={handleOpenOrder}\n\t\t\t\t\t\t\ttype={UIElementType.SUCCESS}\n\t\t\t\t\t\t\ttooltip={t(\"View order\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default ProductInOrder;\n","import { useEffect, useRef } from \"react\";\nimport { Column, Input, InputType, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductVariants.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"variants\" | \"vat\">;\n\tselectedVariant: number;\n\tfocusedSection: string;\n\tlanguage: string;\n\tcurrency: string;\n\tonSelectVariant: (id: number) => void;\n}\n\nconst ProductVariants = ({\n\tproduct,\n\tselectedVariant,\n\tfocusedSection,\n\tlanguage,\n\tcurrency,\n\tonSelectVariant,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst { variants } = product || {};\n\n\tconst isVariantsFocused = focusedSection === \"variant\";\n\n\tuseEffect(() => {\n\t\tif (isVariantsFocused && containerRef.current) {\n\t\t\tcontainerRef.current.scrollIntoView({ behavior: \"smooth\" });\n\t\t}\n\t}, [focusedSection, isVariantsFocused]);\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tfocused: isVariantsFocused,\n\t\t\t})}\n\t\t\tgap={1}\n\t\t\tfullWidth\n\t\t>\n\t\t\t<div className={styles.variantsTitle} ref={containerRef}>\n\t\t\t\t{t(\"Product choices\")}\n\t\t\t</div>\n\t\t\t{(variants || []).map((variant) => {\n\t\t\t\tconst { id } = variant || {};\n\t\t\t\tconst { formattedTotalPrice: formattedTotalVariantPrice } =\n\t\t\t\t\tproductUtils.getProductVariantPrice({\n\t\t\t\t\t\tvariantId: id,\n\t\t\t\t\t\tlanguage,\n\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\tproduct,\n\t\t\t\t\t});\n\n\t\t\t\tconst { title } = productUtils.getProductVariantTranslation(variant, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row\n\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\tjustifyContent=\"space-between\"\n\t\t\t\t\t\tonClick={() => onSelectVariant(id)}\n\t\t\t\t\t\tclassName={styles.variant}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tlabel={title}\n\t\t\t\t\t\t\tname=\"variant\"\n\t\t\t\t\t\t\tonChange={() => onSelectVariant(id)}\n\t\t\t\t\t\t\tchecked={selectedVariant === id}\n\t\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={styles.variantPrice}>{formattedTotalVariantPrice}</div>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductVariants;\n","import { Column, Input, InputType, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductAddons.module.scss\";\n\nimport { models as productModels } from \"src/modules/product\";\nimport { models as addonModels, utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"addons\">;\n\tselectedAddons: orderModels.SelectedAddons;\n\tlanguage: string;\n\tcurrency: string;\n\tonOptionSelect: (selection: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n}\n\nconst ProductAddons = ({ product, selectedAddons, language, currency, onOptionSelect }: Props) => {\n\tconst { addons } = product || {};\n\n\treturn (\n\t\t<Column className={styles.container} gap={1.5} fullWidth>\n\t\t\t{(addons || []).map((addon) => {\n\t\t\t\tconst { id: addonId, options, selectType } = addon || {};\n\t\t\t\tconst { title } = addonUtils.getAddonTranslation(addon, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Column key={addonId}>\n\t\t\t\t\t\t<Text variant=\"bold\">{title}</Text>\n\t\t\t\t\t\t<Column gap={1} fullWidth>\n\t\t\t\t\t\t\t{(options || []).map((option) => {\n\t\t\t\t\t\t\t\tconst { id: optionId } = option || {};\n\n\t\t\t\t\t\t\t\tconst { formattedTotalPrice: formattedTotalOptionPrice } =\n\t\t\t\t\t\t\t\t\taddonUtils.getOptionPrice({\n\t\t\t\t\t\t\t\t\t\toption,\n\t\t\t\t\t\t\t\t\t\tlanguage,\n\t\t\t\t\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tconst { title: optionTitle } = addonUtils.getAddonOptionTranslation(\n\t\t\t\t\t\t\t\t\toption,\n\t\t\t\t\t\t\t\t\tlanguage\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst isSingle = selectType === addonModels.MenuAddonSelectType.SINGLE;\n\t\t\t\t\t\t\t\tconst checked = isSingle\n\t\t\t\t\t\t\t\t\t? selectedAddons[addonId] === optionId\n\t\t\t\t\t\t\t\t\t: ((selectedAddons[addonId] || []) as number[]).includes(optionId);\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Row key={optionId} justifyContent=\"space-between\" className={styles.option}>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tlabel={optionTitle}\n\t\t\t\t\t\t\t\t\t\t\tname={`option-${addonId}`}\n\t\t\t\t\t\t\t\t\t\t\tonChange={() =>\n\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelect({\n\t\t\t\t\t\t\t\t\t\t\t\t\taddonId,\n\t\t\t\t\t\t\t\t\t\t\t\t\toptionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSingle,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRemove: !isSingle && checked,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tchecked={checked}\n\t\t\t\t\t\t\t\t\t\t\ttype={isSingle ? InputType.RADIO : InputType.CHECKBOX}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div className={styles.optionPrice}>{formattedTotalOptionPrice}</div>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</Column>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductAddons;\n","import { Button, Column, IconButton, Modal, Row } from \"@sorocraft/ui\";\nimport { Close } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useCallback, useRef, MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductDetails.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Quantity from \"src/components/Quantity\";\nimport ProductInOrder from \"../ProductInOrder\";\nimport ProductVariants from \"../ProductVariants\";\nimport ProductAddons from \"../ProductAddons\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tlanguage: string;\n\tcurrency: string;\n\tselectedVariant: number | null;\n\tfocusedSection: string | null;\n\tselectedAddons: orderModels.SelectedAddons;\n\tisDecreaseDisabled?: boolean;\n\tquantity: number;\n\tactionTitle: string;\n\tisInPublicMenu?: boolean;\n\tproductQuantityInOrderWithAllVariants: number;\n\tonClose: () => void;\n\tsetSelectedVariant: (selectedVariant: number | null) => void;\n\tonOptionSelect: ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n\tadjustQuantity: (amount: number) => void;\n\tonSubmit: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductDetailsUI = ({\n\tproduct,\n\tlanguage,\n\tcurrency,\n\tselectedVariant,\n\tfocusedSection,\n\tselectedAddons,\n\tisDecreaseDisabled,\n\tquantity,\n\tactionTitle,\n\tisInPublicMenu,\n\tproductQuantityInOrderWithAllVariants,\n\tonClose,\n\tsetSelectedVariant,\n\tonOptionSelect,\n\tadjustQuantity,\n\tonSubmit,\n\tremoveAllProductVariants,\n}: Props) => {\n\tconst modalRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\n\tconst { formattedTotalPrice: formattedTotalOrderPrice } = useMemo(\n\t\t() =>\n\t\t\tproductUtils.getProductOrderPrice({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tlanguage,\n\t\t\t\tcurrency,\n\t\t\t\tvariantId: selectedVariant,\n\t\t\t\tselectedAddons,\n\t\t\t}),\n\t\t[product, quantity, language, currency, selectedVariant, selectedAddons]\n\t);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tif (!modalRef?.current?.contains?.(event?.target as Node)) {\n\t\t\t\tif (onClose) onClose();\n\t\t\t}\n\t\t},\n\t\t[onClose]\n\t);\n\n\tif (isEmpty(product)) return null;\n\n\tconst { image1024, volume, variants, addons, available } = product;\n\tconst hasVariants = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Modal\n\t\t\t\tonClose={onClose}\n\t\t\t\tref={modalRef}\n\t\t\t\tnoBodyPadding\n\t\t\t\tsize=\"small\"\n\t\t\t\tcontent={\n\t\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t{image1024 && (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc={viewUtils.getImageSource(image1024)}\n\t\t\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t\t\t\talt={name || \"product\"}\n\t\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Column className={styles.details} gap={1}>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t\t<div className={styles.price}>{formattedTotalPrice}</div>\n\t\t\t\t\t\t\t\t\t<div className={styles.volume}>{volume}</div>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t{(hasVariants || hasAddons) && (\n\t\t\t\t\t\t\t\t<Column gap={0} className={styles.choices}>\n\t\t\t\t\t\t\t\t\t{hasVariants && (\n\t\t\t\t\t\t\t\t\t\t<ProductVariants\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedVariant={selectedVariant}\n\t\t\t\t\t\t\t\t\t\t\tfocusedSection={focusedSection}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonSelectVariant={setSelectedVariant}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{hasAddons && (\n\t\t\t\t\t\t\t\t\t\t<ProductAddons\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelect={onOptionSelect}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<div className={styles.close}>\n\t\t\t\t\t\t\t<IconButton onClick={onClose} icon={Close} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t<Column>\n\t\t\t\t\t\t<ProductInOrder\n\t\t\t\t\t\t\tproductId={product?.id}\n\t\t\t\t\t\t\tonModalClose={onClose}\n\t\t\t\t\t\t\tisInPublicMenu={isInPublicMenu}\n\t\t\t\t\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\t\t\t\t\tquantity={productQuantityInOrderWithAllVariants}\n\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Row className={styles.addToOrder} gap={0.5}>\n\t\t\t\t\t\t\t<Quantity\n\t\t\t\t\t\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\t\t\t\t\t\tonDecrease={() => adjustQuantity(-1)}\n\t\t\t\t\t\t\t\tonIncrease={() => adjustQuantity(1)}\n\t\t\t\t\t\t\t\tquantity={quantity}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName={styles.addAction}\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tavailable ? (\n\t\t\t\t\t\t\t\t\t\t<Row fullWidth justifyContent=\"space-between\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t\t<span className={styles.actionTitle}>{actionTitle}</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{formattedTotalOrderPrice}</span>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\tt(\"Not available\")\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={onSubmit}\n\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\tdisabled={!available}\n\t\t\t\t\t\t\t\tpaddingBlock={0.5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</Column>\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default ProductDetailsUI;\n","import { trackEvent } from \"@sorocraft/js-utils\";\nimport { useEffect, useMemo, useState, useCallback } from \"react\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport ProductDetailsUI from \"./ProductDetailsUI\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tonClose: () => void;\n}\n\n// Product modal\nconst ProductDetails = ({ product, onClose }: Props) => {\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst { addProduct, updateProduct, removeAllProductVariants } = useOrderContext();\n\tconst [quantity, setQuantity] = useState<number>(1);\n\tconst [isUpdate, setIsUpdate] = useState<boolean>(false);\n\tconst [selectedVariant, setSelectedVariant] = useState<number | null>(null);\n\tconst [focusedSection, setFocusedSection] = useState<string | null>(null);\n\tconst [selectedAddons, setSelectedAddons] = useState<orderModels.SelectedAddons>({});\n\tconst { t } = useTranslation(\"order\");\n\n\tconst productQuantityInOrder = orderHooks.useProductQuantityInOrder({\n\t\tproductId: product?.id,\n\t\tvariantId: selectedVariant,\n\t\tselectedAddons,\n\t});\n\tconst productQuantityInOrderWithAllVariants = orderHooks.useProductQuantityInOrderWithAllVariants(\n\t\tproduct?.id\n\t);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\n\tconst isDecreaseDisabled = isUpdate ? quantity === 0 : quantity === 1;\n\tconst actionTitle = useMemo(\n\t\t() => (isUpdate ? (quantity === 0 ? t(\"Remove from order\") : t(\"Update order\")) : t(\"Add\")),\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[isUpdate, quantity]\n\t);\n\n\tuseEffect(() => {\n\t\tsetQuantity(productQuantityInOrder > 0 ? productQuantityInOrder + 1 : 1);\n\t\tsetIsUpdate(productQuantityInOrder > 0);\n\t}, [productQuantityInOrder, product]);\n\n\tuseEffect(() => {\n\t\tsetSelectedVariant(null);\n\t\tsetSelectedAddons({});\n\t}, [product]);\n\n\tconst handleSetFocusedSection = (section: string) => {\n\t\tsetFocusedSection(section);\n\n\t\tsetTimeout(() => {\n\t\t\tsetFocusedSection(null);\n\t\t}, 200);\n\t};\n\n\tconst handleSubmit = () => {\n\t\tconst hasVariant = product?.variants?.length > 0;\n\n\t\tif (hasVariant && !selectedVariant) return handleSetFocusedSection(\"variant\");\n\n\t\tif (isUpdate) {\n\t\t\tupdateProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t} else {\n\t\t\taddProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity });\n\t\t}\n\t\tif (onClose) onClose();\n\t};\n\n\tconst adjustQuantity = useCallback(\n\t\t(amount: number) => {\n\t\t\tif (amount === -1 && isDecreaseDisabled) return;\n\n\t\t\tsetQuantity((current) => Math.max(0, current + amount));\n\t\t},\n\t\t[isDecreaseDisabled]\n\t);\n\n\tconst handleOptionSelect = ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove = false,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => {\n\t\tsetSelectedAddons((prevForm) => {\n\t\t\t// For single selection, directly replace the value\n\t\t\tif (isSingle) {\n\t\t\t\treturn { ...prevForm, [addonId]: optionId };\n\t\t\t}\n\n\t\t\t// Handle multiple selection\n\t\t\tconst previousSelection = (prevForm[addonId] || []) as number[];\n\t\t\tconst updatedSelection = isRemove\n\t\t\t\t? previousSelection.filter((id) => id !== optionId) // Remove `optionId`\n\t\t\t\t: [...new Set([...previousSelection, optionId])]; // Add `optionId`\n\n\t\t\treturn {\n\t\t\t\t...prevForm,\n\t\t\t\t[addonId]: updatedSelection,\n\t\t\t};\n\t\t});\n\t};\n\n\treturn (\n\t\t<ProductDetailsUI\n\t\t\tproduct={product}\n\t\t\tlanguage={language}\n\t\t\tcurrency={currency}\n\t\t\tselectedVariant={selectedVariant}\n\t\t\tfocusedSection={focusedSection}\n\t\t\tselectedAddons={selectedAddons}\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tquantity={quantity}\n\t\t\tactionTitle={actionTitle}\n\t\t\tonClose={onClose}\n\t\t\tsetSelectedVariant={setSelectedVariant}\n\t\t\tonOptionSelect={handleOptionSelect}\n\t\t\tadjustQuantity={adjustQuantity}\n\t\t\tonSubmit={handleSubmit}\n\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\tproductQuantityInOrderWithAllVariants={productQuantityInOrderWithAllVariants}\n\t\t\tisInPublicMenu\n\t\t/>\n\t);\n};\nexport default ProductDetails;\n","import { Flex, Loading, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderStepper.module.scss\";\n\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tonClick?: () => void;\n\tactionText?: string;\n\tisLoading?: boolean;\n\tisDisabled?: boolean;\n}\n\nconst OrderStepper = ({ actionText, isLoading = false, isDisabled = false, onClick }: Props) => {\n\tconst { orderStep } = useOrderContext();\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst { totalPriceWithTax, totalPriceWithTaxAndFees } =\n\t\torderHooks.useOrderFormattedPriceDetails();\n\n\treturn (\n\t\t<Flex\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisLoading,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tisDisabled,\n\t\t\t})}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems=\"center\"\n\t\t\tonClick={isLoading || isDisabled ? null : onClick}\n\t\t>\n\t\t\t<Flex.Item flex={1}>\n\t\t\t\t<Row alignItems=\"center\">\n\t\t\t\t\t<div className={styles.count}>{totalCount}</div>\n\t\t\t\t\t<div className={styles.actionText}>{isLoading ? <Loading /> : actionText}</div>\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t\t<Flex.Item className={styles.totalPrice} flex={1}>\n\t\t\t\t{orderStep === orderModels.OrderStep.DETAILS ? totalPriceWithTaxAndFees : totalPriceWithTax}\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default OrderStepper;\n","import styles from \"./FloatingOrdersButton.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as orderHooks } from \"src/modules/order\";\n\nimport OrderStepper from \"../OrderStepper\";\n\nconst FloatingOrdersButton = () => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\n\tif (totalCount <= 0) return null;\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<OrderStepper onClick={() => setIsOrderOpen(true)} actionText={t(\"View order\")} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default FloatingOrdersButton;\n","import { Edit, Plus } from \"@sorocraft/ui/icons\";\nimport {\n\tButton,\n\tColumn,\n\tUIElementType,\n\tText,\n\tuseModalContext,\n\tAlertBox,\n\tTextBanner,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useState } from \"react\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as orderModels,\n\tservices as orderServices,\n\thooks as orderHooks,\n\tconstants as orderConstants,\n} from \"src/modules/order\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderStepper from \"../OrderStepper\";\n\ninterface Props {\n\tisOrderItemsEmpty: boolean;\n\torderError: string | null;\n}\n\nconst OrderDrawerFooter = ({ isOrderItemsEmpty = false, orderError }: Props) => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst {\n\t\torder,\n\t\torderStep,\n\t\torderItems,\n\t\tsetOrderStep,\n\t\tsetIsOrderOpen,\n\t\tsetTrackingId,\n\t\tupdateOrderErrors,\n\t\tresetErrors,\n\t} = useOrderContext();\n\tconst { setModal } = useModalContext();\n\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst availableCustomer = customerHooks.useAvailableCustomer();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst orderPayload = orderHooks.usePrepareOrder();\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst orderNote = order?.note;\n\tconst hasOrderNote = !!orderNote;\n\tconst showOrderNote = isOrderEnabled && orderStep === orderModels.OrderStep.CART;\n\tconst isServing = isOpen || isDelivering;\n\tconst isSubmitDisabled = !!orderError || !isServing;\n\n\tconst closeDrawer = () => setIsOrderOpen(false);\n\tconst handleAddNote = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_NOTES, params: { note: orderNote } });\n\t};\n\n\tconst createOrder = async (): Promise<string> => {\n\t\ttry {\n\t\t\tsetAPIError(\"\");\n\t\t\tsetIsLoading(true);\n\t\t\tconst response = await orderServices.createOrder(orderPayload);\n\t\t\treturn response.trackingId;\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t});\n\n\t\t\treturn \"\";\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst goToNextStep = async () => {\n\t\t// Check if customer is logged in\n\t\tif (isEmpty(availableCustomer)) {\n\t\t\treturn setModal({\n\t\t\t\tid: viewConstants.MODALS.AUTH,\n\t\t\t});\n\t\t}\n\n\t\tresetErrors();\n\n\t\tif (orderStep === orderModels.OrderStep.DETAILS) {\n\t\t\tif (\n\t\t\t\torder.orderType === orderModels.OrderType.DELIVERY &&\n\t\t\t\tisEmpty(availableCustomer?.addresses)\n\t\t\t) {\n\t\t\t\treturn updateOrderErrors(\"customer\");\n\t\t\t}\n\n\t\t\tif (order.orderType === orderModels.OrderType.DINE_IN && !order?.tableId) {\n\t\t\t\treturn updateOrderErrors(\"tableId\");\n\t\t\t}\n\n\t\t\tif (isEmpty(orderItems)) {\n\t\t\t\treturn updateOrderErrors(\"items\");\n\t\t\t}\n\n\t\t\tconst orderTrackingId = await createOrder();\n\n\t\t\tif (!orderTrackingId) return;\n\n\t\t\tsetTrackingId(orderTrackingId);\n\t\t}\n\n\t\tconst currentStepIndex =\n\t\t\torderConstants.ORDER_STEPS.findIndex((step) => step === orderStep) || 0;\n\n\t\tconst nextStepIndex = currentStepIndex + 1;\n\n\t\tif (nextStepIndex >= orderConstants.ORDER_STEPS.length) return;\n\n\t\tconst nextStep = orderConstants.ORDER_STEPS[nextStepIndex];\n\t\tsetOrderStep(nextStep);\n\t};\n\n\tconst getActionText = () => {\n\t\tif (!isOrderEnabled) return \"Subtotal\";\n\n\t\tif (!isServing) return \"Closed Now\";\n\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.CART:\n\t\t\t\treturn \"Go to checkout\";\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn \"Place order\";\n\n\t\t\tdefault:\n\t\t\t\treturn \"Continue\";\n\t\t}\n\t};\n\n\tconst orderStepperAction = isOrderEnabled && isServing ? goToNextStep : null;\n\n\treturn (\n\t\t<Column className={styles.footer} fullWidth>\n\t\t\t{!!apiError && (\n\t\t\t\t<AlertBox message={tError(apiError)} type=\"error\" onClear={() => setAPIError(\"\")} />\n\t\t\t)}\n\t\t\t{!!orderError && <TextBanner text={orderError} type={UIElementType.DANGER} fullWidth />}\n\t\t\t{showOrderNote && (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={\n\t\t\t\t\t\thasOrderNote ? (\n\t\t\t\t\t\t\t<Text>{order.note}</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t<Text>{t(\"Add an order note\")}</Text>\n\t\t\t\t\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t\t\t\t\t{t(\"Special instructions, allergies, etc.\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tonClick={handleAddNote}\n\t\t\t\t\tsize=\"xxxl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttype={UIElementType.LIGHT}\n\t\t\t\t\tclassName={styles.noteButton}\n\t\t\t\t\ticon={hasOrderNote ? Edit : Plus}\n\t\t\t\t\ticonSize=\"md\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={t(\"Add items\")}\n\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t/>\n\t\t\t) : orderStep !== orderModels.OrderStep.COMPLETED ? (\n\t\t\t\t<OrderStepper\n\t\t\t\t\tactionText={t(getActionText())}\n\t\t\t\t\tonClick={orderStepperAction}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tisDisabled={isSubmitDisabled}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerFooter;\n","import { API } from \"src/services/api\";\n\nimport { OrderPayload } from \"./models\";\n\nexport const createOrder = async (\n\torder: OrderPayload\n): Promise<{\n\ttrackingId: string;\n}> => {\n\treturn API.post(\"customer/order\", order);\n};\n","import { SIZE } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductQuantity.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { hooks as productHooks } from \"src/modules/product\";\n\nimport Quantity from \"src/components/Quantity\";\n\ninterface Props {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tmin?: number;\n\tsize?: SIZE;\n\tisDisabled: boolean;\n}\n\nconst ProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tmin = 1,\n\tsize = \"md\",\n\tselectedAddons,\n\tisDisabled = false,\n}: Props) => {\n\tconst quantity = productHooks.useProductQuantity({ productId, variantId, selectedAddons });\n\tconst product = productHooks.useProductById(productId);\n\tconst { updateProduct } = useOrderContext();\n\n\tconst isDecreaseDisabled = quantity === min;\n\n\tif (isDisabled) {\n\t\treturn <div className={styles.quantity}>{quantity}</div>;\n\t}\n\n\treturn (\n\t\t<Quantity\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tonDecrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity - 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tonIncrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity + 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tquantity={quantity}\n\t\t\tsize={size}\n\t\t/>\n\t);\n};\nexport default ProductQuantity;\n","import { ReactNode } from \"react\";\nimport { Text } from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ntype Props = {\n\titem: orderModels.OrderItem;\n\tproduct: productModels.Product;\n\tlanguage: string;\n};\n\nconst OrderItemOptionsInfo = ({ item, product, language }: Props): ReactNode => {\n\treturn (\n\t\t<>\n\t\t\t{(item.addons || []).map(({ addonId, options }) => {\n\t\t\t\tconst addon = productUtils.getProductAddon(product, addonId);\n\t\t\t\tconst addonOptions = addon?.options || [];\n\t\t\t\tconst selectedOptions = addonOptions.filter((option) =>\n\t\t\t\t\toptions?.some(({ optionId }) => optionId === option.id)\n\t\t\t\t);\n\n\t\t\t\tif (isEmpty(addon) || isEmpty(selectedOptions)) return null;\n\n\t\t\t\tconst addonTitle = addonUtils.getAddonTranslation(addon, language)?.title;\n\t\t\t\tconst optionTitles = selectedOptions\n\t\t\t\t\t.map((option) => addonUtils.getAddonOptionTranslation(option, language)?.title)\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.join(\", \");\n\n\t\t\t\tif (!addonTitle || !optionTitles) return null;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Text color=\"muted\" size=\"xs\" key={addonId}>\n\t\t\t\t\t\t{addonTitle}: {optionTitles}\n\t\t\t\t\t</Text>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default OrderItemOptionsInfo;\n","import { Column, Row, Text } from \"@sorocraft/ui\";\nimport { useMemo } from \"react\";\n\nimport styles from \"./OrderListItem.module.scss\";\n\nimport { models as orderModels, utils as orderUtils, hooks as orderHooks } from \"src/modules/order\";\nimport { utils as productUtils, hooks as productHooks } from \"src/modules/product\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport ProductQuantity from \"../ProductQuantity\";\nimport OrderItemOptionsInfo from \"./OptionsInfo\";\n\ninterface Props {\n\titem: orderModels.OrderItem;\n\tisDisabled: boolean;\n}\n\nconst OrderListItem = ({ item, isDisabled = false }: Props) => {\n\tconst { productId } = item || {};\n\tconst variantId = item?.variant?.variantId;\n\tconst selectedAddons = orderUtils.getSelectedAddonsFromOrderItems(item);\n\tconst product = productHooks.useProductById(productId);\n\tconst variant = productUtils.getProductVariant(product, variantId);\n\tconst language = businessHooks.useLanguage();\n\tconst { image160 } = product;\n\tconst { title: variantTitle } = productUtils.getProductVariantTranslation(variant, language);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = orderHooks.useOrderItemPrice(item);\n\n\treturn (\n\t\t<Row className={styles.container} gap={1} alignItems=\"flex-start\">\n\t\t\t{image160 && (\n\t\t\t\t<img\n\t\t\t\t\tsrc={viewUtils.getImageSource(image160)}\n\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\twidth={80}\n\t\t\t\t\theight={45}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div className={styles.data}>\n\t\t\t\t<div className={styles.name}>{name}</div>\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t{!!variantTitle && (\n\t\t\t\t\t\t<Text color=\"muted\" size=\"xs\">\n\t\t\t\t\t\t\t{variantTitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t<OrderItemOptionsInfo item={item} product={product} language={language} />\n\t\t\t\t</Column>\n\t\t\t\t<div className={styles.price}>{formattedTotalPrice}</div>\n\t\t\t</div>\n\t\t\t<ProductQuantity\n\t\t\t\tproductId={productId}\n\t\t\t\tvariantId={variantId}\n\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tmin={0}\n\t\t\t\tisDisabled={isDisabled}\n\t\t\t/>\n\t\t</Row>\n\t);\n};\nexport default OrderListItem;\n","import { Column, Text, Description } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst OrderNoItems = () => {\n\tconst { t } = useTranslation(\"order\");\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.noItems}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<Text variant=\"h2\">{t(\"Empty order\")}</Text>\n\t\t\t<Description text={t(\"You don't have any items in your order\")} />\n\t\t</Column>\n\t);\n};\nexport default OrderNoItems;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderListItem from \"../OrderListItem\";\nimport OrderNoItems from \"./OrderNoItems\";\n\ninterface Props {\n\tisDisabled?: boolean;\n}\n\nconst OrderItemsList = ({ isDisabled = false }: Props) => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<OrderNoItems />\n\t\t\t) : (\n\t\t\t\t<div className={styles.items}>\n\t\t\t\t\t{Object.entries(orderItems || {}).map(([itemId, item]) => (\n\t\t\t\t\t\t<OrderListItem key={itemId} item={item} isDisabled={isDisabled} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default OrderItemsList;\n","import styles from \"./OrderDrawer.module.scss\";\n\nimport OrderItemsList from \"../OrderItemsList\";\n\nconst OrderDrawerCart = () => (\n\t<div className={styles.content}>\n\t\t<OrderItemsList />\n\t</div>\n);\nexport default OrderDrawerCart;\n","import { Text, UIElementType } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst NoAddressContent = () => {\n\tconst { t } = useTranslation(\"customer\");\n\n\treturn <Text color={UIElementType.DANGER}>{t(\"No address available\")}</Text>;\n};\nexport default NoAddressContent;\n","import { Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as customerHooks, utils as customerUtils } from \"src/modules/customer\";\n\nconst AddressContent = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { t } = useTranslation(\"customer\");\n\tconst { additionalNumber, street, houseNumber, cityName, countryCode } = address;\n\tconst firstLine = customerUtils.formatAddressLine(street, houseNumber, additionalNumber);\n\tconst secondLine = customerUtils.formatCityLine([cityName, countryCode]);\n\n\treturn (\n\t\t<>\n\t\t\t<Text>{firstLine || t(\"Unknown address\")}</Text>\n\t\t\t{secondLine && (\n\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t{secondLine}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</>\n\t);\n};\nexport default AddressContent;\n","import { Column, Row, SVGIcon, useModalContext } from \"@sorocraft/ui\";\nimport { Edit, MarkerPin } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./CustomerAddress.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\n\nimport NoAddressContent from \"./NoAddressContent\";\nimport AddressContent from \"./AddressContent\";\n\nconst CustomerAddress = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { setModal } = useModalContext();\n\n\tconst updateAddress = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_ADDRESS });\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={updateAddress}>\n\t\t\t<Row fullWidth alignItems=\"center\">\n\t\t\t\t<SVGIcon icon={MarkerPin} size=\"md\" />\n\t\t\t\t<Column gap={0} fullWidth>\n\t\t\t\t\t{isEmpty(address) ? <NoAddressContent /> : <AddressContent />}\n\t\t\t\t</Column>\n\t\t\t\t<SVGIcon icon={Edit} size=\"sm\" />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\n\nexport default CustomerAddress;\n","export enum TableShape {\n\tSQUARE = \"SQUARE\",\n\tCIRCLE = \"CIRCLE\",\n\tRECTANGLE = \"RECTANGLE\",\n\tRECTANGLE_VERTICAL = \"RECTANGLE_VERTICAL\",\n\tSINGLE_AT_BAR = \"SINGLE_AT_BAR\",\n\tOTHER = \"OTHER\",\n}\n\nexport enum TableStatus {\n\tVACANT = \"VACANT\", // Free and available\n\tRESERVED = \"RESERVED\", // Booked but not yet seated\n\tOCCUPIED = \"OCCUPIED\", // Currently in use\n\tBLOCKED = \"BLOCKED\", // Temporarily blocked/unavailable\n\tNEEDS_CLEANING = \"NEEDS_CLEANING\", // Dirty, awaiting cleanup\n\tOUT_OF_SERVICE = \"OUT_OF_SERVICE\", // Permanently unavailable repair/maintenance\n\tPENDING_CONFIRMATION = \"PENDING_CONFIRMATION\", // Reservation not yet confirmed\n\tNO_SHOW = \"NO_SHOW\", // Reserved but guest didn’t arrive\n}\n\nexport enum TableLocation {\n\t// Indoor\n\tMAIN_HALL = \"MAIN_HALL\",\n\tPRIVATE_DINING = \"PRIVATE_DINING\",\n\tVIP_ROOM = \"VIP_ROOM\",\n\tBANQUET_HALL = \"BANQUET_HALL\",\n\tBAR_AREA = \"BAR_AREA\",\n\tLOUNGE = \"LOUNGE\",\n\tOPEN_KITCHEN = \"OPEN_KITCHEN\",\n\tBOOTH_SECTION = \"BOOTH_SECTION\",\n\tMEZZANINE = \"MEZZANINE\",\n\tWINE_CELLAR = \"WINE_CELLAR\",\n\n\t// Outdoor\n\tTERRACE = \"TERRACE\",\n\tPATIO = \"PATIO\",\n\tGARDEN = \"GARDEN\",\n\tCOURTYARD = \"COURTYARD\",\n\tROOFTOP = \"ROOFTOP\",\n\tBALCONY = \"BALCONY\",\n\tSIDEWALK = \"SIDEWALK\",\n\tPOOLSIDE = \"POOLSIDE\",\n\n\t// Special Sections\n\tSMOKING_AREA = \"SMOKING_AREA\",\n\tNON_SMOKING = \"NON_SMOKING\",\n\tFAMILY_SECTION = \"FAMILY_SECTION\",\n\tKIDS_AREA = \"KIDS_AREA\",\n\tWAITING_AREA = \"WAITING_AREA\",\n\tDANCE_FLOOR = \"DANCE_FLOOR\",\n}\n\nexport interface Table {\n\tid: number;\n\tbusinessId: number;\n\tbranchId: number;\n\tname: string;\n\tseatCount: number;\n\tshape: TableShape;\n\tlocation: TableLocation;\n\tstatus: TableStatus;\n}\n\nexport interface TableState {\n\ttables: Table[];\n}\n\nexport type TableForm = Omit<Table, \"id\" | \"businessId\" | \"branchId\"> & {\n\tbranchId: string | number;\n};\n\nexport type TableUpdate = Partial<Omit<Table, \"id\" | \"businessId\">>;\n\nexport type TableFilter = Partial<Pick<Table, \"branchId\" | \"shape\" | \"location\" | \"status\">>;\n\nexport type TableFilterParams = { field: keyof TableFilter; value: TableFilter[keyof TableFilter] };\n","import {\n\tColumn,\n\tRow,\n\tText,\n\tInput,\n\tInputType,\n\tSelectOption,\n\tUIElementType,\n\tonChangeEventType,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderTable.module.scss\";\n\nimport { models as tableModels } from \"src/modules/table\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useCallback } from \"react\";\n\ninterface Props {\n\tpreDefinedTable: tableModels.Table;\n\ttableOptions: SelectOption[];\n\tselectedTableId: number;\n\terror?: string;\n\tdisableIfPreDefined?: boolean;\n\tlanguage?: string;\n\tonChange: (tableId: number | null) => void;\n}\n\nconst OrderTableUI = ({\n\tpreDefinedTable,\n\ttableOptions,\n\tselectedTableId,\n\terror,\n\tdisableIfPreDefined,\n\tlanguage,\n\tonChange,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst hasPreDefinedTable = !isEmpty(preDefinedTable);\n\n\tconst handleTableChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tonChange(Number(e?.target?.value) || null);\n\t\t},\n\t\t[onChange]\n\t);\n\n\treturn (\n\t\t<Column className={styles.table} fullWidth gap={0.5}>\n\t\t\t<Row fullWidth>\n\t\t\t\t{hasPreDefinedTable && disableIfPreDefined ? (\n\t\t\t\t\t<Text variant=\"bold\">{preDefinedTable.name}</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tname=\"tableId\"\n\t\t\t\t\t\toptions={tableOptions}\n\t\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\t\tclassName={styles.tableInput}\n\t\t\t\t\t\tvalue={selectedTableId}\n\t\t\t\t\t\tonChange={handleTableChange}\n\t\t\t\t\t\tisDisabled={hasPreDefinedTable}\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tplaceholder={t(\"Select Table\")}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{error && <Text color={UIElementType.DANGER}>{t(error)}</Text>}\n\t\t</Column>\n\t);\n};\nexport default OrderTableUI;\n","import { SelectOption } from \"@sorocraft/ui\";\n\nimport { hooks as tableHooks } from \"src/modules/table\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderTableUI from \"./OrderTableUI\";\n\nconst OrderTable = () => {\n\tconst preDefinedTable = tableHooks.usePreDefinedTable();\n\tconst tables = tableHooks.useList();\n\tconst { order, updateOrder, errors } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\n\tconst tableOptions: SelectOption[] = tables.map(({ id, name }) => ({\n\t\tlabel: name,\n\t\tvalue: id,\n\t}));\n\n\treturn (\n\t\t<OrderTableUI\n\t\t\tonChange={(tableId) => updateOrder({ tableId })}\n\t\t\tpreDefinedTable={preDefinedTable}\n\t\t\ttableOptions={tableOptions}\n\t\t\tselectedTableId={order?.tableId}\n\t\t\terror={errors?.tableId}\n\t\t\tlanguage={language}\n\t\t\tdisableIfPreDefined\n\t\t/>\n\t);\n};\nexport default OrderTable;\n","import { Method, Row, SVGIcon, Tooltip, Text, MethodSelection, SIZE_LONG } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderMethods.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\nimport { OrderTypeForMethods } from \"./OrderMethods.types\";\n\ninterface Props {\n\torderTypes: OrderTypeForMethods[];\n\torderType: orderModels.OrderType;\n\tsize?: SIZE_LONG;\n\tonSelect: (method: string | number) => void;\n}\n\nconst OrderMethods = ({ orderTypes, orderType, size, onSelect }: Props) => {\n\tconst { t } = useTranslation(\"error\");\n\n\tconst getOrderMethodTooltipPosition = (index: number) => {\n\t\tif (index === 0) return \"right\";\n\t\tif (index + 1 === orderTypes.length) return \"left\";\n\n\t\treturn \"bottom\";\n\t};\n\n\tconst createOrderMethod = (\n\t\t{ type, icon, title, isDisabled }: OrderTypeForMethods,\n\t\tindex: number\n\t): Method => ({\n\t\tvalue: type,\n\t\tisDisabled,\n\t\tlabel: (\n\t\t\t<Tooltip\n\t\t\t\thint={isDisabled ? t(\"ORDER_TYPE_DISABLED_AT_THIS_TIME\") : null}\n\t\t\t\tposition={getOrderMethodTooltipPosition(index)}\n\t\t\t>\n\t\t\t\t<Row gap={0.5} flexWrap=\"nowrap\">\n\t\t\t\t\t<SVGIcon icon={icon} />\n\t\t\t\t\t<Text color={type === orderType && !isDisabled ? \"white\" : \"normal\"} whiteSpace=\"nowrap\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</Text>\n\t\t\t\t</Row>\n\t\t\t</Tooltip>\n\t\t),\n\t});\n\n\tconst orderMethods: Method[] = orderTypes.reduce<Method[]>((methods, order, index) => {\n\t\tif (!order.isVisible) return methods;\n\t\tmethods.push(createOrderMethod(order, index));\n\t\treturn methods;\n\t}, []);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<MethodSelection\n\t\t\t\tmethods={orderMethods}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tselectedMethod={orderType}\n\t\t\t\tfullWidth\n\t\t\t\tsize={size}\n\t\t\t\tgap={0.5}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderMethods;\n","import { Column, Row, SIZE, Text } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderPaymentSummary.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\ttextSize: SIZE;\n\ttotalPriceWithoutTax: number;\n\ttotalPriceWithTax: number;\n\tdeliveryFee: number;\n\ttotalTax: number;\n\tcurrency: string;\n\tlanguage: string;\n\torderType: orderModels.OrderType;\n}\n\nconst OrderPaymentSummary = ({\n\ttextSize,\n\ttotalPriceWithoutTax = 0,\n\ttotalPriceWithTax = 0,\n\tdeliveryFee = 0,\n\ttotalTax,\n\tcurrency,\n\tlanguage,\n\torderType,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst totalPriceWithoutTaxFormatted = priceFormatter(totalPriceWithoutTax, currency, language);\n\tconst totalPriceWithTaxFormatted = priceFormatter(totalPriceWithTax, currency, language);\n\tconst totalTaxFormatted = priceFormatter(totalTax, currency, language);\n\tconst deliveryFeeFormatted = priceFormatter(deliveryFee, currency, language);\n\n\treturn (\n\t\t<Column className={styles.container} fullWidth gap={0}>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Items\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalPriceWithoutTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Tax\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && (\n\t\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t\t<Text size={textSize}>{t(\"Delivery Fee\")}</Text>\n\t\t\t\t\t<Text size={textSize}>{deliveryFeeFormatted}</Text>\n\t\t\t\t</Row>\n\t\t\t)}\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{t(\"Total\")}\n\t\t\t\t</Text>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{totalPriceWithTaxFormatted}\n\t\t\t\t</Text>\n\t\t\t</Row>\n\t\t</Column>\n\t);\n};\nexport default OrderPaymentSummary;\n","import { Accordion, Column, Input, InputType, Method, Padding, Row } from \"@sorocraft/ui\";\nimport { Delivery, Grid, ShoppingBag } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nimport CustomerAddress from \"../Customer/CustomerAddress\";\nimport OrderItemsList from \"../OrderItemsList\";\nimport OrderTable from \"./OrderTable\";\nimport OrderMethods from \"../OrderMethods\";\nimport { OrderTypeForMethods } from \"../OrderMethods/OrderMethods.types\";\nimport OrderPaymentSummary from \"../OrderPaymentSummary\";\n\nconst OrderDrawerDetails = () => {\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\tconst {\n\t\torder: { orderType, paymentMethod },\n\t\tupdateOrder,\n\t} = useOrderContext();\n\tconst { totalPriceWithTaxAndFees, totalPriceWithoutTax, totalTax } =\n\t\torderHooks.useOrderPriceDetails();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled, deliveryFeeAmount } =\n\t\tbranchHooks.useBranchSettings();\n\tconst { t } = useTranslation(\"order\");\n\n\tconst orderTypes: OrderTypeForMethods[] = [\n\t\t{\n\t\t\ttype: orderModels.OrderType.DELIVERY,\n\t\t\ticon: Delivery,\n\t\t\ttitle: t(\"Delivery\"),\n\t\t\tisDisabled: !isDelivering,\n\t\t\tisVisible: deliveryOrderEnabled,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.DINE_IN,\n\t\t\ticon: Grid,\n\t\t\ttitle: t(\"Dine in\"),\n\t\t\tisDisabled: !isOpen,\n\t\t\tisVisible: dineInOrderEnabled,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.PICK_UP,\n\t\t\ticon: ShoppingBag,\n\t\t\ttitle: t(\"Pickup\"),\n\t\t\tisDisabled: !isOpen,\n\t\t\tisVisible: pickupOrderEnabled,\n\t\t},\n\t];\n\n\tconst paymentMethods: Method[] = [\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CASH,\n\t\t\tlabel: t(\"Cash\"),\n\t\t},\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CARD,\n\t\t\tlabel: t(\"Card\"),\n\t\t},\n\t];\n\n\treturn (\n\t\t<Column className={styles.content} gap={1}>\n\t\t\t<OrderMethods\n\t\t\t\torderTypes={orderTypes}\n\t\t\t\torderType={orderType}\n\t\t\t\tsize=\"small\"\n\t\t\t\tonSelect={(method) => updateOrder({ orderType: method as orderModels.OrderType })}\n\t\t\t/>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && <CustomerAddress />}\n\t\t\t{orderType === orderModels.OrderType.DINE_IN && (\n\t\t\t\t<Padding paddingInline={1} fullWidth>\n\t\t\t\t\t<OrderTable />\n\t\t\t\t</Padding>\n\t\t\t)}\n\t\t\t<Row className={styles.paymentMethods}>\n\t\t\t\t{paymentMethods.map(({ label, value }) => (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tlabel={label as string}\n\t\t\t\t\t\tname=\"paymentMethod\"\n\t\t\t\t\t\tonChange={() => updateOrder({ paymentMethod: value as orderModels.PaymentMethod })}\n\t\t\t\t\t\tchecked={paymentMethod === value}\n\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tkey={value}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Row>\n\t\t\t<Accordion\n\t\t\t\ttitle={t(\"Order summary\")}\n\t\t\t\tcontent={<OrderItemsList isDisabled />}\n\t\t\t\tfullWidth\n\t\t\t\tstyle=\"no-shadow\"\n\t\t\t\tnoPadding\n\t\t\t\theaderPaddingInline={1}\n\t\t\t\theaderPaddingBlock={1}\n\t\t\t\ttitleVariant=\"h5\"\n\t\t\t/>\n\t\t\t<OrderPaymentSummary\n\t\t\t\ttextSize=\"sm\"\n\t\t\t\ttotalPriceWithoutTax={totalPriceWithoutTax}\n\t\t\t\ttotalPriceWithTax={totalPriceWithTaxAndFees}\n\t\t\t\ttotalTax={totalTax}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t\tdeliveryFee={deliveryFeeAmount}\n\t\t\t\torderType={orderType}\n\t\t\t/>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerDetails;\n","import { Column, Link, Padding, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { Check } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as viewHooks } from \"src/modules/view\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst OrderDrawerCompleted = () => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { trackingId } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst hostname = viewHooks.useHostname();\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.content}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t>\n\t\t\t<SVGIcon icon={Check} size=\"xxl\" color={UIElementType.SUCCESS} />\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text variant=\"h1\" align=\"center\">\n\t\t\t\t\t{t(\"Your Order is Completed!\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text align=\"center\">\n\t\t\t\t\t{t(\"Thank you! We've received your order and it will be delivered shortly.\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={5} paddingBlock={2} fullWidth>\n\t\t\t\t<Link\n\t\t\t\t\thref={`https://${hostname}/${language}/order/${trackingId}`}\n\t\t\t\t\ttitle={t(\"Track order\")}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t/>\n\t\t\t</Padding>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerCompleted;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useRef, MouseEvent } from \"react\";\nimport { Drawer } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderDrawerFooter from \"./OrderDrawerFooter\";\nimport OrderDrawerCart from \"./OrderDrawerCart\";\nimport OrderDrawerDetails from \"./OrderDrawerDetails\";\nimport OrderDrawerCompleted from \"./OrderDrawerCompleted\";\n\nconst OrderDrawer = () => {\n\tconst { isOrderOpen, orderItems } = useOrderContext();\n\tconst { orderStep, setOrderStep, resetOrder } = useOrderContext();\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\");\n\tconst orderErrorInDetails = orderHooks.useOrderErrorInDetails();\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst hasOrderErrorInDetails = !!orderErrorInDetails;\n\tconst hasLargeFooter =\n\t\tisOrderEnabled && (orderStep === orderModels.OrderStep.CART || hasOrderErrorInDetails);\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\tconst closeDrawer = () => {\n\t\tresetOrder();\n\t};\n\n\tconst handleClickOutside = (event: MouseEvent<HTMLElement>) => {\n\t\tif (!contentRef?.current?.contains?.(event?.target as Node)) {\n\t\t\tcloseDrawer();\n\t\t}\n\t};\n\n\tconst handleBack = () => {\n\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t};\n\n\tconst renderContent = () => {\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn <OrderDrawerDetails />;\n\n\t\t\tcase orderModels.OrderStep.COMPLETED:\n\t\t\t\treturn <OrderDrawerCompleted />;\n\n\t\t\tdefault:\n\t\t\t\treturn <OrderDrawerCart />;\n\t\t}\n\t};\n\n\tif (!isOrderOpen) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Drawer\n\t\t\t\tref={contentRef}\n\t\t\t\tonClose={closeDrawer}\n\t\t\t\tisOpen={isOrderOpen}\n\t\t\t\ttitle={t(\"Your order\")}\n\t\t\t\tonBack={orderStep === orderModels.OrderStep.CART ? undefined : handleBack}\n\t\t\t\tcontent={renderContent()}\n\t\t\t\tfooter={\n\t\t\t\t\t<OrderDrawerFooter\n\t\t\t\t\t\tisOrderItemsEmpty={isOrderItemsEmpty}\n\t\t\t\t\t\torderError={orderErrorInDetails}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\thasLargeFooter={hasLargeFooter}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderDrawer;\n","import { RefObject, useEffect, memo, useState } from \"react\";\nimport { Column, DivElementMap, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\nimport { Grid, List } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Products.module.scss\";\n\nimport { utils as productUtils, models as productModels } from \"src/modules/product\";\nimport { utils as categoryUtils } from \"src/modules/category\";\nimport { models as menuModels } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport ProductsListItem from \"../ProductsListItem\";\nimport { ProductsGridItemContainer } from \"../ProductsGridItem\";\nimport ProductDetails from \"../ProductDetails\";\nimport FloatingOrdersButton from \"../FloatingOrdersButton\";\nimport OrderDrawer from \"../OrderDrawer\";\n\ninterface Props {\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcontainerRef: RefObject<HTMLDivElement>;\n\tcurrency: string;\n\tlanguage: string;\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({\n\t\tcategoryProductMap = [],\n\t\tcurrency,\n\t\tlanguage,\n\t\tproductBlocksRef,\n\t\tcontainerRef,\n\t\tonCategoryInView,\n\t}: Props) => {\n\t\tconst [selectedProduct, setSelectedProduct] = useState<productModels.Product | null>(null);\n\t\tconst [view, setView] = useState<productModels.ProductView>(productModels.ProductView.LIST);\n\n\t\tconst views = [\n\t\t\t{\n\t\t\t\ticon: List,\n\t\t\t\ttype: productModels.ProductView.LIST,\n\t\t\t},\n\t\t\t{\n\t\t\t\ticon: Grid,\n\t\t\t\ttype: productModels.ProductView.GRID,\n\t\t\t},\n\t\t];\n\n\t\tconst handleSelectView = (type: productModels.ProductView) => {\n\t\t\tsetView(type);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_VIEW_CHANGED, { name: type });\n\t\t};\n\n\t\tconst handleSelectProduct = (product: productModels.Product) => {\n\t\t\tconst { name } = productUtils.getProductTranslation(product, language);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_DETAILS, { name });\n\n\t\t\tsetSelectedProduct(product);\n\t\t};\n\n\t\tuseEffect(() => {\n\t\t\t// Create an IntersectionObserver instance\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\t// Calculate the center of the viewport\n\t\t\t\t\tconst viewportCenter = (containerRef?.current?.clientHeight || 1000) / 2;\n\n\t\t\t\t\tlet closestCategoryId: string | null = null;\n\t\t\t\t\tlet closestDistance = Infinity;\n\n\t\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\t\tconst rect = entry.boundingClientRect;\n\t\t\t\t\t\t\tconst elementCenter = rect.top + rect.height / 2;\n\t\t\t\t\t\t\tconst distanceToCenter = Math.abs(elementCenter - viewportCenter);\n\n\t\t\t\t\t\t\t// Check if this element is closer to the center\n\t\t\t\t\t\t\tif (distanceToCenter < closestDistance) {\n\t\t\t\t\t\t\t\tclosestDistance = distanceToCenter;\n\t\t\t\t\t\t\t\tclosestCategoryId = entry.target.getAttribute(\"data-category-id\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// Update the active category if it has changed\n\t\t\t\t\tif (closestCategoryId) {\n\t\t\t\t\t\tonCategoryInView(Number(closestCategoryId));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthreshold: 0.1, // Adjust as needed (10% visibility)\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// Observe each product block\n\t\t\tObject.entries(productBlocksRef.current || {}).forEach(([categoryId, element]) => {\n\t\t\t\tif (element) {\n\t\t\t\t\telement.setAttribute(\"data-category-id\", categoryId); // Add a data attribute\n\t\t\t\t\tobserver.observe(element);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\t// Cleanup the observer\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, containerRef, onCategoryInView]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Row className={styles.view} alignItems=\"center\">\n\t\t\t\t\t{views.map(({ icon, type }) => (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tkey={type}\n\t\t\t\t\t\t\ticon={icon}\n\t\t\t\t\t\t\tonClick={() => handleSelectView(type)}\n\t\t\t\t\t\t\ttype={type === view ? UIElementType.PRIMARY : UIElementType.DEFAULT}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<Column>\n\t\t\t\t\t{(categoryProductMap || []).map((category) => {\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\t\t\t\t\t\tconst { id, products } = category;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\tif (el) {\n\t\t\t\t\t\t\t\t\t\tproductBlocksRef!.current![id] = el;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-category-id={id}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t\t\t{(products || []).map((product) => {\n\t\t\t\t\t\t\t\t\t\t\tif (view === productModels.ProductView.GRID) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ProductsGridItemContainer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t\t<ProductDetails product={selectedProduct} onClose={() => setSelectedProduct(null)} />\n\t\t\t\t<FloatingOrdersButton />\n\t\t\t\t<OrderDrawer />\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.categoryProductMap === nextProps.categoryProductMap &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t}\n);\n\nProducts.displayName = \"Products\";\n\nexport default Products;\n","import { RefObject, useCallback, useEffect, useRef, useState } from \"react\";\nimport { DivElementMap } from \"@sorocraft/ui\";\nimport { isEmpty, trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./MenuContent.module.scss\";\n\nimport { hooks as productHooks } from \"src/modules/product\";\nimport { hooks as categoryHooks, utils as categoryUtils } from \"src/modules/category\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { utils as menuUtils } from \"src/modules/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport Categories from \"../Categories\";\nimport Products from \"../Products\";\n\ninterface Props {\n\tcontainerRef: RefObject<HTMLDivElement>;\n}\n\nconst MenuContent = ({ containerRef }: Props) => {\n\tconst products = productHooks.useList();\n\tconst categories = categoryHooks.useList();\n\tconst language = businessHooks.useLanguage();\n\tconst currency = businessHooks.useCurrency();\n\n\tconst categoryProductMap = menuUtils.prepareCategoryAndProductMap(categories, products);\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\n\tconst canUserScroll = useRef<boolean>(true);\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\n\t\tif (!productBlock) return;\n\n\t\tsetTimeout(() => {\n\t\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t\t}, 100);\n\n\t\tsetTimeout(() => {\n\t\t\tcanUserScroll.current = true;\n\t\t}, 1000);\n\t};\n\n\tconst handleSelectCategory = useCallback(async (categoryId: number) => {\n\t\tcanUserScroll.current = false;\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t}, []);\n\n\tconst handleCategoryInView = useCallback(\n\t\t(categoryId: number) => {\n\t\t\tif (!canUserScroll?.current) return;\n\t\t\tconst name = categoryUtils.getCategoryNameById(categoryId, categories, language);\n\t\t\ttrackEvent(analyticsConstants.CATEGORY_SCROLLED, { name });\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t},\n\t\t[categories, language]\n\t);\n\n\tconst handleCategoryFromURL = useCallback(async () => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tconst searchParams = new URLSearchParams(window.location.search);\n\t\tconst categoryIdFromURL = Number(searchParams.get(\"category\"));\n\t\tif (!categoryIdFromURL) return;\n\n\t\tconst categoryToSelect = (categories || []).find(({ id }) => id === categoryIdFromURL);\n\t\tif (isEmpty(categoryToSelect)) return;\n\n\t\thandleSelectCategory(categoryIdFromURL);\n\t}, [categories, handleSelectCategory]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line react-hooks/set-state-in-effect\n\t\thandleCategoryFromURL();\n\t}, [handleCategoryFromURL]);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Categories\n\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\tlanguage={language}\n\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t/>\n\t\t\t<Products\n\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\tcontainerRef={containerRef}\n\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default MenuContent;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\nimport * as businessHooks from \"src/modules/business/hooks\";\n\nimport { Category } from \"./models\";\nimport { getCategoryTranslation } from \"./utils\";\n\nexport const useList = (): Category[] => {\n\tconst { categories } = useStoreContext();\n\n\treturn categories || [];\n};\n\nexport const useCategoryNameById = (categoryId: number): string => {\n\tconst { categories } = useStoreContext() || {};\n\tconst language = businessHooks.useLanguage();\n\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name || \"\";\n};\n","import * as categoryModels from \"src/modules/category/models\";\nimport * as productModels from \"src/modules/product/models\";\n\nimport { CategoryProductMap } from \"./models\";\n\nexport const prepareCategoryAndProductMap = (\n\tcategories: categoryModels.Category[],\n\tproducts: productModels.Product[]\n): CategoryProductMap[] => {\n\tconst productMap = products.reduce<Record<number, productModels.Product[]>>((map, product) => {\n\t\tif (!product.visible) return map;\n\n\t\tconst categoryId = Number(product.categoryId);\n\t\tif (!map[categoryId]) {\n\t\t\tmap[categoryId] = [];\n\t\t}\n\t\tmap[categoryId].push(product);\n\t\treturn map;\n\t}, {});\n\n\treturn categories\n\t\t.map((category) => ({\n\t\t\t...category,\n\t\t\tproducts: (productMap[Number(category.id)] || []) as productModels.Product[],\n\t\t}))\n\t\t.filter((category) => category?.products?.length > 0);\n};\n","import { ModalProvider, ModalsMap } from \"@sorocraft/ui\";\nimport { useEffect, useRef } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport { models as menuModels } from \"src/modules/menu\";\nimport { utils as viewUtils } from \"src/modules/view\";\nimport { StoreProvider } from \"src/store\";\n\nimport { constants as viewConstants, hooks as viewHooks } from \"src/modules/view\";\nimport { OrderProvider, useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { hooks as businessHooks } from \"src/modules/business\";\n\nimport Header from \"./Header\";\nimport AddUpdateNote from \"./Modals/AddUpdateNote\";\nimport AuthModal from \"./Modals/Auth\";\nimport AddUpdateAddress from \"./Modals/AddUpdateAddress\";\nimport BranchBusinessHours from \"./Modals/BranchBusinessHours\";\nimport ScrollToTop from \"../ScrollToTop\";\nimport Branches from \"./Branches\";\nimport MenuContent from \"./MenuContent\";\n\nconst MODALS_MAP: ModalsMap = {\n\t[viewConstants.MODALS.ADD_UPDATE_NOTES]: AddUpdateNote,\n\t[viewConstants.MODALS.AUTH]: AuthModal,\n\t[viewConstants.MODALS.ADD_UPDATE_ADDRESS]: AddUpdateAddress,\n\t[viewConstants.MODALS.BRANCH_BUSINESS_HOURS]: BranchBusinessHours,\n};\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = () => {\n\tconst { getCustomer } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst hostname = viewHooks.useHostname();\n\tconst isInDashboard = viewHooks.useIsInDashboard();\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst branchId = branchHooks.useBranchId();\n\tconst hasSingleBranch = branchHooks.useHasSingleBranch();\n\tconst showMenu = hasSingleBranch || branchId;\n\n\tconst { url: baseUrl, domain } = viewUtils.getBaseUrl(hostname, language);\n\n\tuseEffect(() => {\n\t\tif (isInDashboard) return;\n\t\tgetCustomer();\n\t}, [getCustomer, isInDashboard]);\n\n\treturn (\n\t\t<div className={styles.container} ref={containerRef}>\n\t\t\t<Header />\n\t\t\t{showMenu ? <MenuContent containerRef={containerRef} /> : <Branches />}\n\n\t\t\t<ScrollToTop size=\"md\" zIndex={10} />\n\n\t\t\t{!!hostname && (\n\t\t\t\t<a rel=\"noopener noreferrer\" target=\"_blank\" href={baseUrl} className={styles.footer}>\n\t\t\t\t\t{domain}\n\t\t\t\t</a>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst PublicMenuWithContext = ({ data }: Props) => {\n\treturn (\n\t\t<StoreProvider value={data || ({} as menuModels.PublicMenuData)}>\n\t\t\t<OrderProvider>\n\t\t\t\t<ModalProvider modalsMap={MODALS_MAP}>\n\t\t\t\t\t<PublicMenu />\n\t\t\t\t</ModalProvider>\n\t\t\t</OrderProvider>\n\t\t</StoreProvider>\n\t);\n};\n\nexport default PublicMenuWithContext;\n","import {\n\tButton,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tRow,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\n\nimport styles from \"./AddUpdateNote.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateNote = ({ params }: ModalComponentProps) => {\n\tconst { modalRef, note } = params;\n\tconst [noteContent, setNoteContent] = useState<string>(note || \"\");\n\tconst { setModal } = useModalContext();\n\tconst { updateOrder } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSubmit = () => {\n\t\tupdateOrder({ note: noteContent });\n\t\tsetModal(null);\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\theader={<div>{t(\"Add an order note\")}</div>}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.container}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\ttype={InputType.TEXT_AREA}\n\t\t\t\t\t\tplaceholder={t(\n\t\t\t\t\t\t\t\"Specify any allergies, special requests, or ingredients you want to add or remove\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tvalue={noteContent}\n\t\t\t\t\t\tonChange={(e) => setNoteContent(e?.target?.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Row justifyContent=\"flex-end\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={tCommon(\"Cancel\")}\n\t\t\t\t\t\tonClick={closeModal}\n\t\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button label={tCommon(\"Save\")} onClick={handleSubmit} size=\"md\" />\n\t\t\t\t</Row>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateNote;\n","import {\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFormErrors,\n\tModal,\n\tModalComponentProps,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n} from \"src/modules/customer\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\nimport { logException } from \"src/modules/common/services\";\nimport { services as viewServices } from \"src/modules/view\";\n\nimport PhoneStep from \"./PhoneStep\";\nimport OTPStep from \"./OTPStep\";\nimport EmailStep from \"./EmailStep\";\n\nconst Auth = ({ params }: ModalComponentProps) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst { setOrderStep, getCustomer, customer } = useOrderContext();\n\n\tconst [form, setForm] = useState<customerModels.CustomerAuthForm>({\n\t\tphoneNumber: \"\",\n\t\totp: \"\",\n\t\temail: \"\",\n\t});\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState(\"\");\n\tconst [currentStep, setCurrentStep] = useState<customerModels.CustomerAuthStep>(\n\t\tcustomerModels.CustomerAuthStep.PHONE\n\t);\n\n\tconst steps = [\n\t\tcustomerModels.CustomerAuthStep.PHONE,\n\t\tcustomerModels.CustomerAuthStep.OTP,\n\t\tcustomerModels.CustomerAuthStep.EMAIL,\n\t];\n\n\tconst { modalRef } = params;\n\n\tconst handleClose = () => setModal(null);\n\n\tconst completeAuth = () => {\n\t\tsetOrderStep(orderModels.OrderStep.DETAILS);\n\t\tsetModal(null);\n\t};\n\n\tconst goToNextStep = () => {\n\t\tconst currentIndex = steps.indexOf(currentStep);\n\t\tconst nextStep = steps[currentIndex + 1];\n\t\tif (nextStep) return setCurrentStep(nextStep);\n\t\tcompleteAuth();\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(field: keyof customerModels.CustomerAuthForm) => (value: string) => {\n\t\t\tsetForm((prev) => ({ ...prev, [field]: value }));\n\t\t},\n\t\t[]\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\n\t\ttry {\n\t\t\tconst isEmailStep = currentStep === customerModels.CustomerAuthStep.EMAIL;\n\t\t\tconst emailUnchanged = customer?.email === form.email;\n\t\t\tconst emailCleared = !!customer?.email && !form.email;\n\n\t\t\t// Skip API call if email didn’t change\n\t\t\tif (isEmailStep && (emailUnchanged || emailCleared)) {\n\t\t\t\treturn goToNextStep();\n\t\t\t}\n\n\t\t\t// Validate form\n\t\t\tconst errors = customerUtils.validateForm(form, currentStep);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\n\t\t\tswitch (currentStep) {\n\t\t\t\tcase customerModels.CustomerAuthStep.PHONE: {\n\t\t\t\t\tconst response = await customerServices.loginCustomer(form.phoneNumber);\n\t\t\t\t\t// TODO: errors field gelir check ele. docs-da var.\n\t\t\t\t\tif (response?.status !== 200) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.OTP: {\n\t\t\t\t\tconst response = await customerServices.verifyOTP(form.otp, form.phoneNumber);\n\t\t\t\t\tif (!response?.accessToken) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tviewServices.storage.saveAuthToken(response);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.EMAIL: {\n\t\t\t\t\tconst response = await customerServices.update({ email: form.email });\n\t\t\t\t\tif (response?.status !== 200) throw new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tawait getCustomer();\n\t\t\tgoToNextStep();\n\t\t} catch (error: any) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tlogException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/Auth/Auth.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst renderStep = () => {\n\t\tswitch (currentStep) {\n\t\t\tcase customerModels.CustomerAuthStep.OTP:\n\t\t\t\treturn (\n\t\t\t\t\t<OTPStep\n\t\t\t\t\t\taddress={form.phoneNumber}\n\t\t\t\t\t\terrorMessage={formErrors?.otp}\n\t\t\t\t\t\tonChange={handleChange(\"otp\")}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase customerModels.CustomerAuthStep.EMAIL:\n\t\t\t\treturn (\n\t\t\t\t\t<EmailStep\n\t\t\t\t\t\tonChange={handleChange(\"email\")}\n\t\t\t\t\t\tonCancel={completeAuth}\n\t\t\t\t\t\tformErrors={formErrors}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tdefault:\n\t\t\t\treturn <PhoneStep onChange={handleChange(\"phoneNumber\")} formErrors={formErrors} />;\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Create an account or log in\")}\n\t\t\tonClose={handleClose}\n\t\t\tcontent={\n\t\t\t\t<Column className={styles.content} fullWidth>\n\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{renderStep()}\n\t\t\t\t</Column>\n\t\t\t}\n\t\t\tfooter={<Button label={tCommon(\"Continue\")} onClick={handleSubmit} size=\"lg\" fullWidth />}\n\t\t/>\n\t);\n};\n\nexport default Auth;\n","import {\n\tAddressAutocomplete,\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFlex,\n\tFormErrors,\n\tGoogleSuggestion,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tonChangeEventType,\n\tText,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./AddUpdateAddress.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n\thooks as customerHooks,\n} from \"src/modules/customer\";\nimport { hooks as businessHooks } from \"src/modules/business\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateAddress = ({ params }: ModalComponentProps) => {\n\tconst initialCountryCode = viewConstants.SUPPORTED_COUNTRIES[0].code;\n\n\tconst { getCustomer } = useOrderContext();\n\tconst language = businessHooks.useLanguage();\n\tconst selectedBranch = branchHooks.useSelectedBranch();\n\tconst {\n\t\tid,\n\t\tcountryCode = initialCountryCode,\n\t\tcityName = \"\",\n\t\tstreet = \"\",\n\t\thouseNumber = \"\",\n\t\tfloor,\n\t\tadditionalNumber = \"\",\n\t\tinstructions = \"\",\n\t\tlongitude,\n\t\tlatitude,\n\t\tpostCode,\n\t} = customerHooks.useCustomerAddress();\n\n\tconst initalForm: customerModels.CustomerAddress = {\n\t\taddressId: id,\n\t\tcountryCode,\n\t\tcityName,\n\t\tstreet,\n\t\thouseNumber,\n\t\tadditionalNumber,\n\t\tinstructions,\n\t\tfloor,\n\t\tlatitude,\n\t\tlongitude,\n\t\tpostCode,\n\t};\n\n\tconst { modalRef } = params;\n\tconst { t } = useTranslation(\"customer\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst [form, setForm] = useState<customerModels.CustomerAddress>(initalForm);\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\n\tconst adressError =\n\t\tformErrors.countryCode || formErrors.cityName || formErrors.street || formErrors.houseNumber;\n\n\tconst defaultAdressText = customerUtils.formatAddressLine(\n\t\tinitalForm.street,\n\t\tinitalForm.houseNumber,\n\t\tundefined\n\t);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst name = e?.target?.name;\n\t\tconst value = e?.target?.value;\n\n\t\tsetForm((currentForm) => ({\n\t\t\t...currentForm,\n\t\t\t[name]: value,\n\t\t}));\n\t};\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSelectGoogleSuggestion = useCallback(\n\t\t(suggestion: GoogleSuggestion) => {\n\t\t\tconst updatedForm = {\n\t\t\t\t...form,\n\t\t\t\tcountryCode: suggestion.countryCode,\n\t\t\t\tcityName: suggestion.cityName,\n\t\t\t\tstreet: suggestion.street,\n\t\t\t\thouseNumber: suggestion.houseNumber,\n\t\t\t\tlatitude: suggestion.lat,\n\t\t\t\tlongitude: suggestion.long,\n\t\t\t\tpostCode: suggestion.postCode,\n\t\t\t};\n\n\t\t\tconst errors = customerUtils.validateAddressForm(updatedForm);\n\n\t\t\tsetForm(updatedForm);\n\t\t\tsetFormErrors(errors);\n\t\t},\n\t\t[form]\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\t\ttry {\n\t\t\tconst errors = customerUtils.validateAddressForm(form);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\t\t\tsetIsLoading(true);\n\n\t\t\tconst response = await customerServices.update({ address: form });\n\t\t\tif (response?.status !== 200) {\n\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t}\n\t\t\tgetCustomer();\n\t\t\tcloseModal();\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Update Delivery Address\")}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t<Column fullWidth>\n\t\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Column fullWidth gap={0.5}>\n\t\t\t\t\t\t\t<AddressAutocomplete\n\t\t\t\t\t\t\t\tonSelect={handleSelectGoogleSuggestion}\n\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\torigin={{ lat: selectedBranch?.latitude, lng: selectedBranch?.longitude }}\n\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\tdefaultAdressText={defaultAdressText}\n\t\t\t\t\t\t\t\tplaceHolder={t(\"Enter address\")}\n\t\t\t\t\t\t\t\tinputLabel={t(\"Address\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{adressError && <Text color={UIElementType.DANGER}>{tError(adressError)}</Text>}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<Flex gap={1}>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"floor\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Floor\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"7\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.floor}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.floor)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"additionalNumber\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Additional number\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"17\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.additionalNumber}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.additionalNumber)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tname=\"instructions\"\n\t\t\t\t\t\t\tplaceholder={t(\"Example: Door code is 555\")}\n\t\t\t\t\t\t\tlabel={t(\"Delivery Instructions\")}\n\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\tvalue={form.instructions}\n\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\terrorMessage={tError(formErrors.instructions)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Button\n\t\t\t\t\tlabel={tCommon(\"Save\")}\n\t\t\t\t\tonClick={handleSubmit}\n\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateAddress;\n","import { Modal, ModalComponentProps, useModalContext } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport BranchBusinessHoursUI from \"src/components/PublicMenu/Header/BranchBusinessHours\";\n\nconst BranchBusinessHours = ({ params }: ModalComponentProps) => {\n\tconst { setModal } = useModalContext();\n\tconst { t } = useTranslation(\"branch\");\n\n\tconst { modalRef, openingHours, deliveryHours } = params;\n\n\tconst closeModal = () => setModal(null);\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={<BranchBusinessHoursUI openingHours={openingHours} deliveryHours={deliveryHours} />}\n\t\t\ttitle={t(\"Opening Hours\")}\n\t\t/>\n\t);\n};\nexport default BranchBusinessHours;\n","import { useCallback, useRef } from \"react\";\nimport { CloseDropdownRef, DropDown, DropDownMenuItem, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./Events.module.scss\";\n\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tcurrentGoal: string;\n\tlanguage?: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst EventsToolbar = ({ currentGoal, language, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\tconst closeDropdownRef = useRef<CloseDropdownRef>({});\n\n\tconst getGoalTitle = (goal: string) => {\n\t\tswitch (goal) {\n\t\t\tcase analyticsConstants.CATEGORY_SCROLLED:\n\t\t\t\treturn t(\"Scrolled to Category\");\n\t\t\tcase analyticsConstants.CATEGORY_SELECTED:\n\t\t\t\treturn t(\"Category Selected\");\n\t\t\tcase analyticsConstants.PRODUCT_DETAILS:\n\t\t\t\treturn t(\"Product Details\");\n\t\t\tcase analyticsConstants.PRODUCT_ADD_ORDER:\n\t\t\t\treturn t(\"Product Added to Order\");\n\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t}\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(goal: string) => {\n\t\t\tsetGoal(goal);\n\t\t\tcloseDropdownRef?.current?.close?.();\n\t\t},\n\t\t[setGoal]\n\t);\n\n\treturn (\n\t\t<DropDown\n\t\t\taction={getGoalTitle(currentGoal)}\n\t\t\tactionSize=\"large\"\n\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\tcloseRef={closeDropdownRef}\n\t\t\tmenu={\n\t\t\t\t<div className={styles.toolbarMenu}>\n\t\t\t\t\t{analyticsConstants.GOALS.map((goal) => (\n\t\t\t\t\t\t<DropDownMenuItem key={goal} onClick={() => handleChange(goal)}>\n\t\t\t\t\t\t\t{getGoalTitle(goal)}\n\t\t\t\t\t\t</DropDownMenuItem>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default EventsToolbar;\n","import { Card, BarChart, Loading, BarChartData } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport EventsToolbar from \"./EventsToolbar\";\n\ninterface Props {\n\tdata: BarChartData[];\n\tisLoading?: boolean;\n\tlanguage?: string;\n\tgoal: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst Events = ({ data, isLoading = false, language, goal, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\n\treturn (\n\t\t<Card\n\t\t\ttitle={t(\"Events\")}\n\t\t\ttoolbar={<EventsToolbar language={language} currentGoal={goal} setGoal={setGoal} />}\n\t\t>\n\t\t\t{isLoading ? <Loading /> : <BarChart data={data} />}\n\t\t</Card>\n\t);\n};\nexport default Events;\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n\tLIFETIME = \"lifeTime\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n\tribbonText?: string;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n\nexport enum SubscriptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tEXPIRED = \"EXPIRED\",\n\tCANCELLED = \"CANCELLED\",\n}\n\nexport type BillingInterval = \"MONTH\" | \"YEAR\";\n\nexport interface Subscription {\n\tid: number;\n\tbillingInterval: BillingInterval;\n\tbillingIntervalCount: number;\n\tstartDate: string;\n\tendDate: string;\n\tinterval: PricingInterval;\n\tstatus: SubscriptionStatus;\n\tbusiness_id?: number;\n\tplanName: string;\n}\n","import { PlanType, PricingPlans } from \"./models\";\n\nexport const PRICING: PricingPlans = {\n\tappetizer: {\n\t\ttitle: \"Appetizer\",\n\t\tprice: {\n\t\t\tmonthly: 9,\n\t\t\tannually: 7,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tmainCourse: {\n\t\ttitle: \"Main Course\",\n\t\tprice: {\n\t\t\tmonthly: 19,\n\t\t\tannually: 15,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tchefsSpecial: {\n\t\ttitle: \"Chef's Special\",\n\t\tprice: {\n\t\t\tmonthly: 49,\n\t\t\tannually: 39,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tlifeTime: {\n\t\ttitle: \"Lifetime\",\n\t\tprice: {\n\t\t\tmonthly: 49,\n\t\t\tannually: 49,\n\t\t},\n\t\tribbonText: \"Limited Time Only\",\n\t\t// discountedPrice: 0,\n\t},\n};\n\nexport const PRICING_BENEFITS = [\n\t{\n\t\ttitle: \"Smart QR Menu\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Link-in-bio\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Menu Analytics\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Users\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Products\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Categories\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Languages\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Product variants\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Product options\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Premium Support\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"SEO\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Sales reports\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Table Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Order Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Delivery Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Multiple Branches\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Point of Sale (POS)\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: false,\n\t},\n\t{\n\t\ttitle: \"Mobile App for Owners & Staff\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: false,\n\t},\n\t// {\n\t// \ttitle: \"RestaroundPay with Mobile\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: true,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// },\n\t// {\n\t// \ttitle: \"Event management\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: true,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// },\n\t// {\n\t// \ttitle: \"Third-Party Delivery Integrations\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: false,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// \t[PlanType.LIFETIME]: false,\n\t// },\n];\n\nexport const LIFETIME_PROMO_CODES = [\"LIFETIME_49\"];\n","import { priceFormatter } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./Pricing.module.scss\";\n\nimport {\n\tmodels as subscriptionModels,\n\tconstants as subscriptionConstants,\n} from \"src/modules/subscription\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tplan: subscriptionModels.PlanType;\n\tlanguage: string;\n\tinterval: subscriptionModels.PricingInterval;\n\tcurrency: string;\n}\n\nconst PricingPlanAmount = ({ plan, language, interval, currency }: Props) => {\n\tconst { t } = useTranslation(\"pricing\", {\n\t\tlanguage,\n\t});\n\n\tconst { price, discountedPrice } = subscriptionConstants.PRICING[plan];\n\tconst intervalPrice = price[interval];\n\tconst intervalPriceText =\n\t\tplan === subscriptionModels.PlanType.LIFETIME ? \"/ lifetime\" : \"/ month\";\n\n\tif (discountedPrice !== undefined) {\n\t\treturn (\n\t\t\t<Column gap={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<span className={styles.discountedPrice}>\n\t\t\t\t\t\t{priceFormatter(discountedPrice, currency, language)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className={styles.originalPrice}>\n\t\t\t\t\t\t{priceFormatter(intervalPrice, currency, language)}\n\t\t\t\t\t</span>\n\t\t\t\t</Row>\n\t\t\t\t<Text size=\"sm\">{t(intervalPriceText)}</Text>\n\t\t\t</Column>\n\t\t);\n\t}\n\treturn (\n\t\t<Row gap={0.5}>\n\t\t\t<Text size=\"xxl\" variant=\"bold\">\n\t\t\t\t{priceFormatter(intervalPrice, currency, language)}\n\t\t\t</Text>\n\t\t\t<Text size=\"sm\">{t(intervalPriceText)}</Text>\n\t\t</Row>\n\t);\n};\nexport default PricingPlanAmount;\n","import { Card, SVGIcon, UIElementType, Button, Row } from \"@sorocraft/ui\";\nimport { Check, Minus, ShieldDollar } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { ReactNode, useState } from \"react\";\n\nimport styles from \"./Pricing.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as subscriptionModels,\n\tconstants as subscriptionConstants,\n} from \"src/modules/subscription\";\nimport { utils as viewUtils } from \"src/modules/view\";\n\nimport PricingPlanAmount from \"./PricingPlanAmount\";\n\ninterface Props {\n\tcurrency: string;\n\tlanguage: string;\n\tisLoading?: boolean;\n\tpromoCode?: string | null;\n\tonPlanSelect?: (plan: subscriptionModels.PlanType) => void;\n\tonIntervalSelect?: (interval: subscriptionModels.PricingInterval) => void;\n}\n\ninterface PlanParentProps {\n\tchildren: ReactNode;\n\tplan: subscriptionModels.PlanType;\n}\n\nconst Pricing = ({\n\tcurrency,\n\tlanguage,\n\tisLoading = false,\n\tonPlanSelect,\n\tonIntervalSelect,\n}: Props) => {\n\tconst [selectedInterval, setSelectedInterval] =\n\t\tuseState<subscriptionModels.PricingInterval>(\"annually\");\n\tconst { t } = useTranslation(\"pricing\", {\n\t\tlanguage,\n\t});\n\n\tconst plans: subscriptionModels.PlanType[] = [\n\t\tsubscriptionModels.PlanType.APPETIZER,\n\t\tsubscriptionModels.PlanType.MAIN_COURSE,\n\t\tsubscriptionModels.PlanType.CHEFS_SPECIAL,\n\t];\n\tconst intervals: Array<subscriptionModels.PricingInterval> = [\"annually\", \"monthly\"];\n\tconst isDashboard = Boolean(onPlanSelect);\n\tconst actionTitle = isDashboard ? \"Choose Plan\" : \"Try for free\";\n\n\tconst handleSelectInterval = (interval: subscriptionModels.PricingInterval) => {\n\t\tsetSelectedInterval(interval);\n\t\tif (onIntervalSelect) {\n\t\t\tonIntervalSelect(interval);\n\t\t}\n\t};\n\n\tconst PlanParent = ({ children, plan }: PlanParentProps) => {\n\t\tconst { ribbonText } = subscriptionConstants.PRICING[plan];\n\t\tconst hasRibbon = Boolean(ribbonText);\n\n\t\tconst commonProps = {\n\t\t\tclassName: classNames(styles, { plan: true, hasRibbon }),\n\t\t\t\"data-ribbon\": t(ribbonText),\n\t\t};\n\n\t\tif (onPlanSelect) {\n\t\t\treturn (\n\t\t\t\t<div {...commonProps} onClick={() => !isLoading && onPlanSelect(plan)}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<a\n\t\t\t\t{...commonProps}\n\t\t\t\thref={viewUtils.getRegisterUrl(language, `pricing-${plan}`)}\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.intervals}>\n\t\t\t\t{intervals.map((interval) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={interval}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\tinterval: true,\n\t\t\t\t\t\t\tactive: selectedInterval === interval,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tonClick={() => handleSelectInterval(interval)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(interval)}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div className={styles.plans}>\n\t\t\t\t{plans.map((plan) => (\n\t\t\t\t\t<PlanParent key={plan} plan={plan}>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<div className={styles.title}>{t(subscriptionConstants.PRICING[plan].title)}</div>\n\t\t\t\t\t\t\t<div className={styles.price}>\n\t\t\t\t\t\t\t\t<PricingPlanAmount\n\t\t\t\t\t\t\t\t\tplan={plan}\n\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\tinterval={selectedInterval}\n\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={styles.action}>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={t(actionTitle)}\n\t\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\t\ttype={\n\t\t\t\t\t\t\t\t\t\tplan === subscriptionModels.PlanType.MAIN_COURSE\n\t\t\t\t\t\t\t\t\t\t\t? UIElementType.PRIMARY\n\t\t\t\t\t\t\t\t\t\t\t: UIElementType.BORDERED_PRIMARY\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={() => {}}\n\t\t\t\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={styles.benefits}>\n\t\t\t\t\t\t\t\t{!isDashboard && (\n\t\t\t\t\t\t\t\t\t<Row className={styles.moneyBack} gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={ShieldDollar} size=\"sm\" color={UIElementType.SUCCESS} />\n\t\t\t\t\t\t\t\t\t\t<span>{t(\"No credit card needed\")}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{subscriptionConstants.PRICING_BENEFITS.map((benefit) => (\n\t\t\t\t\t\t\t\t\t<div key={benefit.title} className={styles.benefit}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={benefit[plan] ? Check : Minus} size=\"md\" />{\" \"}\n\t\t\t\t\t\t\t\t\t\t<span>{t(benefit.title)}</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</PlanParent>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default Pricing;\n","import { useEffect, useRef } from \"react\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { ShoppingBag } from \"@sorocraft/ui/icons\";\nimport { SVGIcon, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderFAB.module.scss\";\n\ninterface Props {\n\ttotalCount: number;\n\tisVisible: boolean;\n\tonClick?: () => void;\n}\n\nconst OrderFAB = ({ totalCount, isVisible, onClick }: Props) => {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst mountedRef = useRef<boolean>(false);\n\n\tuseEffect(() => {\n\t\tif (!mountedRef.current) return;\n\n\t\tconst el = containerRef.current;\n\t\tif (!el) return;\n\n\t\tel.classList.remove(styles.animate);\n\t\tvoid el.offsetWidth;\n\t\tel.classList.add(styles.animate);\n\t}, [totalCount]);\n\n\tuseEffect(() => {\n\t\tmountedRef.current = true;\n\t}, []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisVisible,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t\tref={containerRef}\n\t\t>\n\t\t\t<SVGIcon icon={ShoppingBag} color={UIElementType.DEFAULT} size=\"md\" />\n\t\t\t<div className={styles.count}>{totalCount}</div>\n\t\t</div>\n\t);\n};\nexport default OrderFAB;\n"],"names":["MODALS","SUPPORTED_LOCALES","SUPPORTED_COUNTRIES","name","code","phoneCode","CO_DOMAIN","DEFAULT_HOSTNAME","DOMAINS","IMAGE_BASE_URL","storage","Storage","validators","number","AZERBAIJANI_PREFIXES","RegExp","join","test","isValid","error","validatePhoneNumber","phoneNumber","cleaned","replace","countryCode","startsWith","nationalNumber","slice","length","validator","getBaseUrl","hostname","language","domain","includes","url","getRegisterUrl","source","tld","getTLD","getImageSource","image","getLogoImageSource","logoImage","getCoverPhotoSource","coverPhoto","StoreContext","createContext","StoreProvider","children","value","_jsx","Provider","useStoreContext","useContext","useHostname","useIsInDashboard","isInDashboard","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply","OrderType","OrderStatus","OrderItemStatus","PaymentMethod","OrderStep","SuppressedError","initialOrder","orderType","totalPriceWithTax","totalPriceWithoutTax","totalTax","vat","paymentMethod","CASH","ORDER_STEPS","CART","DETAILS","COMPLETED","OrderErrors","generateOrderItemsId","productId","variantId","selectedAddons","Error","orderItemsId","addonIdsPart","Object","entries","map","addonId","option","optionIds","Array","isArray","sortNumbers","filter","Boolean","getOrderItemPrice","orderItem","price","variant","addons","quantity","basePrice","_a","addonsPrice","reduce","total","addon","addonTotal","options","sum","calculatSingleAddonTotalPrice","calculateTotalAddonPrice","itemNetPrice","itemTax","itemGrossPrice","totalGross","totalNet","getOrderErrorMessages","field","ADDRESS_IS_EMPTY","TABLE_NOT_SELECTED","EMPTY_ITEMS","BRANCH_NOT_SELECTED","FIELD_REQUIRED_ERROR","BASE_API_URL","request","method","endpoint","body","accessToken","getAuthToken","response","fetch","headers","Authorization","credentials","JSON","stringify","data","json","ok","API","update","payload","logException","args_1","errorInfo","trackEvent","message","assign","console","getHoursForDay","schedule","weekDayIndex","days","find","day","hours","splitHours","split","Number","isWithinTimeRange","timeRange","now","Date","openH","openM","openAt","closeH","closeM","closeAt","start","setHours","end","setDate","getDate","useHasSingleBranch","branches","useSelectedBranch","branchId","hasSingleBranch","isEmpty","item","id","useBranchCoordinates","selectedBranch","latitude","longitude","useBranchServes","openingHours","deliveryHours","isOpen","isDelivering","getUTCDay","openHours","deliveryHoursToday","useBranchSettings","settings","useOrderEnabled","deliveryOrderEnabled","dineInOrderEnabled","pickupOrderEnabled","useOnBranchSelect","onBranchSelect","useInitialOrder","defaultOrderType","defaultPaymentMethod","defaultBranchId","tableId","tableHooks.usePreDefinedTableId","branchHooks.useBranchServes","branchSettings","branchHooks.useBranchSettings","DELIVERY","DINE_IN","PICK_UP","orderUtils.getDefaultOrderType","undefined","orderModels.PaymentMethod","OrderContext","order","orderConstants.initialOrder","orderStep","orderModels.OrderStep","orderItems","isOrderOpen","customer","trackingId","errors","updateOrder","setOrderStep","addProduct","updateProduct","removeAllProductVariants","setIsOrderOpen","getCustomer","resetOrder","setTrackingId","updateOrderErrors","resetErrors","OrderProvider","isOrderDefaultOpen","storeHooks.useInitialOrder","setCustomer","useState","setOrder","setOrderItems","setErrors","useCallback","updatedFields","currentOrder","forEach","currentErrors","updateOrderItems","product","note","isAddOperation","variants","orderUtils.generateOrderItemsId","currentOrderItems","existingItem","newQuantity","_b","s","t","p","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","propertyIsEnumerable","__rest","selectedVariant","selectedAddonsPayload","productAddons","addonIdStr","selected","selectedOptionIds","optionId","orderUtils.buildSelectedAddonsPayload","items","updatedOrderItems","acc","viewServices.storage","commonServices.logException","file","force","shouldClose","orderUtils.getOrderErrorMessages","contextValue","useMemo","useOrderContext","BranchSetting","BusinessSetting","useBusiness","business","useCurrency","currency","useLanguage","Languages","isOptionsOpen","setIsOptionsOpen","languages","businessHooks.useLanguage","onLanguageSelect","businessHooks.useOnLanguageSelect","isBilingual","otherLanguages","getFlag","className","styles","container","onClick","_jsxs","Row","alignItems","gap","classNames","src","alt","currentLanguage","BusinessHeader","avatar256","businessHooks.useBusiness","viewUtils.getCoverPhotoSource","width","height","Column","fullWidth","fullHeight","justifyContent","viewUtils.getLogoImageSource","Text","color","align","BackIcon","size","theme","username","businessHooks.useBusinessUsername","viewHooks.useIsInDashboard","branchHooks.useOnBranchSelect","window","location","pathname","history","back","SVGIcon","icon","ChevronLeft","HeaderLinks","setModal","useModalContext","phone","wifiPassword","whatsApp","telegram","branchHooks.useSelectedBranch","instagram","tiktok","facebook","isBusinessHoursAvailable","IconLink","Phone","href","shape","Whatsapp","target","Instagram","Telegram","Tiktok","Facebook","Tooltip","hint","Wifi","viewConstants.MODALS","params","Clock","BranchHeader","venueName","businessName","branchHooks.useVenueName","address","branchHooks.useHasSingleBranch","branchHooks.useBranchCoordinates","googleMapLink","Flex","direction","Item","shrink","weight","noMargin","rel","MarkerPin","UIElementType","DEFAULT","Header","locales","az","SOMETHING_WRONG","FIELD_REQUIRED","INVALID_OTP","OTP_RATE_LIMIT_EXCEEDED","FEATURE_NOT_AVAILABLE_FOR_SEGMENT","ORDER_TYPE_DISABLED_FOR_BUSINESS","ORDER_TYPE_DISABLED_AT_THIS_TIME","COUNTRY_REQUIRED","CITY_REQUIRED","STREET_REQUIRED","STREET_NUMBER_REQUIRED","OUT_OF_DELIVERY_RANGE","NO_ORDER_TYPE","Save","Cancel","Continue","Add","Subtotal","Delivery","Pickup","Cash","Items","Tax","Total","Table","Card","Country","City","Address","Azerbaijan","Floor","Events","monthly","annually","Appetizer","Closed","en","ru","tr","nl","et","common","auth","events","pricing","branch","useTranslation","ns","locale","supportedLocale","translations","key","translation","keys","k","getTranslations","useCustomerAddress","addresses","CustomerAuthStep","CustomerAddressType","validateAddressForm","form","cityName","street","houseNumber","formatAddressLine","additionalNumber","useOrderPriceDetails","deliveryFeeAmount","values","totalPriceWithTaxAndFees","usePrepareOrder","existingOrderData","businessId","businessHooks.useBusinessId","customerHooks.useCustomerAddress","customerId","customerHooks.useCustomerId","workingDayId","employeeId","customerAddressId","deliveryFee","useTotalOrderItemsCount","useDeliveryDistanceError","branchCoordinates","maxDeliveryDistance","setError","useEffect","hasValidCustomerAddress","hasValidBranchCoordinates","distance","customerCoordinates","spherical","google","maps","importLibrary","coordinate1","LatLng","coordinate2","computeDistanceBetween","customerServices.getCustomerDistance","useDeliveryAmountError","businessHooks.useCurrency","minDeliveryAmount","amount","priceFormatter","PhoneStep","formErrors","onChange","countryCodeOptions","viewConstants.SUPPORTED_COUNTRIES","label","viewHooks.useHostname","tError","setForm","baseUrl","viewUtils.getBaseUrl","handleChange","trimmedValue","trim","isNumber","updatedForm","preparedPhoneNumber","replaceAll","customerUtils.preparePhoneNumber","Input","type","InputType","SELECT","placeholder","TEL","errorMessage","terms","OTPStep","OTPInput","onChangeOTP","otp","queueMicrotask","inputMode","EmailStep","onCancel","customerEmail","email","customerHooks.useCustomerEmail","setEmail","tAuth","newValue","EMAIL","Button","HoursList","title","isClosed","timeText","whiteSpace","DANGER","BranchBusinessHours","openingDays","deliveryDays","isDeliveryEnabled","branchHooks.useIsDeliveryEnabled","ScrollToTop","zIndex","showGoTop","setShowGoTop","handleScroll","shouldShow","scrollY","addEventListener","removeEventListener","visible","style","IconButton","ChevronUp","scrollTo","left","top","behavior","BranchCardParent","clearRootPath","rootPath","endsWith","branchHooks.useNormalizedRootPath","BranchCard","content","noImage","imageContainer","info","Branches","branchHooks.useList","Container","ProductView","MenuAddonSelectType","getAddonTranslation","getAddonOptionTranslation","getAddonOptionRawPrice","calculateTotalPrice","getProductTranslation","getProductRawPrice","getProductPrice","totalPrice","formattedTotalPrice","getProductVariant","getProductVariantRawPrice","getProductVariantTranslation","getProductOrderRawPrice","noVat","optionsPrice","productData","selectedOptionsTotalPrice","selectType","SINGLE","selectedOptionId","multipleTotal","getSelectedOptionsTotalPrice","useProductById","products","getCategoryTranslation","category","GOAL_BASE_NAME","CATEGORY_SELECTED","CATEGORY_SCROLLED","PRODUCT_DETAILS","PRODUCT_ADD_ORDER","PRODUCT_VIEW_CHANGED","GOALS","Categories","categoryProductMap","selectedCategoryId","skipTracking","onSelectCategory","categoryBlocksRef","useRef","carouselRef","scrollToCategoryBlock","categoryBlock","current","carouselWidth","clientWidth","scrollLeft","offsetLeft","offsetWidth","Carousel","onGetRef","ref","CarouselItem","Chip","analyticsConstants.CATEGORY_SELECTED","handleSelectCategory","BORDERED_PRIMARY","active","el","ProductsListItem","image160","volume","available","description","productUtils.getProductTranslation","productUtils.getProductPrice","hasVariant","hasAddons","hasImage","isClickable","notAvailableText","viewUtils.getImageSource","notAvailable","loading","addToOrder","preventDefault","stopPropagation","analyticsConstants.PRODUCT_ADD_ORDER","Plus","ProductsGridItem","defaultImage","isDashboard","onAddProduct","image580","image1024","ProductsGridItemContainer","Quantity","isDecreaseDisabled","onIncrease","onDecrease","quantityAction","isDisabled","Minus","quantityValue","ProductInOrder","isInPublicMenu","onModalClose","flex","Trash","tooltip","ShoppingBag","SUCCESS","ProductVariants","focusedSection","onSelectVariant","containerRef","isVariantsFocused","scrollIntoView","focused","variantsTitle","formattedTotalVariantPrice","productUtils.getProductVariantPrice","productUtils.getProductVariantTranslation","checked","RADIO","variantPrice","ProductAddons","onOptionSelect","addonUtils.getAddonTranslation","formattedTotalOptionPrice","addonUtils.getOptionPrice","optionTitle","addonUtils.getAddonOptionTranslation","isSingle","addonModels.MenuAddonSelectType","isRemove","CHECKBOX","optionPrice","ProductDetailsUI","actionTitle","productQuantityInOrderWithAllVariants","onClose","setSelectedVariant","adjustQuantity","onSubmit","modalRef","formattedTotalOrderPrice","productUtils.getProductOrderPrice","handleClickOutside","event","contains","hasVariants","Modal","noBodyPadding","details","choices","close","Close","footer","addAction","disabled","paddingBlock","ProductDetails","setQuantity","isUpdate","setIsUpdate","setFocusedSection","setSelectedAddons","productQuantityInOrder","orderHooks.useProductQuantityInOrder","orderHooks.useProductQuantityInOrderWithAllVariants","Math","max","prevForm","previousSelection","updatedSelection","Set","setTimeout","OrderStepper","actionText","isLoading","totalCount","orderHooks.useTotalOrderItemsCount","orderHooks.useOrderFormattedPriceDetails","count","Loading","FloatingOrdersButton","OrderDrawerFooter","isOrderItemsEmpty","orderError","isOrderEnabled","branchHooks.useOrderEnabled","availableCustomer","customerHooks.useAvailableCustomer","orderPayload","orderHooks.usePrepareOrder","setIsLoading","apiError","setAPIError","orderNote","hasOrderNote","showOrderNote","isServing","isSubmitDisabled","createOrder","orderServices.createOrder","errorCode","orderStepperAction","orderModels.OrderType","orderTrackingId","nextStepIndex","orderConstants.ORDER_STEPS","findIndex","nextStep","AlertBox","onClear","TextBanner","text","LIGHT","Edit","iconSize","PRIMARY","getActionText","ProductQuantity","min","productHooks.useProductQuantity","productHooks.useProductById","OrderItemOptionsInfo","_Fragment","productUtils.getProductAddon","selectedOptions","some","addonTitle","optionTitles","OrderListItem","orderUtils.getSelectedAddonsFromOrderItems","productUtils.getProductVariant","variantTitle","orderHooks.useOrderItemPrice","OrderNoItems","noItems","Description","OrderItemsList","itemId","OrderDrawerCart","NoAddressContent","AddressContent","firstLine","customerUtils.formatAddressLine","secondLine","CustomerAddress","TableShape","TableStatus","TableLocation","OrderTableUI","preDefinedTable","tableOptions","selectedTableId","disableIfPreDefined","hasPreDefinedTable","handleTableChange","table","tableInput","OrderTable","tables","tableHooks.usePreDefinedTable","tableHooks.useList","OrderMethods","orderTypes","onSelect","getOrderMethodTooltipPosition","index","orderMethods","methods","isVisible","push","position","flexWrap","createOrderMethod","MethodSelection","selectedMethod","OrderPaymentSummary","textSize","totalPriceWithoutTaxFormatted","totalPriceWithTaxFormatted","totalTaxFormatted","deliveryFeeFormatted","OrderDrawerDetails","orderHooks.useOrderPriceDetails","Grid","paymentMethods","CARD","Padding","paddingInline","Accordion","noPadding","headerPaddingInline","headerPaddingBlock","titleVariant","OrderDrawerCompleted","Check","Link","OrderDrawer","contentRef","orderErrorInDetails","deliveryDistanceError","deliveryAmountError","orderHooks.useOrderErrorInDetails","hasOrderErrorInDetails","hasLargeFooter","closeDrawer","Drawer","onBack","renderContent","Products","memo","productBlocksRef","onCategoryInView","selectedProduct","setSelectedProduct","view","setView","productModels.ProductView","LIST","views","List","GRID","handleSelectProduct","analyticsConstants.PRODUCT_DETAILS","observer","IntersectionObserver","viewportCenter","clientHeight","closestCategoryId","closestDistance","Infinity","entry","isIntersecting","rect","boundingClientRect","elementCenter","distanceToCenter","abs","getAttribute","threshold","categoryId","element","setAttribute","observe","disconnect","analyticsConstants.PRODUCT_VIEW_CHANGED","handleSelectView","categoryUtils.getCategoryTranslation","prevProps","nextProps","displayName","MenuContent","productHooks.useList","categories","categoryHooks.useList","productMap","menuUtils.prepareCategoryAndProductMap","setSelectedCategoryId","canUserScroll","productBlock","block","scrollToProductBlock","handleCategoryInView","categoryUtils.getCategoryNameById","analyticsConstants.CATEGORY_SCROLLED","handleCategoryFromURL","searchParams","URLSearchParams","search","categoryIdFromURL","get","categoryToSelect","MODALS_MAP","MODALS_ADD_UPDATE_NOTES","noteContent","setNoteContent","tCommon","header","TEXT_AREA","MODALS_AUTH","setFormErrors","currentStep","setCurrentStep","customerModels.CustomerAuthStep","PHONE","steps","OTP","completeAuth","goToNextStep","currentIndex","prev","inline","renderStep","isEmailStep","emailUnchanged","emailCleared","viewUtils.validatePhoneNumber","checkIsValidEmail","customerUtils.validateForm","status","customerServices.verifyOTP","saveAuthToken","customerServices.update","MODALS_ADD_UPDATE_ADDRESS","initialCountryCode","floor","instructions","postCode","initalForm","addressId","adressError","defaultAdressText","currentForm","closeModal","handleSelectGoogleSuggestion","suggestion","lat","long","customerUtils.validateAddressForm","AddressAutocomplete","origin","lng","placeHolder","inputLabel","TEXT","MODALS_BRANCH_BUSINESS_HOURS","BranchBusinessHoursUI","PublicMenu","branchHooks.useBranchId","showMenu","PublicMenuWithContext","ModalProvider","modalsMap","EventsToolbar","currentGoal","setGoal","closeDropdownRef","getGoalTitle","goal","DropDown","action","actionSize","closeRef","menu","toolbarMenu","analyticsConstants.GOALS","DropDownMenuItem","toolbar","BarChart","PlanType","SubscriptionStatus","PRICING","appetizer","mainCourse","chefsSpecial","lifeTime","ribbonText","PRICING_BENEFITS","APPETIZER","MAIN_COURSE","CHEFS_SPECIAL","LIFETIME","PricingPlanAmount","plan","interval","discountedPrice","subscriptionConstants.PRICING","intervalPrice","intervalPriceText","subscriptionModels.PlanType","originalPrice","Pricing","onPlanSelect","onIntervalSelect","selectedInterval","setSelectedInterval","plans","PlanParent","hasRibbon","commonProps","viewUtils.getRegisterUrl","intervals","handleSelectInterval","benefits","moneyBack","ShieldDollar","subscriptionConstants.PRICING_BENEFITS","benefit","OrderFAB","mountedRef","classList","remove","animate","add"],"mappings":"oyCAAO,MAAMA,GACM,mBADNA,GAEN,OAFMA,GAGQ,qBAHRA,GAIW,wBAIXC,GAAoB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MACnDC,GAAsB,CAClC,CACCC,KAAM,aACNC,KAAM,KACNC,UAAW,SAIAC,GAAY,gBAKZC,GAAmBD,GAEnBE,GAAU,CAACF,GANC,gBACA,gBACA,iBAMZG,GAAiB,+BCxBjBC,GAAU,IAAIC,EAAQ,qBAAsB,sBCOnDC,GAAwC,CAC7C,IAAQC,IACP,MAAMC,EAAuB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MAGxE,OAFgB,IAAIC,OAAO,KAAKD,EAAqBE,KAAK,gBAE7CC,KAAKJ,GASX,CAAEK,SAAS,GARV,CACNA,SAAS,EACTC,MAAO,uDAAuDL,EAAqBE,KAClF,UAQJ,GAAOH,GACU,UAEHI,KAAKJ,GAOX,CAAEK,SAAS,GANV,CACNA,SAAS,EACTC,MAAO,2C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Y,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,uBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,sBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,mBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,kBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,kBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,MACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,gBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,mBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,mBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAASW,gBAAgB,EAC1B,CAACX,GAASY,WAAW,GAEtB,CACClf,MAAO,sBACP,CAACse,GAASS,YAAY,EACtB,CAACT,GAASU,cAAc,EACxB,CAACV,GAAS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