@mercurjs/admin 2.3.2-canary.0 → 2.3.2-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/{add-campaign-promotions-S4HKMFU7.js → add-campaign-promotions-DAJLAYTG.js} +3 -3
  2. package/dist/{api-key-management-list-AHXOCLBO.js → api-key-management-list-P4FQQKIV.js} +1 -1
  3. package/dist/{attribute-list-6ELFWDHO.js → attribute-list-PVC4KUYQ.js} +1 -1
  4. package/dist/{campaign-detail-WPTZDDD5.js → campaign-detail-V6RISO2Y.js} +4 -4
  5. package/dist/{campaign-list-7L2DGBHW.js → campaign-list-WFFH3VPJ.js} +1 -1
  6. package/dist/{category-list-3IL2MERS.js → category-list-RBFOTJFJ.js} +1 -1
  7. package/dist/{chunk-CR7TRBEB.js → chunk-2YEBREEY.js} +2 -1
  8. package/dist/chunk-4F6SHS7A.js +83 -0
  9. package/dist/{chunk-EAZ6YM6D.js → chunk-5SDHNLEC.js} +2 -1
  10. package/dist/{chunk-NKZLCOFU.js → chunk-6DBL7KIL.js} +1 -1
  11. package/dist/{chunk-ZBRRK3Y6.js → chunk-AB34V74P.js} +3 -2
  12. package/dist/{chunk-6ZVRNI5K.js → chunk-AMKTWSOZ.js} +1 -1
  13. package/dist/{chunk-7PGZV6DQ.js → chunk-BNYVXSFC.js} +1 -1
  14. package/dist/{chunk-H7HNJFQA.js → chunk-CGT2IRFI.js} +1 -1
  15. package/dist/{chunk-N3ZYLAGA.js → chunk-GQ45JPQR.js} +3 -2
  16. package/dist/{chunk-VKVK5D2F.js → chunk-GVKW5SUK.js} +3 -2
  17. package/dist/{chunk-UGDC6FPU.js → chunk-JIVTFB67.js} +2 -1
  18. package/dist/{chunk-23KZGNNG.js → chunk-KHMHTJZG.js} +2 -1
  19. package/dist/{chunk-NN6PSWE4.js → chunk-MUSHUJHY.js} +56 -1
  20. package/dist/{chunk-LAIT7Y53.js → chunk-NO64DRH4.js} +25 -7
  21. package/dist/{chunk-AJNXQUOR.js → chunk-O56RWFFI.js} +3 -2
  22. package/dist/{chunk-OJQSOFYG.js → chunk-PC5GU4HP.js} +2 -1
  23. package/dist/{chunk-6XJUYY6G.js → chunk-R3E7BMQB.js} +1 -1
  24. package/dist/{chunk-IP5YNQ5R.js → chunk-RQCYGC2H.js} +3 -2
  25. package/dist/{chunk-EF23N7II.js → chunk-S4W3RVQV.js} +3 -2
  26. package/dist/{chunk-HBNQ3R3P.js → chunk-T36KFL5R.js} +2 -1
  27. package/dist/{chunk-CMBHUF6P.js → chunk-T3KB4DCM.js} +4 -1
  28. package/dist/{chunk-N5IUYCUZ.js → chunk-UYQY4B7J.js} +4 -2
  29. package/dist/{chunk-LIMG2EY2.js → chunk-VB4A2G7A.js} +3 -2
  30. package/dist/{chunk-PB24YMA4.js → chunk-VYD6M7TF.js} +2 -1
  31. package/dist/{chunk-73N66XQD.js → chunk-WCA5Z4MT.js} +2 -1
  32. package/dist/{chunk-43SWJ765.js → chunk-XBEI6JKV.js} +2 -1
  33. package/dist/{chunk-7ZY7R6PG.js → chunk-XVBLVV7Y.js} +1 -1
  34. package/dist/{chunk-HFMAEJN2.js → chunk-Y5T5NATQ.js} +2 -1
  35. package/dist/{chunk-WYRUCSGW.js → chunk-YS6DRI7V.js} +2 -1
  36. package/dist/{collection-list-LM5SH67K.js → collection-list-C2EQXJTN.js} +2 -2
  37. package/dist/{commissions-list-X54FEOEZ.js → commissions-list-VBQOQF2D.js} +1 -1
  38. package/dist/{customer-group-list-KBZBSGTQ.js → customer-group-list-NZ3D2ZAR.js} +1 -1
  39. package/dist/{customer-list-IJJEZDOZ.js → customer-list-DFONJE23.js} +1 -1
  40. package/dist/index.css +3 -0
  41. package/dist/index.d.ts +2 -0
  42. package/dist/index.js +1529 -1296
  43. package/dist/{order-edit-billing-address-2BSCXUTK.js → order-edit-billing-address-ZT7HAEXB.js} +1 -1
  44. package/dist/{order-list-GQ5IOA6I.js → order-list-WGQC2X2L.js} +1 -1
  45. package/dist/pages/index.d.ts +22 -22
  46. package/dist/pages/index.js +28 -28
  47. package/dist/{price-list-list-JC5EDBH6.js → price-list-list-UEEYIP5R.js} +1 -1
  48. package/dist/{product-create-A7774JYE.js → product-create-LBKJTFOY.js} +3 -3
  49. package/dist/{product-list-2FOZLWYH.js → product-list-YHJ7DW6D.js} +1 -1
  50. package/dist/{product-media-ROKDXANO.js → product-media-NEAAG6IC.js} +2 -2
  51. package/dist/{product-organization-XS62HARL.js → product-organization-SVOLE5TG.js} +1 -1
  52. package/dist/{product-tag-detail-7P7MI52E.js → product-tag-detail-2YR6TXZI.js} +1 -1
  53. package/dist/{product-tag-list-43NFD36I.js → product-tag-list-GDIVZYEB.js} +2 -2
  54. package/dist/{product-type-list-NNNFCCWS.js → product-type-list-VSCQHI3D.js} +1 -1
  55. package/dist/{promotion-detail-4WNHEOG4.js → promotion-detail-HVQKXMJL.js} +3 -3
  56. package/dist/{promotion-list-AJ5NBDZ2.js → promotion-list-KB2E4AEZ.js} +4 -4
  57. package/dist/{refund-reason-list-R573DHM7.js → refund-reason-list-ODOF3ZLM.js} +1 -1
  58. package/dist/{reservation-list-CRPRHIMT.js → reservation-list-APKRLKOF.js} +1 -1
  59. package/dist/{reset-password-7G75C4RO.js → reset-password-BIAORJOF.js} +1 -1
  60. package/dist/{return-reason-list-A2RABTGP.js → return-reason-list-IQ2JGNEN.js} +2 -2
  61. package/dist/{shipping-option-type-list-R4JPQOAA.js → shipping-option-type-list-VQ5UVOUU.js} +1 -1
  62. package/dist/{shipping-profiles-list-UKD47NUF.js → shipping-profiles-list-AK6KXUGF.js} +1 -1
  63. package/dist/{store-details-GOVF3KFW.js → store-details-KI5D4VSI.js} +1 -1
  64. package/dist/{store-edit-W6NHNE3S.js → store-edit-LXGZTR3G.js} +2 -2
  65. package/dist/{store-list-OKKZA7VO.js → store-list-XXRF6JAZ.js} +2 -2
  66. package/dist/{tax-region-create-P4IKQNTU.js → tax-region-create-SFRD4AJB.js} +1 -1
  67. package/dist/{tax-region-list-JC4QYF5B.js → tax-region-list-TM23Q4HH.js} +1 -1
  68. package/dist/{tax-region-tax-override-create-7O3KDBUJ.js → tax-region-tax-override-create-XZ5BU2FP.js} +1 -1
  69. package/dist/{tax-region-tax-override-edit-SUL5VZ5D.js → tax-region-tax-override-edit-R4EGIUIZ.js} +1 -1
  70. package/dist/{user-invite-WG57KWD3.js → user-invite-A7TBRKWI.js} +127 -27
  71. package/dist/{user-list-P7JCBIOR.js → user-list-ECF647TZ.js} +1 -1
  72. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -3,6 +3,11 @@ import {
3
3
  taxRegionLoader
4
4
  } from "./chunk-ASFCRSBA.js";
5
5
  import "./chunk-QR3GYYX6.js";
6
+ import {
7
+ FeatureFlagProvider,
8
+ useFeatureFlag,
9
+ useMePermissions
10
+ } from "./chunk-4F6SHS7A.js";
6
11
  import {
7
12
  isClientError
8
13
  } from "./chunk-C6SUTRP2.js";
@@ -24,7 +29,7 @@ import {
24
29
  } from "./chunk-KDE4HKH2.js";
25
30
  import {
26
31
  I18n
27
- } from "./chunk-NN6PSWE4.js";
32
+ } from "./chunk-MUSHUJHY.js";
28
33
  import {
29
34
  SwitchBox
30
35
  } from "./chunk-2EME4AWX.js";
@@ -1528,18 +1533,41 @@ import { Outlet as Outlet4 } from "react-router-dom";
1528
1533
 
1529
1534
  // src/components/authentication/protected-route/protected-route.tsx
1530
1535
  import { Spinner as Spinner2 } from "@medusajs/icons";
1536
+ import { useMemo as useMemo4 } from "react";
1531
1537
  import { Navigate, Outlet, useLocation as useLocation3 } from "react-router-dom";
1538
+ import { PermissionsProvider } from "@mercurjs/dashboard-shared";
1532
1539
  import { jsx as jsx6 } from "react/jsx-runtime";
1533
1540
  var ProtectedRoute = () => {
1534
- const { user, isLoading } = useMe();
1535
1541
  const location = useLocation3();
1536
- if (isLoading) {
1542
+ const isRbacEnabled = useFeatureFlag("rbac");
1543
+ const { user, isLoading: isLoadingUser } = useMe();
1544
+ const { data: permissionsResponse, isLoading: isLoadingPermissions } = useMePermissions({
1545
+ // Don't fetch permissions until we know the user is authenticated.
1546
+ enabled: !!user && isRbacEnabled
1547
+ });
1548
+ const policy = useMemo4(() => {
1549
+ if (!permissionsResponse) {
1550
+ return null;
1551
+ }
1552
+ return {
1553
+ permissions: permissionsResponse.permissions
1554
+ };
1555
+ }, [permissionsResponse]);
1556
+ if (isLoadingUser) {
1537
1557
  return /* @__PURE__ */ jsx6("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsx6(Spinner2, { className: "text-ui-fg-interactive animate-spin" }) });
1538
1558
  }
1539
1559
  if (!user) {
1540
1560
  return /* @__PURE__ */ jsx6(Navigate, { to: "/login", state: { from: location }, replace: true });
1541
1561
  }
1542
- return /* @__PURE__ */ jsx6(SidebarProvider, { children: /* @__PURE__ */ jsx6(SearchProvider, { children: /* @__PURE__ */ jsx6(Outlet, {}) }) });
1562
+ return /* @__PURE__ */ jsx6(
1563
+ PermissionsProvider,
1564
+ {
1565
+ policy,
1566
+ isLoading: isLoadingPermissions,
1567
+ isRbacEnabled,
1568
+ children: /* @__PURE__ */ jsx6(SidebarProvider, { children: /* @__PURE__ */ jsx6(SearchProvider, { children: /* @__PURE__ */ jsx6(Outlet, {}) }) })
1569
+ }
1570
+ );
1543
1571
  };
1544
1572
 
1545
1573
  // src/components/layout/main-layout/main-layout.tsx
@@ -1558,6 +1586,7 @@ import {
1558
1586
  Users
1559
1587
  } from "@medusajs/icons";
1560
1588
  import { Avatar as Avatar2, Divider, DropdownMenu as DropdownMenu3, Text as Text7, clx as clx6 } from "@medusajs/ui";
1589
+ import { useMemo as useMemo5 } from "react";
1561
1590
  import { useTranslation as useTranslation9 } from "react-i18next";
1562
1591
  import { Link as Link3, useLocation as useLocation7, useNavigate as useNavigate4 } from "react-router-dom";
1563
1592
 
@@ -2681,7 +2710,8 @@ var UserItem = () => {
2681
2710
  import menuItemsModule from "virtual:mercur/menu-items";
2682
2711
  import {
2683
2712
  applyNavOverrides,
2684
- useExtension
2713
+ useExtension,
2714
+ usePermissions
2685
2715
  } from "@mercurjs/dashboard-shared";
2686
2716
 
2687
2717
  // src/components/utilities/error-boundary/error-boundary.tsx
@@ -2795,9 +2825,6 @@ var addRoute = (pathSegments, Component, currentLevel, loader, handle, parallelR
2795
2825
  const isComponentSegment = currentFullPath === componentPath;
2796
2826
  if (isComponentSegment || remainingSegments.length === 0) {
2797
2827
  route.children || (route.children = []);
2798
- if (handle) {
2799
- route.handle = handle;
2800
- }
2801
2828
  if (loader) {
2802
2829
  route.loader = loader;
2803
2830
  }
@@ -2806,7 +2833,7 @@ var addRoute = (pathSegments, Component, currentLevel, loader, handle, parallelR
2806
2833
  leaf.children = processParallelRoutes(parallelRoutes, currentFullPath);
2807
2834
  Object.assign(route, leaf);
2808
2835
  } else {
2809
- const leaf = createLeafRoute(Component, loader);
2836
+ const leaf = createLeafRoute(Component, loader, handle);
2810
2837
  leaf.children = processParallelRoutes(parallelRoutes, currentFullPath);
2811
2838
  route.children.push(leaf);
2812
2839
  }
@@ -2876,10 +2903,54 @@ var getMenuItemsByType = (menuItems, type) => {
2876
2903
  return !settingsRouteRegex.test(item.path);
2877
2904
  });
2878
2905
  };
2906
+ var filterMenuItemsByPermissions = (menuItems, { hasAnyPermission, hasAllPermissions }) => {
2907
+ return menuItems.filter((item) => {
2908
+ if (!item.permissions?.length) {
2909
+ return true;
2910
+ }
2911
+ return item.requireAll ? hasAllPermissions(item.permissions) : hasAnyPermission(item.permissions);
2912
+ });
2913
+ };
2879
2914
  var getNestedMenuItems = (menuItems, parentPath) => {
2880
2915
  return menuItems.filter((item) => item.nested === parentPath).sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0));
2881
2916
  };
2882
2917
 
2918
+ // src/lib/permissions/route-permissions.ts
2919
+ var ROUTE_PERMISSIONS = {
2920
+ "/orders": "order:read",
2921
+ "/products": "product:read",
2922
+ "/offers": "offer:read",
2923
+ "/collections": "product_collection:read",
2924
+ "/categories": "product_category:read",
2925
+ "/inventory": "inventory_item:read",
2926
+ "/reservations": "reservation_item:read",
2927
+ "/customers": "customer:read",
2928
+ "/customer-groups": "customer_group:read",
2929
+ "/promotions": "promotion:read",
2930
+ "/campaigns": "campaign:read",
2931
+ "/price-lists": "price_list:read",
2932
+ "/stores": "seller:read",
2933
+ "/reviews": "review:read",
2934
+ "/payouts": "payout:read",
2935
+ "/settings/regions": "region:read",
2936
+ "/settings/marketplace": "store:read",
2937
+ "/settings/commissions": "commission_rate:read",
2938
+ "/settings/users": "user:read",
2939
+ "/settings/sales-channels": "sales_channel:read",
2940
+ "/settings/locations": "stock_location:read",
2941
+ "/settings/product-tags": "product_tag:read",
2942
+ "/settings/product-types": "product_type:read",
2943
+ "/settings/attributes": "product_attribute:read",
2944
+ "/settings/shipping-profiles": "shipping_profile:read",
2945
+ "/settings/shipping-option-types": "shipping_option_type:read",
2946
+ "/settings/return-reasons": "return_reason:read",
2947
+ "/settings/refund-reasons": "refund_reason:read",
2948
+ "/settings/tax-regions": "tax_region:read",
2949
+ "/settings/publishable-api-keys": "api_key:read",
2950
+ "/settings/secret-api-keys": "api_key:read"
2951
+ };
2952
+ var getRoutePermission = (path) => ROUTE_PERMISSIONS[path];
2953
+
2883
2954
  // src/components/layout/main-layout/main-layout.tsx
2884
2955
  import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
2885
2956
  var navId = (to) => to.replace(/^\//, "");
@@ -2898,8 +2969,8 @@ var MainLayout = () => {
2898
2969
  return /* @__PURE__ */ jsx14(Shell, { children: /* @__PURE__ */ jsx14(MainSidebar, {}) });
2899
2970
  };
2900
2971
  var allMenuItems = menuItemsModule.menuItems ?? [];
2901
- var addNestedItems = (to, items) => {
2902
- const nestedItems = getNestedMenuItems(allMenuItems, to);
2972
+ var addNestedItems = (to, menuItems, items) => {
2973
+ const nestedItems = getNestedMenuItems(menuItems, to);
2903
2974
  if (nestedItems.length === 0) {
2904
2975
  return items;
2905
2976
  }
@@ -2913,20 +2984,34 @@ var addNestedItems = (to, items) => {
2913
2984
  var MainSidebar = () => {
2914
2985
  const coreRoutes = useCoreRoutes();
2915
2986
  const navOverrides = useExtension().getNavOverrides();
2916
- const customMenuItems = getMenuItemsByType(allMenuItems, "main");
2987
+ const { hasAnyPermission, hasAllPermissions, hasPermission } = usePermissions();
2988
+ const canReach = ({ to }) => {
2989
+ const permission = getRoutePermission(to);
2990
+ return !permission || hasPermission(permission);
2991
+ };
2992
+ const visibleMenuItems = useMemo5(
2993
+ () => filterMenuItemsByPermissions(allMenuItems, {
2994
+ hasAnyPermission,
2995
+ hasAllPermissions
2996
+ }),
2997
+ [hasAnyPermission, hasAllPermissions]
2998
+ );
2999
+ const customMenuItems = getMenuItemsByType(visibleMenuItems, "main");
2917
3000
  const routesWithNested = applyNavOverrides(
2918
3001
  coreRoutes.map(toCoreNavItem),
2919
3002
  navOverrides
2920
- ).map((route) => ({
3003
+ ).filter(canReach).map((route) => ({
2921
3004
  ...route,
2922
- items: addNestedItems(route.to, route.items)
3005
+ items: addNestedItems(route.to, visibleMenuItems, route.items)?.filter(
3006
+ canReach
3007
+ )
2923
3008
  }));
2924
3009
  const customRoutesWithNested = customMenuItems.sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0)).map((item) => ({
2925
3010
  label: item.label,
2926
3011
  to: item.path,
2927
3012
  icon: item.icon ? /* @__PURE__ */ jsx14(item.icon, {}) : void 0,
2928
3013
  translationNs: item.translationNs,
2929
- items: addNestedItems(item.path)
3014
+ items: addNestedItems(item.path, visibleMenuItems)
2930
3015
  }));
2931
3016
  return /* @__PURE__ */ jsx14(
2932
3017
  "aside",
@@ -3269,27 +3354,40 @@ var PublicLayout = () => {
3269
3354
  };
3270
3355
 
3271
3356
  // src/components/layout/settings-layout/settings-layout.tsx
3272
- import { useEffect as useEffect10, useMemo as useMemo4, useState as useState12 } from "react";
3357
+ import { useEffect as useEffect10, useMemo as useMemo6, useState as useState12 } from "react";
3273
3358
  import { ArrowUturnLeft as ArrowUturnLeft2, MinusMini } from "@medusajs/icons";
3274
3359
  import { Divider as Divider2, IconButton as IconButton6, Text as Text8, clx as clx7 } from "@medusajs/ui";
3275
3360
  import { Collapsible as RadixCollapsible2 } from "radix-ui";
3276
3361
  import { useTranslation as useTranslation10 } from "react-i18next";
3277
3362
  import { Link as Link4, useLocation as useLocation8 } from "react-router-dom";
3278
3363
  import menuItemsModule2 from "virtual:mercur/menu-items";
3364
+ import { usePermissions as usePermissions2 } from "@mercurjs/dashboard-shared";
3279
3365
  import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
3280
3366
  var SettingsLayout = () => {
3281
3367
  return /* @__PURE__ */ jsx16(Shell, { children: /* @__PURE__ */ jsx16(SettingsSidebar, {}) });
3282
3368
  };
3283
3369
  var allMenuItems2 = menuItemsModule2.menuItems ?? [];
3284
- var customSettingsItems = getMenuItemsByType(allMenuItems2, "settings");
3285
- var extensionNavItems = customSettingsItems.sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0)).map((item) => ({
3286
- label: item.label,
3287
- to: item.path,
3288
- translationNs: item.translationNs
3289
- }));
3370
+ var useExtensionNavItems = () => {
3371
+ const { hasAnyPermission, hasAllPermissions } = usePermissions2();
3372
+ return useMemo6(
3373
+ () => getMenuItemsByType(
3374
+ filterMenuItemsByPermissions(allMenuItems2, {
3375
+ hasAnyPermission,
3376
+ hasAllPermissions
3377
+ }),
3378
+ "settings"
3379
+ ).sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0)).map((item) => ({
3380
+ label: item.label,
3381
+ to: item.path,
3382
+ translationNs: item.translationNs
3383
+ })),
3384
+ [hasAnyPermission, hasAllPermissions]
3385
+ );
3386
+ };
3290
3387
  var useSettingRoutes = () => {
3291
3388
  const { t: t2 } = useTranslation10();
3292
- return useMemo4(
3389
+ const extensionNavItems = useExtensionNavItems();
3390
+ return useMemo6(
3293
3391
  () => [
3294
3392
  {
3295
3393
  label: t2("marketplace.domain"),
@@ -3341,12 +3439,12 @@ var useSettingRoutes = () => {
3341
3439
  },
3342
3440
  ...extensionNavItems
3343
3441
  ],
3344
- [t2]
3442
+ [t2, extensionNavItems]
3345
3443
  );
3346
3444
  };
3347
3445
  var useDeveloperRoutes = () => {
3348
3446
  const { t: t2 } = useTranslation10();
3349
- return useMemo4(
3447
+ return useMemo6(
3350
3448
  () => [
3351
3449
  {
3352
3450
  label: t2("apiKeyManagement.domain.publishable"),
@@ -3362,7 +3460,7 @@ var useDeveloperRoutes = () => {
3362
3460
  };
3363
3461
  var useMyAccountRoutes = () => {
3364
3462
  const { t: t2 } = useTranslation10();
3365
- return useMemo4(
3463
+ return useMemo6(
3366
3464
  () => [
3367
3465
  {
3368
3466
  label: t2("profile.domain"),
@@ -3379,8 +3477,13 @@ var getSafeFromValue = (from) => {
3379
3477
  return from;
3380
3478
  };
3381
3479
  var SettingsSidebar = () => {
3382
- const routes = useSettingRoutes();
3383
- const developerRoutes = useDeveloperRoutes();
3480
+ const { hasPermission } = usePermissions2();
3481
+ const canReach = ({ to }) => {
3482
+ const permission = getRoutePermission(to);
3483
+ return !permission || hasPermission(permission);
3484
+ };
3485
+ const routes = useSettingRoutes().filter(canReach);
3486
+ const developerRoutes = useDeveloperRoutes().filter(canReach);
3384
3487
  const myAccountRoutes = useMyAccountRoutes();
3385
3488
  const { t: t2 } = useTranslation10();
3386
3489
  return /* @__PURE__ */ jsxs10("aside", { className: "relative flex flex-1 flex-col justify-between overflow-y-auto", children: [
@@ -3464,6 +3567,7 @@ var UserSection2 = () => {
3464
3567
  };
3465
3568
 
3466
3569
  // src/get-route-map.tsx
3570
+ import { RoutePermissionGuard } from "@mercurjs/dashboard-shared";
3467
3571
  import { jsx as jsx17 } from "react/jsx-runtime";
3468
3572
  function mergeRoutes(baseRoutes, customRoutes2) {
3469
3573
  const result = baseRoutes.map((route) => ({ ...route }));
@@ -3474,10 +3578,15 @@ function mergeRoutes(baseRoutes, customRoutes2) {
3474
3578
  );
3475
3579
  if (existingIndex !== -1) {
3476
3580
  const { children: customChildren, ...customRest } = customRoute;
3581
+ const baseHandle = result[existingIndex].handle;
3582
+ const customHandle = customRest.handle;
3477
3583
  result[existingIndex] = {
3478
3584
  ...result[existingIndex],
3479
3585
  ...customRest,
3480
3586
  path: result[existingIndex].path,
3587
+ // Merge rather than replace, so a custom route declaring only
3588
+ // `permissions` doesn't drop the base route's `breadcrumb`.
3589
+ handle: baseHandle || customHandle ? { ...baseHandle, ...customHandle } : void 0,
3481
3590
  children: customChildren ? mergeRoutes(result[existingIndex].children ?? [], customChildren) : result[existingIndex].children
3482
3591
  };
3483
3592
  } else {
@@ -3498,106 +3607,47 @@ function getRouteMap({
3498
3607
  children: [
3499
3608
  {
3500
3609
  element: /* @__PURE__ */ jsx17(MainLayout, {}),
3501
- children: mergeRoutes(
3502
- [
3503
- {
3504
- path: "/",
3505
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3506
- lazy: () => import("./home-I3OILW5Z.js")
3507
- },
3508
- {
3509
- path: "/products",
3510
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3511
- handle: {
3512
- breadcrumb: () => t("products.domain")
3513
- },
3514
- children: [
3610
+ children: [
3611
+ {
3612
+ // Pathless wrapper so every route below — including extension
3613
+ // routes merged in from virtual:mercur/routes — is enforced
3614
+ // without each one wiring its own guard element.
3615
+ element: /* @__PURE__ */ jsx17(RoutePermissionGuard, {}),
3616
+ children: mergeRoutes(
3617
+ [
3515
3618
  {
3516
- path: "",
3517
- lazy: () => import("./product-list-2FOZLWYH.js"),
3518
- children: [
3519
- {
3520
- path: "create",
3521
- lazy: () => import("./product-create-A7774JYE.js")
3522
- },
3523
- {
3524
- path: "bulk-edit",
3525
- lazy: () => import("./product-bulk-edit-AVQWRUJ4.js")
3526
- }
3527
- ]
3619
+ path: "/",
3620
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3621
+ lazy: () => import("./home-I3OILW5Z.js")
3528
3622
  },
3529
3623
  {
3530
- path: ":id",
3624
+ path: "/products",
3531
3625
  errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3532
- lazy: async () => {
3533
- const { Breadcrumb, loader } = await import("./product-detail-3WEWR76I.js");
3534
- return {
3535
- Component: Outlet4,
3536
- loader,
3537
- handle: {
3538
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3539
- }
3540
- };
3626
+ handle: {
3627
+ breadcrumb: () => t("products.domain"),
3628
+ permissions: "product:read"
3541
3629
  },
3542
3630
  children: [
3543
3631
  {
3544
3632
  path: "",
3545
- lazy: () => import("./product-detail-3WEWR76I.js"),
3633
+ lazy: () => import("./product-list-YHJ7DW6D.js"),
3546
3634
  children: [
3547
3635
  {
3548
- path: "edit",
3549
- lazy: () => import("./product-edit-2CMVTDWT.js")
3550
- },
3551
- {
3552
- path: "edit-variant",
3553
- lazy: () => import("./product-variant-edit-MI72DRYG.js")
3554
- },
3555
- {
3556
- path: "sales-channels",
3557
- lazy: () => import("./product-sales-channels-OGWCSG2W.js")
3558
- },
3559
- {
3560
- path: "attributes",
3561
- lazy: () => import("./product-attributes-PCOM3JRX.js")
3562
- },
3563
- {
3564
- path: "attributes/create",
3565
- lazy: () => import("./product-create-attribute-FC26KQN4.js")
3566
- },
3567
- {
3568
- path: "attributes/add",
3569
- lazy: () => import("./product-add-existing-attributes-ASJTRVI4.js")
3570
- },
3571
- {
3572
- path: "attributes/:attribute_id/edit",
3573
- lazy: () => import("./product-edit-attribute-W3AS47FM.js")
3574
- },
3575
- {
3576
- path: "organization",
3577
- lazy: () => import("./product-organization-XS62HARL.js")
3578
- },
3579
- {
3580
- path: "shipping-profile",
3581
- lazy: () => import("./product-shipping-profile-SWB5FK7S.js")
3582
- },
3583
- {
3584
- path: "media",
3585
- lazy: () => import("./product-media-ROKDXANO.js")
3586
- },
3587
- {
3588
- path: "variants/create",
3589
- lazy: () => import("./product-create-variant-FQL5KYM6.js")
3636
+ path: "create",
3637
+ handle: { permissions: "product:create" },
3638
+ lazy: () => import("./product-create-LBKJTFOY.js")
3590
3639
  },
3591
3640
  {
3592
- path: "metadata/edit",
3593
- lazy: () => import("./product-metadata-5CRGB7TR.js")
3641
+ path: "bulk-edit",
3642
+ lazy: () => import("./product-bulk-edit-AVQWRUJ4.js")
3594
3643
  }
3595
3644
  ]
3596
3645
  },
3597
3646
  {
3598
- path: "variants/:variant_id",
3647
+ path: ":id",
3648
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3599
3649
  lazy: async () => {
3600
- const { Breadcrumb, loader } = await import("./product-variant-detail-XHMS2UT5.js");
3650
+ const { Breadcrumb, loader } = await import("./product-detail-3WEWR76I.js");
3601
3651
  return {
3602
3652
  Component: Outlet4,
3603
3653
  loader,
@@ -3609,737 +3659,817 @@ function getRouteMap({
3609
3659
  children: [
3610
3660
  {
3611
3661
  path: "",
3612
- lazy: () => import("./product-variant-detail-XHMS2UT5.js"),
3662
+ lazy: () => import("./product-detail-3WEWR76I.js"),
3613
3663
  children: [
3614
3664
  {
3615
3665
  path: "edit",
3666
+ handle: { permissions: "product:update" },
3667
+ lazy: () => import("./product-edit-2CMVTDWT.js")
3668
+ },
3669
+ {
3670
+ path: "edit-variant",
3616
3671
  lazy: () => import("./product-variant-edit-MI72DRYG.js")
3617
3672
  },
3673
+ {
3674
+ path: "sales-channels",
3675
+ lazy: () => import("./product-sales-channels-OGWCSG2W.js")
3676
+ },
3677
+ {
3678
+ path: "attributes",
3679
+ lazy: () => import("./product-attributes-PCOM3JRX.js")
3680
+ },
3681
+ {
3682
+ path: "attributes/create",
3683
+ lazy: () => import("./product-create-attribute-FC26KQN4.js")
3684
+ },
3685
+ {
3686
+ path: "attributes/add",
3687
+ lazy: () => import("./product-add-existing-attributes-ASJTRVI4.js")
3688
+ },
3689
+ {
3690
+ path: "attributes/:attribute_id/edit",
3691
+ lazy: () => import("./product-edit-attribute-W3AS47FM.js")
3692
+ },
3693
+ {
3694
+ path: "organization",
3695
+ lazy: () => import("./product-organization-SVOLE5TG.js")
3696
+ },
3697
+ {
3698
+ path: "shipping-profile",
3699
+ lazy: () => import("./product-shipping-profile-SWB5FK7S.js")
3700
+ },
3701
+ {
3702
+ path: "media",
3703
+ lazy: () => import("./product-media-NEAAG6IC.js")
3704
+ },
3705
+ {
3706
+ path: "variants/create",
3707
+ lazy: () => import("./product-create-variant-FQL5KYM6.js")
3708
+ },
3618
3709
  {
3619
3710
  path: "metadata/edit",
3620
- lazy: () => import("./product-variant-metadata-ETVJBXSW.js")
3711
+ lazy: () => import("./product-metadata-5CRGB7TR.js")
3712
+ }
3713
+ ]
3714
+ },
3715
+ {
3716
+ path: "variants/:variant_id",
3717
+ lazy: async () => {
3718
+ const { Breadcrumb, loader } = await import("./product-variant-detail-XHMS2UT5.js");
3719
+ return {
3720
+ Component: Outlet4,
3721
+ loader,
3722
+ handle: {
3723
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3724
+ }
3725
+ };
3726
+ },
3727
+ children: [
3728
+ {
3729
+ path: "",
3730
+ lazy: () => import("./product-variant-detail-XHMS2UT5.js"),
3731
+ children: [
3732
+ {
3733
+ path: "edit",
3734
+ handle: { permissions: "product:update" },
3735
+ lazy: () => import("./product-variant-edit-MI72DRYG.js")
3736
+ },
3737
+ {
3738
+ path: "metadata/edit",
3739
+ lazy: () => import("./product-variant-metadata-ETVJBXSW.js")
3740
+ }
3741
+ ]
3621
3742
  }
3622
3743
  ]
3623
3744
  }
3624
3745
  ]
3625
3746
  }
3626
3747
  ]
3627
- }
3628
- ]
3629
- },
3630
- {
3631
- path: "/categories",
3632
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3633
- handle: {
3634
- breadcrumb: () => t("categories.domain")
3635
- },
3636
- children: [
3637
- {
3638
- path: "",
3639
- lazy: () => import("./category-list-3IL2MERS.js"),
3640
- children: [
3641
- {
3642
- path: "create",
3643
- lazy: () => import("./category-create-7RFRKVKF.js")
3644
- },
3645
- {
3646
- path: "organize",
3647
- lazy: () => import("./category-organize-KQ7UWVAJ.js")
3648
- }
3649
- ]
3650
3748
  },
3651
3749
  {
3652
- path: ":id",
3653
- lazy: async () => {
3654
- const { Breadcrumb, loader } = await import("./category-detail-HAGGQS7A.js");
3655
- return {
3656
- Component: Outlet4,
3657
- loader,
3658
- handle: {
3659
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3660
- }
3661
- };
3750
+ path: "/categories",
3751
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3752
+ handle: {
3753
+ breadcrumb: () => t("categories.domain"),
3754
+ permissions: "product_category:read"
3662
3755
  },
3663
3756
  children: [
3664
3757
  {
3665
3758
  path: "",
3666
- lazy: () => import("./category-detail-HAGGQS7A.js"),
3759
+ lazy: () => import("./category-list-RBFOTJFJ.js"),
3667
3760
  children: [
3668
3761
  {
3669
- path: "edit",
3670
- lazy: () => import("./category-edit-3KXRPXXJ.js")
3671
- },
3672
- {
3673
- path: "media",
3674
- lazy: () => import("./category-media-IOA2VNMI.js")
3675
- },
3676
- {
3677
- path: "icon/edit",
3678
- lazy: () => import("./category-icon-edit-KUCL7KEJ.js")
3679
- },
3680
- {
3681
- path: "products",
3682
- lazy: () => import("./category-products-SMV4WSYZ.js")
3762
+ path: "create",
3763
+ handle: { permissions: "product_category:create" },
3764
+ lazy: () => import("./category-create-7RFRKVKF.js")
3683
3765
  },
3684
3766
  {
3685
3767
  path: "organize",
3686
3768
  lazy: () => import("./category-organize-KQ7UWVAJ.js")
3687
- },
3769
+ }
3770
+ ]
3771
+ },
3772
+ {
3773
+ path: ":id",
3774
+ lazy: async () => {
3775
+ const { Breadcrumb, loader } = await import("./category-detail-HAGGQS7A.js");
3776
+ return {
3777
+ Component: Outlet4,
3778
+ loader,
3779
+ handle: {
3780
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3781
+ }
3782
+ };
3783
+ },
3784
+ children: [
3688
3785
  {
3689
- path: "metadata/edit",
3690
- lazy: () => import("./categories-metadata-MJAYSCTW.js")
3786
+ path: "",
3787
+ lazy: () => import("./category-detail-HAGGQS7A.js"),
3788
+ children: [
3789
+ {
3790
+ path: "edit",
3791
+ handle: { permissions: "product_category:update" },
3792
+ lazy: () => import("./category-edit-3KXRPXXJ.js")
3793
+ },
3794
+ {
3795
+ path: "media",
3796
+ lazy: () => import("./category-media-IOA2VNMI.js")
3797
+ },
3798
+ {
3799
+ path: "icon/edit",
3800
+ lazy: () => import("./category-icon-edit-KUCL7KEJ.js")
3801
+ },
3802
+ {
3803
+ path: "products",
3804
+ lazy: () => import("./category-products-SMV4WSYZ.js")
3805
+ },
3806
+ {
3807
+ path: "organize",
3808
+ lazy: () => import("./category-organize-KQ7UWVAJ.js")
3809
+ },
3810
+ {
3811
+ path: "metadata/edit",
3812
+ lazy: () => import("./categories-metadata-MJAYSCTW.js")
3813
+ }
3814
+ ]
3691
3815
  }
3692
3816
  ]
3693
3817
  }
3694
3818
  ]
3695
- }
3696
- ]
3697
- },
3698
- {
3699
- path: "/orders",
3700
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3701
- handle: {
3702
- breadcrumb: () => t("orders.domain")
3703
- },
3704
- children: [
3705
- {
3706
- path: "",
3707
- lazy: () => import("./order-list-GQ5IOA6I.js")
3708
3819
  },
3709
3820
  {
3710
- path: ":id",
3711
- lazy: async () => {
3712
- const { Breadcrumb, loader } = await import("./order-detail-QU4GQRJI.js");
3713
- return {
3714
- Component: Outlet4,
3715
- loader,
3716
- handle: {
3717
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3718
- }
3719
- };
3821
+ path: "/orders",
3822
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3823
+ handle: {
3824
+ breadcrumb: () => t("orders.domain"),
3825
+ permissions: "order:read"
3720
3826
  },
3721
3827
  children: [
3722
3828
  {
3723
3829
  path: "",
3724
- lazy: () => import("./order-detail-QU4GQRJI.js"),
3830
+ lazy: () => import("./order-list-WGQC2X2L.js")
3831
+ },
3832
+ {
3833
+ path: ":id",
3834
+ lazy: async () => {
3835
+ const { Breadcrumb, loader } = await import("./order-detail-QU4GQRJI.js");
3836
+ return {
3837
+ Component: Outlet4,
3838
+ loader,
3839
+ handle: {
3840
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3841
+ }
3842
+ };
3843
+ },
3725
3844
  children: [
3726
3845
  {
3727
- path: "returns",
3728
- lazy: () => import("./order-create-return-NW7E2KL3.js")
3729
- },
3730
- {
3731
- path: "claims",
3732
- lazy: () => import("./order-create-claim-SCUH6IYB.js")
3733
- },
3734
- {
3735
- path: "exchanges",
3736
- lazy: () => import("./order-create-exchange-ONVRQAYR.js")
3737
- },
3738
- {
3739
- path: "edits",
3740
- lazy: () => import("./order-create-edit-52VT7JLO.js")
3741
- },
3742
- {
3743
- path: "refund",
3744
- lazy: () => import("./order-create-refund-FJLL4CUD.js")
3745
- },
3746
- {
3747
- path: "transfer",
3748
- lazy: () => import("./order-request-transfer-RYVK4WYW.js")
3749
- },
3750
- {
3751
- path: "email",
3752
- lazy: () => import("./order-edit-email-BREEW246.js")
3753
- },
3754
- {
3755
- path: "shipping-address",
3756
- lazy: () => import("./order-edit-shipping-address-XUG74AFY.js")
3757
- },
3758
- {
3759
- path: "billing-address",
3760
- lazy: () => import("./order-edit-billing-address-2BSCXUTK.js")
3761
- },
3762
- {
3763
- path: "metadata/edit",
3764
- lazy: () => import("./order-metadata-VIG5MGYV.js")
3846
+ path: "",
3847
+ lazy: () => import("./order-detail-QU4GQRJI.js"),
3848
+ children: [
3849
+ {
3850
+ path: "returns",
3851
+ lazy: () => import("./order-create-return-NW7E2KL3.js")
3852
+ },
3853
+ {
3854
+ path: "claims",
3855
+ lazy: () => import("./order-create-claim-SCUH6IYB.js")
3856
+ },
3857
+ {
3858
+ path: "exchanges",
3859
+ lazy: () => import("./order-create-exchange-ONVRQAYR.js")
3860
+ },
3861
+ {
3862
+ path: "edits",
3863
+ lazy: () => import("./order-create-edit-52VT7JLO.js")
3864
+ },
3865
+ {
3866
+ path: "refund",
3867
+ lazy: () => import("./order-create-refund-FJLL4CUD.js")
3868
+ },
3869
+ {
3870
+ path: "transfer",
3871
+ lazy: () => import("./order-request-transfer-RYVK4WYW.js")
3872
+ },
3873
+ {
3874
+ path: "email",
3875
+ lazy: () => import("./order-edit-email-BREEW246.js")
3876
+ },
3877
+ {
3878
+ path: "shipping-address",
3879
+ lazy: () => import("./order-edit-shipping-address-XUG74AFY.js")
3880
+ },
3881
+ {
3882
+ path: "billing-address",
3883
+ lazy: () => import("./order-edit-billing-address-ZT7HAEXB.js")
3884
+ },
3885
+ {
3886
+ path: "metadata/edit",
3887
+ lazy: () => import("./order-metadata-VIG5MGYV.js")
3888
+ }
3889
+ ]
3765
3890
  }
3766
3891
  ]
3767
3892
  }
3768
3893
  ]
3769
- }
3770
- ]
3771
- },
3772
- {
3773
- path: "/promotions",
3774
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3775
- handle: {
3776
- breadcrumb: () => t("promotions.domain")
3777
- },
3778
- children: [
3779
- {
3780
- path: "",
3781
- lazy: () => import("./promotion-list-AJ5NBDZ2.js")
3782
3894
  },
3783
3895
  {
3784
- path: "create",
3785
- lazy: () => import("./promotion-create-7ZUJ4W2J.js")
3786
- },
3787
- {
3788
- path: ":id",
3789
- lazy: async () => {
3790
- const { Breadcrumb, loader } = await import("./promotion-detail-4WNHEOG4.js");
3791
- return {
3792
- Component: Outlet4,
3793
- loader,
3794
- handle: {
3795
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3796
- }
3797
- };
3896
+ path: "/promotions",
3897
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3898
+ handle: {
3899
+ breadcrumb: () => t("promotions.domain"),
3900
+ permissions: "promotion:read"
3798
3901
  },
3799
3902
  children: [
3800
3903
  {
3801
3904
  path: "",
3802
- lazy: () => import("./promotion-detail-4WNHEOG4.js"),
3905
+ lazy: () => import("./promotion-list-KB2E4AEZ.js")
3906
+ },
3907
+ {
3908
+ path: "create",
3909
+ handle: { permissions: "promotion:create" },
3910
+ lazy: () => import("./promotion-create-7ZUJ4W2J.js")
3911
+ },
3912
+ {
3913
+ path: ":id",
3914
+ lazy: async () => {
3915
+ const { Breadcrumb, loader } = await import("./promotion-detail-HVQKXMJL.js");
3916
+ return {
3917
+ Component: Outlet4,
3918
+ loader,
3919
+ handle: {
3920
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3921
+ }
3922
+ };
3923
+ },
3803
3924
  children: [
3804
3925
  {
3805
- path: "edit",
3806
- lazy: () => import("./promotion-edit-details-7PHH756U.js")
3807
- },
3808
- {
3809
- path: "add-to-campaign",
3810
- lazy: () => import("./promotion-add-campaign-VAF3HTLK.js")
3811
- },
3812
- {
3813
- path: ":ruleType/edit",
3814
- lazy: () => import("./edit-rules-RJC3AYJN.js")
3926
+ path: "",
3927
+ lazy: () => import("./promotion-detail-HVQKXMJL.js"),
3928
+ children: [
3929
+ {
3930
+ path: "edit",
3931
+ handle: { permissions: "promotion:update" },
3932
+ lazy: () => import("./promotion-edit-details-7PHH756U.js")
3933
+ },
3934
+ {
3935
+ path: "add-to-campaign",
3936
+ lazy: () => import("./promotion-add-campaign-VAF3HTLK.js")
3937
+ },
3938
+ {
3939
+ path: ":ruleType/edit",
3940
+ lazy: () => import("./edit-rules-RJC3AYJN.js")
3941
+ }
3942
+ ]
3815
3943
  }
3816
3944
  ]
3817
3945
  }
3818
3946
  ]
3819
- }
3820
- ]
3821
- },
3822
- {
3823
- path: "/campaigns",
3824
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3825
- handle: {
3826
- breadcrumb: () => t("campaigns.domain")
3827
- },
3828
- children: [
3829
- {
3830
- path: "",
3831
- lazy: () => import("./campaign-list-7L2DGBHW.js"),
3832
- children: []
3833
- },
3834
- {
3835
- path: "create",
3836
- lazy: () => import("./campaign-create-FEEKJCUE.js")
3837
3947
  },
3838
3948
  {
3839
- path: ":id",
3840
- lazy: async () => {
3841
- const { Breadcrumb, loader } = await import("./campaign-detail-WPTZDDD5.js");
3842
- return {
3843
- Component: Outlet4,
3844
- loader,
3845
- handle: {
3846
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3847
- }
3848
- };
3949
+ path: "/campaigns",
3950
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3951
+ handle: {
3952
+ breadcrumb: () => t("campaigns.domain"),
3953
+ permissions: "campaign:read"
3849
3954
  },
3850
3955
  children: [
3851
3956
  {
3852
3957
  path: "",
3853
- lazy: () => import("./campaign-detail-WPTZDDD5.js"),
3958
+ lazy: () => import("./campaign-list-WFFH3VPJ.js"),
3959
+ children: []
3960
+ },
3961
+ {
3962
+ path: "create",
3963
+ handle: { permissions: "campaign:create" },
3964
+ lazy: () => import("./campaign-create-FEEKJCUE.js")
3965
+ },
3966
+ {
3967
+ path: ":id",
3968
+ lazy: async () => {
3969
+ const { Breadcrumb, loader } = await import("./campaign-detail-V6RISO2Y.js");
3970
+ return {
3971
+ Component: Outlet4,
3972
+ loader,
3973
+ handle: {
3974
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3975
+ }
3976
+ };
3977
+ },
3854
3978
  children: [
3855
3979
  {
3856
- path: "edit",
3857
- lazy: () => import("./campaign-edit-2WJ7V2EY.js")
3858
- },
3859
- {
3860
- path: "configuration",
3861
- lazy: () => import("./campaign-configuration-H6SKZFDS.js")
3862
- },
3863
- {
3864
- path: "edit-budget",
3865
- lazy: () => import("./campaign-budget-edit-EBFDQ6OX.js")
3866
- },
3867
- {
3868
- path: "add-promotions",
3869
- lazy: () => import("./add-campaign-promotions-S4HKMFU7.js")
3980
+ path: "",
3981
+ lazy: () => import("./campaign-detail-V6RISO2Y.js"),
3982
+ children: [
3983
+ {
3984
+ path: "edit",
3985
+ handle: { permissions: "campaign:update" },
3986
+ lazy: () => import("./campaign-edit-2WJ7V2EY.js")
3987
+ },
3988
+ {
3989
+ path: "configuration",
3990
+ lazy: () => import("./campaign-configuration-H6SKZFDS.js")
3991
+ },
3992
+ {
3993
+ path: "edit-budget",
3994
+ lazy: () => import("./campaign-budget-edit-EBFDQ6OX.js")
3995
+ },
3996
+ {
3997
+ path: "add-promotions",
3998
+ lazy: () => import("./add-campaign-promotions-DAJLAYTG.js")
3999
+ }
4000
+ ]
3870
4001
  }
3871
4002
  ]
3872
4003
  }
3873
4004
  ]
3874
- }
3875
- ]
3876
- },
3877
- {
3878
- path: "/reviews",
3879
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3880
- handle: {
3881
- breadcrumb: () => t("reviews.domain")
3882
- },
3883
- children: [
3884
- {
3885
- path: "",
3886
- lazy: () => import("./review-list-BTBPA2HV.js"),
3887
- children: []
3888
4005
  },
3889
4006
  {
3890
- path: ":id",
3891
- lazy: async () => {
3892
- const { Breadcrumb, loader } = await import("./review-detail-K555FECH.js");
3893
- return {
3894
- Component: Outlet4,
3895
- loader,
3896
- handle: {
3897
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3898
- }
3899
- };
4007
+ path: "/reviews",
4008
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4009
+ handle: {
4010
+ breadcrumb: () => t("reviews.domain"),
4011
+ permissions: "review:read"
3900
4012
  },
3901
4013
  children: [
3902
4014
  {
3903
4015
  path: "",
3904
- lazy: () => import("./review-detail-K555FECH.js"),
4016
+ lazy: () => import("./review-list-BTBPA2HV.js"),
4017
+ children: []
4018
+ },
4019
+ {
4020
+ path: ":id",
4021
+ lazy: async () => {
4022
+ const { Breadcrumb, loader } = await import("./review-detail-K555FECH.js");
4023
+ return {
4024
+ Component: Outlet4,
4025
+ loader,
4026
+ handle: {
4027
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4028
+ }
4029
+ };
4030
+ },
3905
4031
  children: [
3906
4032
  {
3907
- path: "edit",
3908
- lazy: () => import("./review-edit-VD4JATST.js")
3909
- },
3910
- {
3911
- path: "respond",
3912
- lazy: () => import("./review-respond-N6JNU5HF.js")
4033
+ path: "",
4034
+ lazy: () => import("./review-detail-K555FECH.js"),
4035
+ children: [
4036
+ {
4037
+ path: "edit",
4038
+ handle: { permissions: "review:update" },
4039
+ lazy: () => import("./review-edit-VD4JATST.js")
4040
+ },
4041
+ {
4042
+ path: "respond",
4043
+ lazy: () => import("./review-respond-N6JNU5HF.js")
4044
+ }
4045
+ ]
3913
4046
  }
3914
4047
  ]
3915
4048
  }
3916
4049
  ]
3917
- }
3918
- ]
3919
- },
3920
- {
3921
- path: "/collections",
3922
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3923
- handle: {
3924
- breadcrumb: () => t("collections.domain")
3925
- },
3926
- children: [
3927
- {
3928
- path: "",
3929
- lazy: () => import("./collection-list-LM5SH67K.js"),
3930
- children: [
3931
- {
3932
- path: "create",
3933
- lazy: () => import("./collection-create-W75VOWNN.js")
3934
- }
3935
- ]
3936
4050
  },
3937
4051
  {
3938
- path: ":id",
3939
- lazy: async () => {
3940
- const { Breadcrumb, loader } = await import("./collection-detail-JNAFJQXL.js");
3941
- return {
3942
- Component: Outlet4,
3943
- loader,
3944
- handle: {
3945
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
3946
- }
3947
- };
4052
+ path: "/collections",
4053
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4054
+ handle: {
4055
+ breadcrumb: () => t("collections.domain"),
4056
+ permissions: "product_collection:read"
3948
4057
  },
3949
4058
  children: [
3950
4059
  {
3951
4060
  path: "",
3952
- lazy: () => import("./collection-detail-JNAFJQXL.js"),
4061
+ lazy: () => import("./collection-list-C2EQXJTN.js"),
3953
4062
  children: [
3954
4063
  {
3955
- path: "edit",
3956
- lazy: () => import("./collection-edit-HMOZIS7Z.js")
3957
- },
3958
- {
3959
- path: "media",
3960
- lazy: () => import("./collection-media-PKTR7VDY.js")
3961
- },
3962
- {
3963
- path: "icon/edit",
3964
- lazy: () => import("./collection-icon-edit-L6VSK4DB.js")
3965
- },
3966
- {
3967
- path: "products",
3968
- lazy: () => import("./collection-add-products-VUXYBZUZ.js")
3969
- },
3970
- {
3971
- path: "metadata/edit",
3972
- lazy: () => import("./collection-metadata-XM2EBCWF.js")
4064
+ path: "create",
4065
+ handle: { permissions: "product_collection:create" },
4066
+ lazy: () => import("./collection-create-W75VOWNN.js")
3973
4067
  }
3974
4068
  ]
3975
- }
3976
- ]
3977
- }
3978
- ]
3979
- },
3980
- {
3981
- path: "/price-lists",
3982
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
3983
- handle: {
3984
- breadcrumb: () => t("priceLists.domain")
3985
- },
3986
- children: [
3987
- {
3988
- path: "",
3989
- lazy: () => import("./price-list-list-JC5EDBH6.js"),
3990
- children: [
4069
+ },
3991
4070
  {
3992
- path: "create",
3993
- lazy: () => import("./price-list-create-6PKWU4YS.js")
4071
+ path: ":id",
4072
+ lazy: async () => {
4073
+ const { Breadcrumb, loader } = await import("./collection-detail-JNAFJQXL.js");
4074
+ return {
4075
+ Component: Outlet4,
4076
+ loader,
4077
+ handle: {
4078
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4079
+ }
4080
+ };
4081
+ },
4082
+ children: [
4083
+ {
4084
+ path: "",
4085
+ lazy: () => import("./collection-detail-JNAFJQXL.js"),
4086
+ children: [
4087
+ {
4088
+ path: "edit",
4089
+ handle: { permissions: "product_collection:update" },
4090
+ lazy: () => import("./collection-edit-HMOZIS7Z.js")
4091
+ },
4092
+ {
4093
+ path: "media",
4094
+ lazy: () => import("./collection-media-PKTR7VDY.js")
4095
+ },
4096
+ {
4097
+ path: "icon/edit",
4098
+ lazy: () => import("./collection-icon-edit-L6VSK4DB.js")
4099
+ },
4100
+ {
4101
+ path: "products",
4102
+ lazy: () => import("./collection-add-products-VUXYBZUZ.js")
4103
+ },
4104
+ {
4105
+ path: "metadata/edit",
4106
+ lazy: () => import("./collection-metadata-XM2EBCWF.js")
4107
+ }
4108
+ ]
4109
+ }
4110
+ ]
3994
4111
  }
3995
4112
  ]
3996
4113
  },
3997
4114
  {
3998
- path: ":id",
3999
- lazy: async () => {
4000
- const { Breadcrumb, loader } = await import("./price-list-detail-OUWCRZFB.js");
4001
- return {
4002
- Component: Outlet4,
4003
- loader,
4004
- handle: {
4005
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4006
- }
4007
- };
4115
+ path: "/price-lists",
4116
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4117
+ handle: {
4118
+ breadcrumb: () => t("priceLists.domain"),
4119
+ permissions: "price_list:read"
4008
4120
  },
4009
4121
  children: [
4010
4122
  {
4011
4123
  path: "",
4012
- lazy: () => import("./price-list-detail-OUWCRZFB.js"),
4124
+ lazy: () => import("./price-list-list-UEEYIP5R.js"),
4013
4125
  children: [
4014
4126
  {
4015
- path: "edit",
4016
- lazy: () => import("./price-list-edit-ZVP6CCPE.js")
4017
- },
4018
- {
4019
- path: "configuration",
4020
- lazy: () => import("./price-list-configuration-4OTKSK5N.js")
4021
- },
4022
- {
4023
- path: "customer-availability",
4024
- lazy: () => import("./price-list-customer-availability-WU2OGO37.js")
4025
- },
4026
- {
4027
- path: "products/add",
4028
- lazy: () => import("./price-list-prices-add-OSHFP3DP.js")
4029
- },
4030
- {
4031
- path: "products/edit",
4032
- lazy: () => import("./price-list-prices-edit-QQUJPIUM.js")
4127
+ path: "create",
4128
+ handle: { permissions: "price_list:create" },
4129
+ lazy: () => import("./price-list-create-6PKWU4YS.js")
4033
4130
  }
4034
4131
  ]
4035
- }
4036
- ]
4037
- }
4038
- ]
4039
- },
4040
- {
4041
- path: "/customers",
4042
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4043
- handle: {
4044
- breadcrumb: () => t("customers.domain")
4045
- },
4046
- children: [
4047
- {
4048
- path: "",
4049
- lazy: () => import("./customer-list-IJJEZDOZ.js"),
4050
- children: [
4132
+ },
4051
4133
  {
4052
- path: "create",
4053
- lazy: () => import("./customer-create-46H2N34Z.js")
4134
+ path: ":id",
4135
+ lazy: async () => {
4136
+ const { Breadcrumb, loader } = await import("./price-list-detail-OUWCRZFB.js");
4137
+ return {
4138
+ Component: Outlet4,
4139
+ loader,
4140
+ handle: {
4141
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4142
+ }
4143
+ };
4144
+ },
4145
+ children: [
4146
+ {
4147
+ path: "",
4148
+ lazy: () => import("./price-list-detail-OUWCRZFB.js"),
4149
+ children: [
4150
+ {
4151
+ path: "edit",
4152
+ handle: { permissions: "price_list:update" },
4153
+ lazy: () => import("./price-list-edit-ZVP6CCPE.js")
4154
+ },
4155
+ {
4156
+ path: "configuration",
4157
+ lazy: () => import("./price-list-configuration-4OTKSK5N.js")
4158
+ },
4159
+ {
4160
+ path: "customer-availability",
4161
+ lazy: () => import("./price-list-customer-availability-WU2OGO37.js")
4162
+ },
4163
+ {
4164
+ path: "products/add",
4165
+ lazy: () => import("./price-list-prices-add-OSHFP3DP.js")
4166
+ },
4167
+ {
4168
+ path: "products/edit",
4169
+ lazy: () => import("./price-list-prices-edit-QQUJPIUM.js")
4170
+ }
4171
+ ]
4172
+ }
4173
+ ]
4054
4174
  }
4055
4175
  ]
4056
4176
  },
4057
4177
  {
4058
- path: ":id",
4059
- lazy: async () => {
4060
- const { Breadcrumb, loader } = await import("./customer-detail-GWF2DLBE.js");
4061
- return {
4062
- Component: Outlet4,
4063
- loader,
4064
- handle: {
4065
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4066
- }
4067
- };
4178
+ path: "/customers",
4179
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4180
+ handle: {
4181
+ breadcrumb: () => t("customers.domain"),
4182
+ permissions: "customer:read"
4068
4183
  },
4069
4184
  children: [
4070
4185
  {
4071
4186
  path: "",
4072
- lazy: () => import("./customer-detail-GWF2DLBE.js"),
4187
+ lazy: () => import("./customer-list-DFONJE23.js"),
4073
4188
  children: [
4074
4189
  {
4075
- path: "edit",
4076
- lazy: () => import("./customer-edit-5EH2AUGN.js")
4077
- },
4078
- {
4079
- path: "create-address",
4080
- lazy: () => import("./customer-create-address-OGWYC7BZ.js")
4081
- },
4082
- {
4083
- path: "edit-address/:address_id",
4084
- lazy: () => import("./customer-edit-address-PGWY42QU.js")
4085
- },
4086
- {
4087
- path: "add-customer-groups",
4088
- lazy: () => import("./customers-add-customer-group-OQBT7CUI.js")
4089
- },
4090
- {
4091
- path: ":order_id/transfer",
4092
- lazy: () => import("./order-request-transfer-RYVK4WYW.js")
4093
- },
4094
- {
4095
- path: "metadata/edit",
4096
- lazy: () => import("./customer-metadata-GWZC456X.js")
4190
+ path: "create",
4191
+ handle: { permissions: "customer:create" },
4192
+ lazy: () => import("./customer-create-46H2N34Z.js")
4097
4193
  }
4098
4194
  ]
4099
- }
4100
- ]
4101
- }
4102
- ]
4103
- },
4104
- {
4105
- path: "/customer-groups",
4106
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4107
- handle: {
4108
- breadcrumb: () => t("customerGroups.domain")
4109
- },
4110
- children: [
4111
- {
4112
- path: "",
4113
- lazy: () => import("./customer-group-list-KBZBSGTQ.js"),
4114
- children: [
4195
+ },
4115
4196
  {
4116
- path: "create",
4117
- lazy: () => import("./customer-group-create-WER6DODC.js")
4197
+ path: ":id",
4198
+ lazy: async () => {
4199
+ const { Breadcrumb, loader } = await import("./customer-detail-GWF2DLBE.js");
4200
+ return {
4201
+ Component: Outlet4,
4202
+ loader,
4203
+ handle: {
4204
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4205
+ }
4206
+ };
4207
+ },
4208
+ children: [
4209
+ {
4210
+ path: "",
4211
+ lazy: () => import("./customer-detail-GWF2DLBE.js"),
4212
+ children: [
4213
+ {
4214
+ path: "edit",
4215
+ handle: { permissions: "customer:update" },
4216
+ lazy: () => import("./customer-edit-5EH2AUGN.js")
4217
+ },
4218
+ {
4219
+ path: "create-address",
4220
+ lazy: () => import("./customer-create-address-OGWYC7BZ.js")
4221
+ },
4222
+ {
4223
+ path: "edit-address/:address_id",
4224
+ lazy: () => import("./customer-edit-address-PGWY42QU.js")
4225
+ },
4226
+ {
4227
+ path: "add-customer-groups",
4228
+ lazy: () => import("./customers-add-customer-group-OQBT7CUI.js")
4229
+ },
4230
+ {
4231
+ path: ":order_id/transfer",
4232
+ lazy: () => import("./order-request-transfer-RYVK4WYW.js")
4233
+ },
4234
+ {
4235
+ path: "metadata/edit",
4236
+ lazy: () => import("./customer-metadata-GWZC456X.js")
4237
+ }
4238
+ ]
4239
+ }
4240
+ ]
4118
4241
  }
4119
4242
  ]
4120
4243
  },
4121
4244
  {
4122
- path: ":id",
4123
- lazy: async () => {
4124
- const { Breadcrumb, loader } = await import("./customer-group-detail-FX3PNES4.js");
4125
- return {
4126
- Component: Outlet4,
4127
- loader,
4128
- handle: {
4129
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4130
- }
4131
- };
4245
+ path: "/customer-groups",
4246
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4247
+ handle: {
4248
+ breadcrumb: () => t("customerGroups.domain"),
4249
+ permissions: "customer_group:read"
4132
4250
  },
4133
4251
  children: [
4134
4252
  {
4135
4253
  path: "",
4136
- lazy: () => import("./customer-group-detail-FX3PNES4.js"),
4254
+ lazy: () => import("./customer-group-list-NZ3D2ZAR.js"),
4137
4255
  children: [
4138
4256
  {
4139
- path: "edit",
4140
- lazy: () => import("./customer-group-edit-ZQTBUZVR.js")
4141
- },
4142
- {
4143
- path: "add-customers",
4144
- lazy: () => import("./customer-group-add-customers-6HJMWGW2.js")
4145
- },
4146
- {
4147
- path: "metadata/edit",
4148
- lazy: () => import("./customer-group-metadata-FUJFFWCO.js")
4257
+ path: "create",
4258
+ handle: { permissions: "customer_group:create" },
4259
+ lazy: () => import("./customer-group-create-WER6DODC.js")
4149
4260
  }
4150
4261
  ]
4151
- }
4152
- ]
4153
- }
4154
- ]
4155
- },
4156
- {
4157
- path: "/stores",
4158
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4159
- handle: {
4160
- breadcrumb: () => t("stores.domain")
4161
- },
4162
- children: [
4163
- {
4164
- path: "",
4165
- lazy: () => import("./store-list-OKKZA7VO.js"),
4166
- children: [
4167
- {
4168
- path: "create",
4169
- lazy: () => import("./store-create-J4SL6SY3.js")
4170
4262
  },
4171
4263
  {
4172
- path: "bulk-edit",
4173
- lazy: () => import("./store-bulk-edit-DX3U7HBE.js")
4264
+ path: ":id",
4265
+ lazy: async () => {
4266
+ const { Breadcrumb, loader } = await import("./customer-group-detail-FX3PNES4.js");
4267
+ return {
4268
+ Component: Outlet4,
4269
+ loader,
4270
+ handle: {
4271
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4272
+ }
4273
+ };
4274
+ },
4275
+ children: [
4276
+ {
4277
+ path: "",
4278
+ lazy: () => import("./customer-group-detail-FX3PNES4.js"),
4279
+ children: [
4280
+ {
4281
+ path: "edit",
4282
+ handle: { permissions: "customer_group:update" },
4283
+ lazy: () => import("./customer-group-edit-ZQTBUZVR.js")
4284
+ },
4285
+ {
4286
+ path: "add-customers",
4287
+ lazy: () => import("./customer-group-add-customers-6HJMWGW2.js")
4288
+ },
4289
+ {
4290
+ path: "metadata/edit",
4291
+ lazy: () => import("./customer-group-metadata-FUJFFWCO.js")
4292
+ }
4293
+ ]
4294
+ }
4295
+ ]
4174
4296
  }
4175
4297
  ]
4176
4298
  },
4177
4299
  {
4178
- path: ":id",
4179
- lazy: async () => {
4180
- const { Breadcrumb } = await import("./store-details-GOVF3KFW.js");
4181
- return {
4182
- Component: Outlet4,
4183
- handle: {
4184
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4185
- }
4186
- };
4300
+ path: "/stores",
4301
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4302
+ handle: {
4303
+ breadcrumb: () => t("stores.domain"),
4304
+ permissions: "seller:read"
4187
4305
  },
4188
4306
  children: [
4189
4307
  {
4190
4308
  path: "",
4191
- lazy: () => import("./store-details-GOVF3KFW.js"),
4309
+ lazy: () => import("./store-list-XXRF6JAZ.js"),
4310
+ children: [
4311
+ {
4312
+ path: "create",
4313
+ handle: { permissions: "seller:create" },
4314
+ lazy: () => import("./store-create-J4SL6SY3.js")
4315
+ },
4316
+ {
4317
+ path: "bulk-edit",
4318
+ lazy: () => import("./store-bulk-edit-DX3U7HBE.js")
4319
+ }
4320
+ ]
4321
+ },
4322
+ {
4323
+ path: ":id",
4324
+ lazy: async () => {
4325
+ const { Breadcrumb } = await import("./store-details-KI5D4VSI.js");
4326
+ return {
4327
+ Component: Outlet4,
4328
+ handle: {
4329
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4330
+ }
4331
+ };
4332
+ },
4192
4333
  children: [
4193
4334
  {
4194
- path: "edit",
4195
- lazy: () => import("./store-edit-W6NHNE3S.js")
4196
- },
4197
- {
4198
- path: "edit-address",
4199
- lazy: () => import("./store-address-edit-VLYDLTHQ.js")
4200
- },
4201
- {
4202
- path: "professional-details",
4203
- lazy: () => import("./store-professional-details-edit-MXW6WBQF.js")
4204
- },
4205
- {
4206
- path: "payment-details",
4207
- lazy: () => import("./store-payment-details-edit-VCCSUXIV.js")
4208
- },
4209
- {
4210
- path: "store-closure",
4211
- lazy: () => import("./store-closure-edit-AT4DMZRF.js")
4212
- },
4213
- {
4214
- path: "invite",
4215
- lazy: () => import("./store-member-invite-5S64PDTE.js")
4335
+ path: "",
4336
+ lazy: () => import("./store-details-KI5D4VSI.js"),
4337
+ children: [
4338
+ {
4339
+ path: "edit",
4340
+ handle: { permissions: "seller:update" },
4341
+ lazy: () => import("./store-edit-LXGZTR3G.js")
4342
+ },
4343
+ {
4344
+ path: "edit-address",
4345
+ lazy: () => import("./store-address-edit-VLYDLTHQ.js")
4346
+ },
4347
+ {
4348
+ path: "professional-details",
4349
+ lazy: () => import("./store-professional-details-edit-MXW6WBQF.js")
4350
+ },
4351
+ {
4352
+ path: "payment-details",
4353
+ lazy: () => import("./store-payment-details-edit-VCCSUXIV.js")
4354
+ },
4355
+ {
4356
+ path: "store-closure",
4357
+ lazy: () => import("./store-closure-edit-AT4DMZRF.js")
4358
+ },
4359
+ {
4360
+ path: "invite",
4361
+ lazy: () => import("./store-member-invite-5S64PDTE.js")
4362
+ }
4363
+ ]
4216
4364
  }
4217
4365
  ]
4218
4366
  }
4219
4367
  ]
4220
- }
4221
- ]
4222
- },
4223
- {
4224
- path: "/payouts",
4225
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4226
- handle: {
4227
- breadcrumb: () => "Payouts"
4228
- },
4229
- children: [
4230
- {
4231
- path: "",
4232
- lazy: () => import("./payout-list-HRVCGZJS.js")
4233
4368
  },
4234
4369
  {
4235
- path: ":id",
4236
- lazy: async () => {
4237
- const { Breadcrumb, loader } = await import("./payout-detail-UTFO6U4H.js");
4238
- return {
4239
- Component: Outlet4,
4240
- loader,
4241
- handle: {
4242
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4243
- }
4244
- };
4370
+ path: "/payouts",
4371
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4372
+ handle: {
4373
+ breadcrumb: () => "Payouts",
4374
+ permissions: "payout:read"
4245
4375
  },
4246
4376
  children: [
4247
4377
  {
4248
4378
  path: "",
4249
- lazy: () => import("./payout-detail-UTFO6U4H.js")
4250
- }
4251
- ]
4252
- }
4253
- ]
4254
- },
4255
- {
4256
- path: "/reservations",
4257
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4258
- handle: {
4259
- breadcrumb: () => t("reservations.domain")
4260
- },
4261
- children: [
4262
- {
4263
- path: "",
4264
- lazy: () => import("./reservation-list-CRPRHIMT.js"),
4265
- children: [
4379
+ lazy: () => import("./payout-list-HRVCGZJS.js")
4380
+ },
4266
4381
  {
4267
- path: "create",
4268
- lazy: () => import("./reservation-create-H3T3AHTK.js")
4382
+ path: ":id",
4383
+ lazy: async () => {
4384
+ const { Breadcrumb, loader } = await import("./payout-detail-UTFO6U4H.js");
4385
+ return {
4386
+ Component: Outlet4,
4387
+ loader,
4388
+ handle: {
4389
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4390
+ }
4391
+ };
4392
+ },
4393
+ children: [
4394
+ {
4395
+ path: "",
4396
+ lazy: () => import("./payout-detail-UTFO6U4H.js")
4397
+ }
4398
+ ]
4269
4399
  }
4270
4400
  ]
4271
4401
  },
4272
4402
  {
4273
- path: ":id",
4274
- lazy: async () => {
4275
- const { Breadcrumb, loader } = await import("./reservation-detail-5GYGVM3M.js");
4276
- return {
4277
- Component: Outlet4,
4278
- loader,
4279
- handle: {
4280
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4281
- }
4282
- };
4403
+ path: "/reservations",
4404
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4405
+ handle: {
4406
+ breadcrumb: () => t("reservations.domain"),
4407
+ permissions: "reservation_item:read"
4283
4408
  },
4284
4409
  children: [
4285
4410
  {
4286
4411
  path: "",
4287
- lazy: () => import("./reservation-detail-5GYGVM3M.js"),
4412
+ lazy: () => import("./reservation-list-APKRLKOF.js"),
4288
4413
  children: [
4289
4414
  {
4290
- path: "edit",
4291
- lazy: () => import("./edit-reservation-W3THLKKK.js")
4292
- },
4415
+ path: "create",
4416
+ handle: { permissions: "reservation_item:create" },
4417
+ lazy: () => import("./reservation-create-H3T3AHTK.js")
4418
+ }
4419
+ ]
4420
+ },
4421
+ {
4422
+ path: ":id",
4423
+ lazy: async () => {
4424
+ const { Breadcrumb, loader } = await import("./reservation-detail-5GYGVM3M.js");
4425
+ return {
4426
+ Component: Outlet4,
4427
+ loader,
4428
+ handle: {
4429
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4430
+ }
4431
+ };
4432
+ },
4433
+ children: [
4293
4434
  {
4294
- path: "metadata/edit",
4295
- lazy: () => import("./reservation-metadata-P4G3JEDW.js")
4435
+ path: "",
4436
+ lazy: () => import("./reservation-detail-5GYGVM3M.js"),
4437
+ children: [
4438
+ {
4439
+ path: "edit",
4440
+ handle: { permissions: "reservation_item:update" },
4441
+ lazy: () => import("./edit-reservation-W3THLKKK.js")
4442
+ },
4443
+ {
4444
+ path: "metadata/edit",
4445
+ lazy: () => import("./reservation-metadata-P4G3JEDW.js")
4446
+ }
4447
+ ]
4296
4448
  }
4297
4449
  ]
4298
4450
  }
4299
4451
  ]
4300
- }
4301
- ]
4302
- },
4303
- {
4304
- path: "/offers",
4305
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4306
- handle: {
4307
- breadcrumb: () => t("offers.domain")
4308
- },
4309
- children: [
4310
- {
4311
- path: "",
4312
- lazy: async () => {
4313
- const { OfferListPage } = await import("./offers-HRSJXCBB.js");
4314
- return { Component: OfferListPage };
4315
- }
4316
4452
  },
4317
4453
  {
4318
- path: ":id",
4319
- lazy: async () => {
4320
- const { loader } = await import("./loader-3VTBJUA2.js");
4321
- const { Breadcrumb } = await import("./breadcrumb-KOE4ZWGU.js");
4322
- return {
4323
- Component: Outlet4,
4324
- loader,
4325
- handle: {
4326
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4327
- }
4328
- };
4454
+ path: "/offers",
4455
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4456
+ handle: {
4457
+ breadcrumb: () => t("offers.domain"),
4458
+ permissions: "offer:read"
4329
4459
  },
4330
4460
  children: [
4331
4461
  {
4332
4462
  path: "",
4333
4463
  lazy: async () => {
4334
- const { OfferDetailPage } = await import("./offer-detail-page-GLOI33TW.js");
4335
- return { Component: OfferDetailPage };
4464
+ const { OfferListPage } = await import("./offers-HRSJXCBB.js");
4465
+ return { Component: OfferListPage };
4336
4466
  }
4337
4467
  },
4338
4468
  {
4339
- path: "variants/:offer_id",
4469
+ path: ":id",
4340
4470
  lazy: async () => {
4341
- const { loader } = await import("./loader-G2ECT6LC.js");
4342
- const { Breadcrumb } = await import("./breadcrumb-TCQDZXGC.js");
4471
+ const { loader } = await import("./loader-3VTBJUA2.js");
4472
+ const { Breadcrumb } = await import("./breadcrumb-KOE4ZWGU.js");
4343
4473
  return {
4344
4474
  Component: Outlet4,
4345
4475
  loader,
@@ -4352,79 +4482,104 @@ function getRouteMap({
4352
4482
  {
4353
4483
  path: "",
4354
4484
  lazy: async () => {
4355
- const { OfferVariantDetailPage } = await import("./offer-variant-detail-page-5PLRLGNQ.js");
4356
- return { Component: OfferVariantDetailPage };
4485
+ const { OfferDetailPage } = await import("./offer-detail-page-GLOI33TW.js");
4486
+ return { Component: OfferDetailPage };
4357
4487
  }
4488
+ },
4489
+ {
4490
+ path: "variants/:offer_id",
4491
+ lazy: async () => {
4492
+ const { loader } = await import("./loader-G2ECT6LC.js");
4493
+ const { Breadcrumb } = await import("./breadcrumb-TCQDZXGC.js");
4494
+ return {
4495
+ Component: Outlet4,
4496
+ loader,
4497
+ handle: {
4498
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4499
+ }
4500
+ };
4501
+ },
4502
+ children: [
4503
+ {
4504
+ path: "",
4505
+ lazy: async () => {
4506
+ const { OfferVariantDetailPage } = await import("./offer-variant-detail-page-5PLRLGNQ.js");
4507
+ return { Component: OfferVariantDetailPage };
4508
+ }
4509
+ }
4510
+ ]
4358
4511
  }
4359
4512
  ]
4360
4513
  }
4361
4514
  ]
4362
- }
4363
- ]
4364
- },
4365
- {
4366
- path: "/inventory",
4367
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4368
- handle: {
4369
- breadcrumb: () => t("inventory.domain")
4370
- },
4371
- children: [
4372
- {
4373
- path: "",
4374
- lazy: () => import("./inventory-list-47UGRRO4.js"),
4375
- children: [
4376
- {
4377
- path: "stock",
4378
- lazy: () => import("./inventory-stock-ASIGAL2Z.js")
4379
- }
4380
- ]
4381
4515
  },
4382
4516
  {
4383
- path: ":id",
4384
- lazy: async () => {
4385
- const { Breadcrumb, loader } = await import("./inventory-detail-XVZC3EKF.js");
4386
- return {
4387
- Component: Outlet4,
4388
- loader,
4389
- handle: {
4390
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4391
- }
4392
- };
4517
+ path: "/inventory",
4518
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4519
+ handle: {
4520
+ breadcrumb: () => t("inventory.domain"),
4521
+ permissions: "inventory_item:read"
4393
4522
  },
4394
4523
  children: [
4395
4524
  {
4396
4525
  path: "",
4397
- lazy: () => import("./inventory-detail-XVZC3EKF.js"),
4526
+ lazy: () => import("./inventory-list-47UGRRO4.js"),
4398
4527
  children: [
4399
4528
  {
4400
- path: "edit",
4401
- lazy: () => import("./edit-inventory-item-ZSV4WF6G.js")
4402
- },
4403
- {
4404
- path: "attributes",
4405
- lazy: () => import("./edit-inventory-item-attributes-NWSAQMKX.js")
4406
- },
4407
- {
4408
- path: "metadata/edit",
4409
- lazy: () => import("./inventory-metadata-FGHOW3YG.js")
4410
- },
4411
- {
4412
- path: "locations",
4413
- lazy: () => import("./manage-locations-ZFIRHMNH.js")
4414
- },
4529
+ path: "stock",
4530
+ lazy: () => import("./inventory-stock-ASIGAL2Z.js")
4531
+ }
4532
+ ]
4533
+ },
4534
+ {
4535
+ path: ":id",
4536
+ lazy: async () => {
4537
+ const { Breadcrumb, loader } = await import("./inventory-detail-XVZC3EKF.js");
4538
+ return {
4539
+ Component: Outlet4,
4540
+ loader,
4541
+ handle: {
4542
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4543
+ }
4544
+ };
4545
+ },
4546
+ children: [
4415
4547
  {
4416
- path: "locations/:location_id",
4417
- lazy: () => import("./adjust-inventory-BBAU3NMM.js")
4548
+ path: "",
4549
+ lazy: () => import("./inventory-detail-XVZC3EKF.js"),
4550
+ children: [
4551
+ {
4552
+ path: "edit",
4553
+ handle: { permissions: "inventory_item:update" },
4554
+ lazy: () => import("./edit-inventory-item-ZSV4WF6G.js")
4555
+ },
4556
+ {
4557
+ path: "attributes",
4558
+ lazy: () => import("./edit-inventory-item-attributes-NWSAQMKX.js")
4559
+ },
4560
+ {
4561
+ path: "metadata/edit",
4562
+ lazy: () => import("./inventory-metadata-FGHOW3YG.js")
4563
+ },
4564
+ {
4565
+ path: "locations",
4566
+ lazy: () => import("./manage-locations-ZFIRHMNH.js")
4567
+ },
4568
+ {
4569
+ path: "locations/:location_id",
4570
+ lazy: () => import("./adjust-inventory-BBAU3NMM.js")
4571
+ }
4572
+ ]
4418
4573
  }
4419
4574
  ]
4420
4575
  }
4421
4576
  ]
4422
4577
  }
4423
- ]
4424
- }
4425
- ],
4426
- customMainRoutes
4427
- )
4578
+ ],
4579
+ customMainRoutes
4580
+ )
4581
+ }
4582
+ ]
4428
4583
  }
4429
4584
  ]
4430
4585
  },
@@ -4438,305 +4593,201 @@ function getRouteMap({
4438
4593
  breadcrumb: () => t("app.nav.settings.header")
4439
4594
  },
4440
4595
  element: /* @__PURE__ */ jsx17(SettingsLayout, {}),
4441
- children: mergeRoutes(
4442
- [
4443
- {
4444
- index: true,
4445
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4446
- lazy: () => import("./settings-AVE3VCCM.js")
4447
- },
4448
- {
4449
- path: "profile",
4450
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4451
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4452
- handle: {
4453
- breadcrumb: () => t("profile.domain")
4454
- },
4455
- children: [
4456
- {
4457
- path: "",
4458
- lazy: () => import("./profile-detail-3T7XIJIX.js"),
4459
- children: [
4460
- {
4461
- path: "edit",
4462
- lazy: () => import("./profile-edit-34K6IDKU.js")
4463
- }
4464
- ]
4465
- }
4466
- ]
4467
- },
4468
- {
4469
- path: "regions",
4470
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4471
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4472
- handle: {
4473
- breadcrumb: () => t("regions.domain")
4474
- },
4475
- children: [
4596
+ children: [
4597
+ {
4598
+ element: /* @__PURE__ */ jsx17(RoutePermissionGuard, {}),
4599
+ children: mergeRoutes(
4600
+ [
4476
4601
  {
4477
- path: "",
4478
- lazy: () => import("./region-list-XFQ3EQZ4.js"),
4479
- children: [
4480
- {
4481
- path: "create",
4482
- lazy: () => import("./region-create-UVMXMB2D.js")
4483
- }
4484
- ]
4602
+ index: true,
4603
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4604
+ lazy: () => import("./settings-AVE3VCCM.js")
4485
4605
  },
4486
4606
  {
4487
- path: ":id",
4488
- lazy: async () => {
4489
- const { Breadcrumb, loader } = await import("./region-detail-7SHGTLWA.js");
4490
- return {
4491
- Component: Outlet4,
4492
- loader,
4493
- handle: {
4494
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4495
- }
4496
- };
4607
+ path: "profile",
4608
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4609
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
4610
+ handle: {
4611
+ breadcrumb: () => t("profile.domain")
4497
4612
  },
4498
4613
  children: [
4499
4614
  {
4500
4615
  path: "",
4501
- lazy: () => import("./region-detail-7SHGTLWA.js"),
4616
+ lazy: () => import("./profile-detail-3T7XIJIX.js"),
4502
4617
  children: [
4503
4618
  {
4504
4619
  path: "edit",
4505
- lazy: () => import("./region-edit-NUMG2V5L.js")
4506
- },
4507
- {
4508
- path: "countries/add",
4509
- lazy: () => import("./region-add-countries-TUPPVB4U.js")
4510
- },
4511
- {
4512
- path: "metadata/edit",
4513
- lazy: () => import("./region-metadata-Q6HEMCHD.js")
4620
+ lazy: () => import("./profile-edit-34K6IDKU.js")
4514
4621
  }
4515
4622
  ]
4516
4623
  }
4517
4624
  ]
4518
- }
4519
- ]
4520
- },
4521
- {
4522
- path: "marketplace",
4523
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4524
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4525
- handle: {
4526
- breadcrumb: () => t("marketplace.domain")
4527
- },
4528
- children: [
4529
- {
4530
- path: "",
4531
- lazy: () => import("./marketplace-detail-D2R5PFX2.js"),
4532
- children: [
4533
- {
4534
- path: "edit",
4535
- lazy: () => import("./marketplace-edit-G7YNGABC.js")
4536
- },
4537
- {
4538
- path: "currencies",
4539
- lazy: () => import("./marketplace-add-currencies-RWT3F2WT.js")
4540
- },
4541
- {
4542
- path: "metadata/edit",
4543
- lazy: () => import("./marketplace-metadata-EGDXYKCE.js")
4544
- }
4545
- ]
4546
- }
4547
- ]
4548
- },
4549
- {
4550
- path: "commissions",
4551
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4552
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4553
- handle: {
4554
- breadcrumb: () => t("commissions.domain")
4555
- },
4556
- children: [
4557
- {
4558
- path: "",
4559
- lazy: () => import("./commissions-list-X54FEOEZ.js"),
4560
- children: [
4561
- {
4562
- path: "create",
4563
- lazy: () => import("./commission-rule-create-CDLLQIY4.js")
4564
- },
4565
- {
4566
- path: "edit-global",
4567
- lazy: () => import("./global-commission-edit-JEBLF6CT.js")
4568
- }
4569
- ]
4570
4625
  },
4571
4626
  {
4572
- path: ":id",
4573
- lazy: async () => {
4574
- const { Breadcrumb } = await import("./commission-rule-detail-LFEZ5U6V.js");
4575
- return {
4576
- Component: Outlet4,
4577
- handle: {
4578
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4579
- }
4580
- };
4627
+ path: "regions",
4628
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4629
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
4630
+ handle: {
4631
+ breadcrumb: () => t("regions.domain"),
4632
+ permissions: "region:read"
4581
4633
  },
4582
4634
  children: [
4583
4635
  {
4584
4636
  path: "",
4585
- lazy: () => import("./commission-rule-detail-LFEZ5U6V.js"),
4637
+ lazy: () => import("./region-list-XFQ3EQZ4.js"),
4586
4638
  children: [
4587
4639
  {
4588
- path: "edit",
4589
- lazy: () => import("./commission-rule-edit-5CFKPI7U.js")
4590
- },
4640
+ path: "create",
4641
+ handle: { permissions: "region:create" },
4642
+ lazy: () => import("./region-create-UVMXMB2D.js")
4643
+ }
4644
+ ]
4645
+ },
4646
+ {
4647
+ path: ":id",
4648
+ lazy: async () => {
4649
+ const { Breadcrumb, loader } = await import("./region-detail-7SHGTLWA.js");
4650
+ return {
4651
+ Component: Outlet4,
4652
+ loader,
4653
+ handle: {
4654
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4655
+ }
4656
+ };
4657
+ },
4658
+ children: [
4591
4659
  {
4592
- path: "edit-commission",
4593
- lazy: () => import("./commission-rule-commission-edit-KLGYDUOC.js")
4660
+ path: "",
4661
+ lazy: () => import("./region-detail-7SHGTLWA.js"),
4662
+ children: [
4663
+ {
4664
+ path: "edit",
4665
+ handle: { permissions: "region:update" },
4666
+ lazy: () => import("./region-edit-NUMG2V5L.js")
4667
+ },
4668
+ {
4669
+ path: "countries/add",
4670
+ lazy: () => import("./region-add-countries-TUPPVB4U.js")
4671
+ },
4672
+ {
4673
+ path: "metadata/edit",
4674
+ lazy: () => import("./region-metadata-Q6HEMCHD.js")
4675
+ }
4676
+ ]
4594
4677
  }
4595
4678
  ]
4596
4679
  }
4597
4680
  ]
4598
- }
4599
- ]
4600
- },
4601
- {
4602
- path: "users",
4603
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4604
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4605
- handle: {
4606
- breadcrumb: () => t("users.domain")
4607
- },
4608
- children: [
4609
- {
4610
- path: "",
4611
- lazy: () => import("./user-list-P7JCBIOR.js"),
4612
- children: [
4613
- {
4614
- path: "invite",
4615
- lazy: () => import("./user-invite-WG57KWD3.js")
4616
- }
4617
- ]
4618
4681
  },
4619
4682
  {
4620
- path: ":id",
4621
- lazy: async () => {
4622
- const { Breadcrumb, loader } = await import("./user-detail-5LOE6QGK.js");
4623
- return {
4624
- Component: Outlet4,
4625
- loader,
4626
- handle: {
4627
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4628
- }
4629
- };
4683
+ path: "marketplace",
4684
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4685
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
4686
+ handle: {
4687
+ breadcrumb: () => t("marketplace.domain"),
4688
+ permissions: "store:read"
4630
4689
  },
4631
4690
  children: [
4632
4691
  {
4633
4692
  path: "",
4634
- lazy: () => import("./user-detail-5LOE6QGK.js"),
4693
+ lazy: () => import("./marketplace-detail-D2R5PFX2.js"),
4635
4694
  children: [
4636
4695
  {
4637
4696
  path: "edit",
4638
- lazy: () => import("./user-edit-O2M5II52.js")
4697
+ handle: { permissions: "store:update" },
4698
+ lazy: () => import("./marketplace-edit-G7YNGABC.js")
4699
+ },
4700
+ {
4701
+ path: "currencies",
4702
+ lazy: () => import("./marketplace-add-currencies-RWT3F2WT.js")
4639
4703
  },
4640
4704
  {
4641
4705
  path: "metadata/edit",
4642
- lazy: () => import("./user-metadata-2PEU2IJE.js")
4706
+ lazy: () => import("./marketplace-metadata-EGDXYKCE.js")
4643
4707
  }
4644
4708
  ]
4645
4709
  }
4646
4710
  ]
4647
- }
4648
- ]
4649
- },
4650
- {
4651
- path: "sales-channels",
4652
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4653
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4654
- handle: {
4655
- breadcrumb: () => t("salesChannels.domain")
4656
- },
4657
- children: [
4658
- {
4659
- path: "",
4660
- lazy: () => import("./sales-channel-list-DUIEWTAO.js"),
4661
- children: [
4662
- {
4663
- path: "create",
4664
- lazy: () => import("./sales-channel-create-WEF7QXKI.js")
4665
- }
4666
- ]
4667
4711
  },
4668
4712
  {
4669
- path: ":id",
4670
- lazy: async () => {
4671
- const { Breadcrumb, loader } = await import("./sales-channel-detail-N5BPVLXT.js");
4672
- return {
4673
- Component: Outlet4,
4674
- loader,
4675
- handle: {
4676
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4677
- }
4678
- };
4713
+ path: "commissions",
4714
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4715
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
4716
+ handle: {
4717
+ breadcrumb: () => t("commissions.domain"),
4718
+ permissions: "commission_rate:read"
4679
4719
  },
4680
4720
  children: [
4681
4721
  {
4682
4722
  path: "",
4683
- lazy: () => import("./sales-channel-detail-N5BPVLXT.js"),
4723
+ lazy: () => import("./commissions-list-VBQOQF2D.js"),
4684
4724
  children: [
4685
4725
  {
4686
- path: "edit",
4687
- lazy: () => import("./sales-channel-edit-CO2V2VER.js")
4726
+ path: "create",
4727
+ handle: { permissions: "commission_rate:create" },
4728
+ lazy: () => import("./commission-rule-create-CDLLQIY4.js")
4688
4729
  },
4689
4730
  {
4690
- path: "add-products",
4691
- lazy: () => import("./sales-channel-add-products-R36XYWPI.js")
4692
- },
4731
+ path: "edit-global",
4732
+ lazy: () => import("./global-commission-edit-JEBLF6CT.js")
4733
+ }
4734
+ ]
4735
+ },
4736
+ {
4737
+ path: ":id",
4738
+ lazy: async () => {
4739
+ const { Breadcrumb } = await import("./commission-rule-detail-LFEZ5U6V.js");
4740
+ return {
4741
+ Component: Outlet4,
4742
+ handle: {
4743
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4744
+ }
4745
+ };
4746
+ },
4747
+ children: [
4693
4748
  {
4694
- path: "metadata/edit",
4695
- lazy: () => import("./sales-channel-metadata-NBWFH4QX.js")
4749
+ path: "",
4750
+ lazy: () => import("./commission-rule-detail-LFEZ5U6V.js"),
4751
+ children: [
4752
+ {
4753
+ path: "edit",
4754
+ handle: { permissions: "commission_rate:update" },
4755
+ lazy: () => import("./commission-rule-edit-5CFKPI7U.js")
4756
+ },
4757
+ {
4758
+ path: "edit-commission",
4759
+ lazy: () => import("./commission-rule-commission-edit-KLGYDUOC.js")
4760
+ }
4761
+ ]
4696
4762
  }
4697
4763
  ]
4698
4764
  }
4699
4765
  ]
4700
- }
4701
- ]
4702
- },
4703
- {
4704
- path: "locations",
4705
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4706
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4707
- handle: {
4708
- breadcrumb: () => t("locations.domain")
4709
- },
4710
- children: [
4711
- {
4712
- path: "",
4713
- lazy: () => import("./location-list-VIAP63HV.js")
4714
- },
4715
- {
4716
- path: "create",
4717
- lazy: () => import("./location-create-XCEPUY44.js")
4718
4766
  },
4719
4767
  {
4720
- path: "shipping-profiles",
4768
+ path: "users",
4769
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4721
4770
  element: /* @__PURE__ */ jsx17(Outlet4, {}),
4722
4771
  handle: {
4723
- breadcrumb: () => t("shippingProfile.domain")
4772
+ breadcrumb: () => t("users.domain"),
4773
+ permissions: "user:read"
4724
4774
  },
4725
4775
  children: [
4726
4776
  {
4727
4777
  path: "",
4728
- lazy: () => import("./shipping-profiles-list-UKD47NUF.js"),
4778
+ lazy: () => import("./user-list-ECF647TZ.js"),
4729
4779
  children: [
4730
4780
  {
4731
- path: "create",
4732
- lazy: () => import("./shipping-profile-create-FT6KK2H5.js")
4781
+ path: "invite",
4782
+ handle: { permissions: "user:create" },
4783
+ lazy: () => import("./user-invite-A7TBRKWI.js")
4733
4784
  }
4734
4785
  ]
4735
4786
  },
4736
4787
  {
4737
- path: ":shipping_profile_id",
4788
+ path: ":id",
4738
4789
  lazy: async () => {
4739
- const { Breadcrumb, loader } = await import("./shipping-profile-detail-KPRFJE4V.js");
4790
+ const { Breadcrumb, loader } = await import("./user-detail-5LOE6QGK.js");
4740
4791
  return {
4741
4792
  Component: Outlet4,
4742
4793
  loader,
@@ -4748,11 +4799,16 @@ function getRouteMap({
4748
4799
  children: [
4749
4800
  {
4750
4801
  path: "",
4751
- lazy: () => import("./shipping-profile-detail-KPRFJE4V.js"),
4802
+ lazy: () => import("./user-detail-5LOE6QGK.js"),
4752
4803
  children: [
4804
+ {
4805
+ path: "edit",
4806
+ handle: { permissions: "user:update" },
4807
+ lazy: () => import("./user-edit-O2M5II52.js")
4808
+ },
4753
4809
  {
4754
4810
  path: "metadata/edit",
4755
- lazy: () => import("./shipping-profile-metadata-S7Z3IC6I.js")
4811
+ lazy: () => import("./user-metadata-2PEU2IJE.js")
4756
4812
  }
4757
4813
  ]
4758
4814
  }
@@ -4761,27 +4817,29 @@ function getRouteMap({
4761
4817
  ]
4762
4818
  },
4763
4819
  {
4764
- path: "shipping-option-types",
4820
+ path: "sales-channels",
4765
4821
  errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4766
4822
  element: /* @__PURE__ */ jsx17(Outlet4, {}),
4767
4823
  handle: {
4768
- breadcrumb: () => t("shippingOptionTypes.domain")
4824
+ breadcrumb: () => t("salesChannels.domain"),
4825
+ permissions: "sales_channel:read"
4769
4826
  },
4770
4827
  children: [
4771
4828
  {
4772
4829
  path: "",
4773
- lazy: () => import("./shipping-option-type-list-R4JPQOAA.js"),
4830
+ lazy: () => import("./sales-channel-list-DUIEWTAO.js"),
4774
4831
  children: [
4775
4832
  {
4776
4833
  path: "create",
4777
- lazy: () => import("./shipping-option-type-create-M23CI42D.js")
4834
+ handle: { permissions: "sales_channel:create" },
4835
+ lazy: () => import("./sales-channel-create-WEF7QXKI.js")
4778
4836
  }
4779
4837
  ]
4780
4838
  },
4781
4839
  {
4782
4840
  path: ":id",
4783
4841
  lazy: async () => {
4784
- const { Breadcrumb, loader } = await import("./shipping-option-type-detail-QIJZQ5WW.js");
4842
+ const { Breadcrumb, loader } = await import("./sales-channel-detail-N5BPVLXT.js");
4785
4843
  return {
4786
4844
  Component: Outlet4,
4787
4845
  loader,
@@ -4793,11 +4851,20 @@ function getRouteMap({
4793
4851
  children: [
4794
4852
  {
4795
4853
  path: "",
4796
- lazy: () => import("./shipping-option-type-detail-QIJZQ5WW.js"),
4854
+ lazy: () => import("./sales-channel-detail-N5BPVLXT.js"),
4797
4855
  children: [
4798
4856
  {
4799
4857
  path: "edit",
4800
- lazy: () => import("./shipping-option-type-edit-WXTEQM32.js")
4858
+ handle: { permissions: "sales_channel:update" },
4859
+ lazy: () => import("./sales-channel-edit-CO2V2VER.js")
4860
+ },
4861
+ {
4862
+ path: "add-products",
4863
+ lazy: () => import("./sales-channel-add-products-R36XYWPI.js")
4864
+ },
4865
+ {
4866
+ path: "metadata/edit",
4867
+ lazy: () => import("./sales-channel-metadata-NBWFH4QX.js")
4801
4868
  }
4802
4869
  ]
4803
4870
  }
@@ -4806,69 +4873,187 @@ function getRouteMap({
4806
4873
  ]
4807
4874
  },
4808
4875
  {
4809
- path: ":location_id",
4810
- lazy: async () => {
4811
- const { Breadcrumb, loader } = await import("./location-detail-TVHDXEV5.js");
4812
- return {
4813
- Component: Outlet4,
4814
- loader,
4815
- handle: {
4816
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4817
- }
4818
- };
4876
+ path: "locations",
4877
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4878
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
4879
+ handle: {
4880
+ breadcrumb: () => t("locations.domain"),
4881
+ permissions: "stock_location:read"
4819
4882
  },
4820
4883
  children: [
4821
4884
  {
4822
4885
  path: "",
4823
- lazy: () => import("./location-detail-TVHDXEV5.js"),
4886
+ lazy: () => import("./location-list-VIAP63HV.js")
4887
+ },
4888
+ {
4889
+ path: "create",
4890
+ handle: { permissions: "stock_location:create" },
4891
+ lazy: () => import("./location-create-XCEPUY44.js")
4892
+ },
4893
+ {
4894
+ path: "shipping-profiles",
4895
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
4896
+ handle: {
4897
+ breadcrumb: () => t("shippingProfile.domain"),
4898
+ permissions: "shipping_profile:read"
4899
+ },
4824
4900
  children: [
4825
4901
  {
4826
- path: "edit",
4827
- lazy: () => import("./location-edit-XRGRJCVB.js")
4902
+ path: "",
4903
+ lazy: () => import("./shipping-profiles-list-AK6KXUGF.js"),
4904
+ children: [
4905
+ {
4906
+ path: "create",
4907
+ handle: { permissions: "shipping_profile:create" },
4908
+ lazy: () => import("./shipping-profile-create-FT6KK2H5.js")
4909
+ }
4910
+ ]
4828
4911
  },
4829
4912
  {
4830
- path: "sales-channels",
4831
- lazy: () => import("./location-sales-channels-UCPVQLCE.js")
4832
- },
4913
+ path: ":shipping_profile_id",
4914
+ lazy: async () => {
4915
+ const { Breadcrumb, loader } = await import("./shipping-profile-detail-KPRFJE4V.js");
4916
+ return {
4917
+ Component: Outlet4,
4918
+ loader,
4919
+ handle: {
4920
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4921
+ }
4922
+ };
4923
+ },
4924
+ children: [
4925
+ {
4926
+ path: "",
4927
+ lazy: () => import("./shipping-profile-detail-KPRFJE4V.js"),
4928
+ children: [
4929
+ {
4930
+ path: "metadata/edit",
4931
+ lazy: () => import("./shipping-profile-metadata-S7Z3IC6I.js")
4932
+ }
4933
+ ]
4934
+ }
4935
+ ]
4936
+ }
4937
+ ]
4938
+ },
4939
+ {
4940
+ path: "shipping-option-types",
4941
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4942
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
4943
+ handle: {
4944
+ breadcrumb: () => t("shippingOptionTypes.domain"),
4945
+ permissions: "shipping_option_type:read"
4946
+ },
4947
+ children: [
4833
4948
  {
4834
- path: "fulfillment-providers",
4835
- lazy: () => import("./location-fulfillment-providers-WBNKJN3G.js")
4949
+ path: "",
4950
+ lazy: () => import("./shipping-option-type-list-VQ5UVOUU.js"),
4951
+ children: [
4952
+ {
4953
+ path: "create",
4954
+ handle: { permissions: "shipping_option_type:create" },
4955
+ lazy: () => import("./shipping-option-type-create-M23CI42D.js")
4956
+ }
4957
+ ]
4836
4958
  },
4837
4959
  {
4838
- path: "fulfillment-set/:fset_id",
4960
+ path: ":id",
4961
+ lazy: async () => {
4962
+ const { Breadcrumb, loader } = await import("./shipping-option-type-detail-QIJZQ5WW.js");
4963
+ return {
4964
+ Component: Outlet4,
4965
+ loader,
4966
+ handle: {
4967
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4968
+ }
4969
+ };
4970
+ },
4839
4971
  children: [
4840
4972
  {
4841
- path: "service-zones/create",
4842
- lazy: () => import("./location-service-zone-create-MAN7KD4N.js")
4843
- },
4844
- {
4845
- path: "service-zone/:zone_id",
4973
+ path: "",
4974
+ lazy: () => import("./shipping-option-type-detail-QIJZQ5WW.js"),
4846
4975
  children: [
4847
4976
  {
4848
4977
  path: "edit",
4849
- lazy: () => import("./location-service-zone-edit-KFG52K4W.js")
4850
- },
4978
+ handle: { permissions: "shipping_option_type:update" },
4979
+ lazy: () => import("./shipping-option-type-edit-WXTEQM32.js")
4980
+ }
4981
+ ]
4982
+ }
4983
+ ]
4984
+ }
4985
+ ]
4986
+ },
4987
+ {
4988
+ path: ":location_id",
4989
+ lazy: async () => {
4990
+ const { Breadcrumb, loader } = await import("./location-detail-TVHDXEV5.js");
4991
+ return {
4992
+ Component: Outlet4,
4993
+ loader,
4994
+ handle: {
4995
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4996
+ }
4997
+ };
4998
+ },
4999
+ children: [
5000
+ {
5001
+ path: "",
5002
+ lazy: () => import("./location-detail-TVHDXEV5.js"),
5003
+ children: [
5004
+ {
5005
+ path: "edit",
5006
+ handle: { permissions: "stock_location:update" },
5007
+ lazy: () => import("./location-edit-XRGRJCVB.js")
5008
+ },
5009
+ {
5010
+ path: "sales-channels",
5011
+ lazy: () => import("./location-sales-channels-UCPVQLCE.js")
5012
+ },
5013
+ {
5014
+ path: "fulfillment-providers",
5015
+ lazy: () => import("./location-fulfillment-providers-WBNKJN3G.js")
5016
+ },
5017
+ {
5018
+ path: "fulfillment-set/:fset_id",
5019
+ children: [
4851
5020
  {
4852
- path: "areas",
4853
- lazy: () => import("./location-service-zone-manage-areas-EZS5PYJI.js")
5021
+ path: "service-zones/create",
5022
+ lazy: () => import("./location-service-zone-create-MAN7KD4N.js")
4854
5023
  },
4855
5024
  {
4856
- path: "shipping-option",
5025
+ path: "service-zone/:zone_id",
4857
5026
  children: [
4858
5027
  {
4859
- path: "create",
4860
- lazy: () => import("./location-service-zone-shipping-option-create-6O2JXV6I.js")
5028
+ path: "edit",
5029
+ handle: { permissions: "stock_location:update" },
5030
+ lazy: () => import("./location-service-zone-edit-KFG52K4W.js")
4861
5031
  },
4862
5032
  {
4863
- path: ":so_id",
5033
+ path: "areas",
5034
+ lazy: () => import("./location-service-zone-manage-areas-EZS5PYJI.js")
5035
+ },
5036
+ {
5037
+ path: "shipping-option",
4864
5038
  children: [
4865
5039
  {
4866
- path: "edit",
4867
- lazy: () => import("./location-service-zone-shipping-option-edit-UUIR7B5S.js")
5040
+ path: "create",
5041
+ handle: { permissions: "shipping_option:create" },
5042
+ lazy: () => import("./location-service-zone-shipping-option-create-6O2JXV6I.js")
4868
5043
  },
4869
5044
  {
4870
- path: "pricing",
4871
- lazy: () => import("./location-service-zone-shipping-option-pricing-Z5HCXRHG.js")
5045
+ path: ":so_id",
5046
+ children: [
5047
+ {
5048
+ path: "edit",
5049
+ handle: { permissions: "shipping_option:update" },
5050
+ lazy: () => import("./location-service-zone-shipping-option-edit-UUIR7B5S.js")
5051
+ },
5052
+ {
5053
+ path: "pricing",
5054
+ lazy: () => import("./location-service-zone-shipping-option-pricing-Z5HCXRHG.js")
5055
+ }
5056
+ ]
4872
5057
  }
4873
5058
  ]
4874
5059
  }
@@ -4881,349 +5066,334 @@ function getRouteMap({
4881
5066
  ]
4882
5067
  }
4883
5068
  ]
4884
- }
4885
- ]
4886
- },
4887
- {
4888
- path: "product-tags",
4889
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4890
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4891
- handle: {
4892
- breadcrumb: () => t("productTags.domain")
4893
- },
4894
- children: [
4895
- {
4896
- path: "",
4897
- lazy: () => import("./product-tag-list-43NFD36I.js"),
4898
- children: [
4899
- {
4900
- path: "create",
4901
- lazy: () => import("./product-tag-create-QORH6X2D.js")
4902
- }
4903
- ]
4904
5069
  },
4905
5070
  {
4906
- path: ":id",
4907
- lazy: async () => {
4908
- const { Breadcrumb, loader } = await import("./product-tag-detail-7P7MI52E.js");
4909
- return {
4910
- Component: Outlet4,
4911
- loader,
4912
- handle: {
4913
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4914
- }
4915
- };
5071
+ path: "product-tags",
5072
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
5073
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5074
+ handle: {
5075
+ breadcrumb: () => t("productTags.domain"),
5076
+ permissions: "product_tag:read"
4916
5077
  },
4917
5078
  children: [
4918
5079
  {
4919
5080
  path: "",
4920
- lazy: () => import("./product-tag-detail-7P7MI52E.js"),
5081
+ lazy: () => import("./product-tag-list-GDIVZYEB.js"),
4921
5082
  children: [
4922
5083
  {
4923
- path: "edit",
4924
- lazy: () => import("./product-tag-edit-JWYVCPCC.js")
4925
- },
4926
- {
4927
- path: "metadata/edit",
4928
- lazy: () => import("./product-tag-metadata-BCUPIIJ5.js")
5084
+ path: "create",
5085
+ handle: { permissions: "product_tag:create" },
5086
+ lazy: () => import("./product-tag-create-QORH6X2D.js")
4929
5087
  }
4930
5088
  ]
4931
- }
4932
- ]
4933
- }
4934
- ]
4935
- },
4936
- {
4937
- path: "attributes",
4938
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4939
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4940
- handle: {
4941
- breadcrumb: () => t("attributes.domain")
4942
- },
4943
- children: [
4944
- {
4945
- path: "",
4946
- lazy: () => import("./attribute-list-6ELFWDHO.js"),
4947
- children: [
5089
+ },
4948
5090
  {
4949
- path: "create",
4950
- lazy: () => import("./attribute-create-GDBDDPLP.js")
5091
+ path: ":id",
5092
+ lazy: async () => {
5093
+ const { Breadcrumb, loader } = await import("./product-tag-detail-2YR6TXZI.js");
5094
+ return {
5095
+ Component: Outlet4,
5096
+ loader,
5097
+ handle: {
5098
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5099
+ }
5100
+ };
5101
+ },
5102
+ children: [
5103
+ {
5104
+ path: "",
5105
+ lazy: () => import("./product-tag-detail-2YR6TXZI.js"),
5106
+ children: [
5107
+ {
5108
+ path: "edit",
5109
+ handle: { permissions: "product_tag:update" },
5110
+ lazy: () => import("./product-tag-edit-JWYVCPCC.js")
5111
+ },
5112
+ {
5113
+ path: "metadata/edit",
5114
+ lazy: () => import("./product-tag-metadata-BCUPIIJ5.js")
5115
+ }
5116
+ ]
5117
+ }
5118
+ ]
4951
5119
  }
4952
5120
  ]
4953
5121
  },
4954
5122
  {
4955
- path: ":id",
4956
- lazy: async () => {
4957
- const { Breadcrumb, loader } = await import("./attribute-detail-673FELNK.js");
4958
- return {
4959
- Component: Outlet4,
4960
- loader,
4961
- handle: {
4962
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
4963
- }
4964
- };
5123
+ path: "attributes",
5124
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
5125
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5126
+ handle: {
5127
+ breadcrumb: () => t("attributes.domain"),
5128
+ permissions: "product_attribute:read"
4965
5129
  },
4966
5130
  children: [
4967
5131
  {
4968
5132
  path: "",
4969
- lazy: () => import("./attribute-detail-673FELNK.js"),
5133
+ lazy: () => import("./attribute-list-PVC4KUYQ.js"),
4970
5134
  children: [
4971
5135
  {
4972
- path: "edit",
4973
- lazy: () => import("./attribute-edit-A2J25SIB.js")
4974
- },
4975
- {
4976
- path: "edit-possible-value",
4977
- lazy: () => import("./attribute-edit-possible-value-SIJS3OVE.js")
4978
- },
4979
- {
4980
- path: "create-possible-value",
4981
- lazy: () => import("./attribute-create-possible-value-OKGWRSNJ.js")
4982
- },
5136
+ path: "create",
5137
+ handle: { permissions: "product_attribute:create" },
5138
+ lazy: () => import("./attribute-create-GDBDDPLP.js")
5139
+ }
5140
+ ]
5141
+ },
5142
+ {
5143
+ path: ":id",
5144
+ lazy: async () => {
5145
+ const { Breadcrumb, loader } = await import("./attribute-detail-673FELNK.js");
5146
+ return {
5147
+ Component: Outlet4,
5148
+ loader,
5149
+ handle: {
5150
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5151
+ }
5152
+ };
5153
+ },
5154
+ children: [
4983
5155
  {
4984
- path: "edit-ranking",
4985
- lazy: () => import("./attribute-edit-ranking-SF7XSICV.js")
5156
+ path: "",
5157
+ lazy: () => import("./attribute-detail-673FELNK.js"),
5158
+ children: [
5159
+ {
5160
+ path: "edit",
5161
+ handle: { permissions: "product_attribute:update" },
5162
+ lazy: () => import("./attribute-edit-A2J25SIB.js")
5163
+ },
5164
+ {
5165
+ path: "edit-possible-value",
5166
+ lazy: () => import("./attribute-edit-possible-value-SIJS3OVE.js")
5167
+ },
5168
+ {
5169
+ path: "create-possible-value",
5170
+ lazy: () => import("./attribute-create-possible-value-OKGWRSNJ.js")
5171
+ },
5172
+ {
5173
+ path: "edit-ranking",
5174
+ lazy: () => import("./attribute-edit-ranking-SF7XSICV.js")
5175
+ }
5176
+ ]
4986
5177
  }
4987
5178
  ]
4988
5179
  }
4989
5180
  ]
4990
- }
4991
- ]
4992
- },
4993
- {
4994
- path: "product-types",
4995
- errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
4996
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
4997
- handle: {
4998
- breadcrumb: () => t("productTypes.domain")
4999
- },
5000
- children: [
5001
- {
5002
- path: "",
5003
- lazy: () => import("./product-type-list-NNNFCCWS.js"),
5004
- children: [
5005
- {
5006
- path: "create",
5007
- lazy: () => import("./product-type-create-BJMYBP2R.js")
5008
- }
5009
- ]
5010
5181
  },
5011
5182
  {
5012
- path: ":id",
5013
- lazy: async () => {
5014
- const { Breadcrumb, loader } = await import("./product-type-detail-P7ZZFBV2.js");
5015
- return {
5016
- Component: Outlet4,
5017
- loader,
5018
- handle: {
5019
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5020
- }
5021
- };
5183
+ path: "product-types",
5184
+ errorElement: /* @__PURE__ */ jsx17(ErrorBoundary, {}),
5185
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5186
+ handle: {
5187
+ breadcrumb: () => t("productTypes.domain"),
5188
+ permissions: "product_type:read"
5022
5189
  },
5023
5190
  children: [
5024
5191
  {
5025
5192
  path: "",
5026
- lazy: () => import("./product-type-detail-P7ZZFBV2.js"),
5193
+ lazy: () => import("./product-type-list-VSCQHI3D.js"),
5027
5194
  children: [
5028
5195
  {
5029
- path: "edit",
5030
- lazy: () => import("./product-type-edit-X7VSBPUG.js")
5031
- },
5032
- {
5033
- path: "metadata/edit",
5034
- lazy: () => import("./product-type-metadata-DKBBQB6R.js")
5196
+ path: "create",
5197
+ handle: { permissions: "product_type:create" },
5198
+ lazy: () => import("./product-type-create-BJMYBP2R.js")
5035
5199
  }
5036
5200
  ]
5037
- }
5038
- ]
5039
- }
5040
- ]
5041
- },
5042
- {
5043
- path: "publishable-api-keys",
5044
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
5045
- handle: {
5046
- breadcrumb: () => t("apiKeyManagement.domain.publishable")
5047
- },
5048
- children: [
5049
- {
5050
- path: "",
5051
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
5052
- children: [
5201
+ },
5053
5202
  {
5054
- path: "",
5055
- lazy: () => import("./api-key-management-list-AHXOCLBO.js"),
5203
+ path: ":id",
5204
+ lazy: async () => {
5205
+ const { Breadcrumb, loader } = await import("./product-type-detail-P7ZZFBV2.js");
5206
+ return {
5207
+ Component: Outlet4,
5208
+ loader,
5209
+ handle: {
5210
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5211
+ }
5212
+ };
5213
+ },
5056
5214
  children: [
5057
5215
  {
5058
- path: "create",
5059
- lazy: () => import("./api-key-management-create-TFG4TLGM.js")
5216
+ path: "",
5217
+ lazy: () => import("./product-type-detail-P7ZZFBV2.js"),
5218
+ children: [
5219
+ {
5220
+ path: "edit",
5221
+ handle: { permissions: "product_type:update" },
5222
+ lazy: () => import("./product-type-edit-X7VSBPUG.js")
5223
+ },
5224
+ {
5225
+ path: "metadata/edit",
5226
+ lazy: () => import("./product-type-metadata-DKBBQB6R.js")
5227
+ }
5228
+ ]
5060
5229
  }
5061
5230
  ]
5062
5231
  }
5063
5232
  ]
5064
5233
  },
5065
5234
  {
5066
- path: ":id",
5067
- lazy: async () => {
5068
- const { Breadcrumb, loader } = await import("./api-key-management-detail-TTGN4LO7.js");
5069
- return {
5070
- Component: Outlet4,
5071
- loader,
5072
- handle: {
5073
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5074
- }
5075
- };
5235
+ path: "publishable-api-keys",
5236
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5237
+ handle: {
5238
+ breadcrumb: () => t("apiKeyManagement.domain.publishable"),
5239
+ permissions: "api_key:read"
5076
5240
  },
5077
5241
  children: [
5078
5242
  {
5079
5243
  path: "",
5080
- lazy: () => import("./api-key-management-detail-TTGN4LO7.js"),
5244
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5081
5245
  children: [
5082
5246
  {
5083
- path: "edit",
5084
- lazy: () => import("./api-key-management-edit-XUZJEML7.js")
5085
- },
5086
- {
5087
- path: "sales-channels",
5088
- lazy: () => import("./api-key-management-sales-channels-FFY3HIOX.js")
5247
+ path: "",
5248
+ lazy: () => import("./api-key-management-list-P4FQQKIV.js"),
5249
+ children: [
5250
+ {
5251
+ path: "create",
5252
+ handle: { permissions: "api_key:create" },
5253
+ lazy: () => import("./api-key-management-create-TFG4TLGM.js")
5254
+ }
5255
+ ]
5089
5256
  }
5090
5257
  ]
5091
- }
5092
- ]
5093
- }
5094
- ]
5095
- },
5096
- {
5097
- path: "secret-api-keys",
5098
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
5099
- handle: {
5100
- breadcrumb: () => t("apiKeyManagement.domain.secret")
5101
- },
5102
- children: [
5103
- {
5104
- path: "",
5105
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
5106
- children: [
5258
+ },
5107
5259
  {
5108
- path: "",
5109
- lazy: () => import("./api-key-management-list-AHXOCLBO.js"),
5260
+ path: ":id",
5261
+ lazy: async () => {
5262
+ const { Breadcrumb, loader } = await import("./api-key-management-detail-TTGN4LO7.js");
5263
+ return {
5264
+ Component: Outlet4,
5265
+ loader,
5266
+ handle: {
5267
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5268
+ }
5269
+ };
5270
+ },
5110
5271
  children: [
5111
5272
  {
5112
- path: "create",
5113
- lazy: () => import("./api-key-management-create-TFG4TLGM.js")
5273
+ path: "",
5274
+ lazy: () => import("./api-key-management-detail-TTGN4LO7.js"),
5275
+ children: [
5276
+ {
5277
+ path: "edit",
5278
+ handle: { permissions: "api_key:update" },
5279
+ lazy: () => import("./api-key-management-edit-XUZJEML7.js")
5280
+ },
5281
+ {
5282
+ path: "sales-channels",
5283
+ lazy: () => import("./api-key-management-sales-channels-FFY3HIOX.js")
5284
+ }
5285
+ ]
5114
5286
  }
5115
5287
  ]
5116
5288
  }
5117
5289
  ]
5118
5290
  },
5119
5291
  {
5120
- path: ":id",
5121
- lazy: async () => {
5122
- const { Breadcrumb, loader } = await import("./api-key-management-detail-TTGN4LO7.js");
5123
- return {
5124
- Component: Outlet4,
5125
- loader,
5126
- handle: {
5127
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5128
- }
5129
- };
5292
+ path: "secret-api-keys",
5293
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5294
+ handle: {
5295
+ breadcrumb: () => t("apiKeyManagement.domain.secret"),
5296
+ permissions: "api_key:read"
5130
5297
  },
5131
5298
  children: [
5132
5299
  {
5133
5300
  path: "",
5134
- lazy: () => import("./api-key-management-detail-TTGN4LO7.js"),
5301
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5135
5302
  children: [
5136
5303
  {
5137
- path: "edit",
5138
- lazy: () => import("./api-key-management-edit-XUZJEML7.js")
5304
+ path: "",
5305
+ lazy: () => import("./api-key-management-list-P4FQQKIV.js"),
5306
+ children: [
5307
+ {
5308
+ path: "create",
5309
+ handle: { permissions: "api_key:create" },
5310
+ lazy: () => import("./api-key-management-create-TFG4TLGM.js")
5311
+ }
5312
+ ]
5139
5313
  }
5140
5314
  ]
5141
- }
5142
- ]
5143
- }
5144
- ]
5145
- },
5146
- {
5147
- path: "tax-regions",
5148
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
5149
- handle: {
5150
- breadcrumb: () => t("taxRegions.domain")
5151
- },
5152
- children: [
5153
- {
5154
- path: "",
5155
- lazy: () => import("./tax-region-list-JC4QYF5B.js"),
5156
- children: [
5315
+ },
5157
5316
  {
5158
- path: "create",
5159
- lazy: () => import("./tax-region-create-P4IKQNTU.js")
5317
+ path: ":id",
5318
+ lazy: async () => {
5319
+ const { Breadcrumb, loader } = await import("./api-key-management-detail-TTGN4LO7.js");
5320
+ return {
5321
+ Component: Outlet4,
5322
+ loader,
5323
+ handle: {
5324
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5325
+ }
5326
+ };
5327
+ },
5328
+ children: [
5329
+ {
5330
+ path: "",
5331
+ lazy: () => import("./api-key-management-detail-TTGN4LO7.js"),
5332
+ children: [
5333
+ {
5334
+ path: "edit",
5335
+ handle: { permissions: "api_key:update" },
5336
+ lazy: () => import("./api-key-management-edit-XUZJEML7.js")
5337
+ }
5338
+ ]
5339
+ }
5340
+ ]
5160
5341
  }
5161
5342
  ]
5162
5343
  },
5163
5344
  {
5164
- path: ":id",
5165
- Component: Outlet4,
5166
- loader: taxRegionLoader,
5345
+ path: "tax-regions",
5346
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5167
5347
  handle: {
5168
- breadcrumb: (match) => /* @__PURE__ */ jsx17(TaxRegionDetailBreadcrumb, { ...match })
5348
+ breadcrumb: () => t("taxRegions.domain"),
5349
+ permissions: "tax_region:read"
5169
5350
  },
5170
5351
  children: [
5171
5352
  {
5172
5353
  path: "",
5173
- lazy: async () => {
5174
- const { Component } = await import("./tax-region-detail-NBRSCKTD.js");
5175
- return {
5176
- Component
5177
- };
5178
- },
5354
+ lazy: () => import("./tax-region-list-TM23Q4HH.js"),
5179
5355
  children: [
5180
5356
  {
5181
- path: "edit",
5182
- lazy: () => import("./tax-region-edit-I27QZZPB.js")
5183
- },
5184
- {
5185
- path: "provinces/create",
5186
- lazy: () => import("./tax-region-province-create-RYNRPGY5.js")
5187
- },
5188
- {
5189
- path: "overrides/create",
5190
- lazy: () => import("./tax-region-tax-override-create-7O3KDBUJ.js")
5191
- },
5192
- {
5193
- path: "overrides/:tax_rate_id/edit",
5194
- lazy: () => import("./tax-region-tax-override-edit-SUL5VZ5D.js")
5195
- },
5196
- {
5197
- path: "tax-rates/create",
5198
- lazy: () => import("./tax-region-tax-rate-create-DLLXVZPG.js")
5199
- },
5200
- {
5201
- path: "tax-rates/:tax_rate_id/edit",
5202
- lazy: () => import("./tax-region-tax-rate-edit-HN5VDJAZ.js")
5203
- },
5204
- {
5205
- path: "metadata/edit",
5206
- lazy: () => import("./tax-region-metadata-6YIZSRLO.js")
5357
+ path: "create",
5358
+ handle: { permissions: "tax_region:create" },
5359
+ lazy: () => import("./tax-region-create-SFRD4AJB.js")
5207
5360
  }
5208
5361
  ]
5209
5362
  },
5210
5363
  {
5211
- path: "provinces/:province_id",
5212
- lazy: async () => {
5213
- const { Breadcrumb, loader } = await import("./tax-region-province-detail-WU5GD7VW.js");
5214
- return {
5215
- Component: Outlet4,
5216
- loader,
5217
- handle: {
5218
- breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5219
- }
5220
- };
5364
+ path: ":id",
5365
+ Component: Outlet4,
5366
+ loader: taxRegionLoader,
5367
+ handle: {
5368
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(TaxRegionDetailBreadcrumb, { ...match })
5221
5369
  },
5222
5370
  children: [
5223
5371
  {
5224
5372
  path: "",
5225
- lazy: () => import("./tax-region-province-detail-WU5GD7VW.js"),
5373
+ lazy: async () => {
5374
+ const { Component } = await import("./tax-region-detail-NBRSCKTD.js");
5375
+ return {
5376
+ Component
5377
+ };
5378
+ },
5226
5379
  children: [
5380
+ {
5381
+ path: "edit",
5382
+ handle: { permissions: "tax_region:update" },
5383
+ lazy: () => import("./tax-region-edit-I27QZZPB.js")
5384
+ },
5385
+ {
5386
+ path: "provinces/create",
5387
+ lazy: () => import("./tax-region-province-create-RYNRPGY5.js")
5388
+ },
5389
+ {
5390
+ path: "overrides/create",
5391
+ lazy: () => import("./tax-region-tax-override-create-XZ5BU2FP.js")
5392
+ },
5393
+ {
5394
+ path: "overrides/:tax_rate_id/edit",
5395
+ lazy: () => import("./tax-region-tax-override-edit-R4EGIUIZ.js")
5396
+ },
5227
5397
  {
5228
5398
  path: "tax-rates/create",
5229
5399
  lazy: () => import("./tax-region-tax-rate-create-DLLXVZPG.js")
@@ -5233,80 +5403,119 @@ function getRouteMap({
5233
5403
  lazy: () => import("./tax-region-tax-rate-edit-HN5VDJAZ.js")
5234
5404
  },
5235
5405
  {
5236
- path: "overrides/create",
5237
- lazy: () => import("./tax-region-tax-override-create-7O3KDBUJ.js")
5238
- },
5406
+ path: "metadata/edit",
5407
+ lazy: () => import("./tax-region-metadata-6YIZSRLO.js")
5408
+ }
5409
+ ]
5410
+ },
5411
+ {
5412
+ path: "provinces/:province_id",
5413
+ lazy: async () => {
5414
+ const { Breadcrumb, loader } = await import("./tax-region-province-detail-WU5GD7VW.js");
5415
+ return {
5416
+ Component: Outlet4,
5417
+ loader,
5418
+ handle: {
5419
+ breadcrumb: (match) => /* @__PURE__ */ jsx17(Breadcrumb, { ...match })
5420
+ }
5421
+ };
5422
+ },
5423
+ children: [
5239
5424
  {
5240
- path: "overrides/:tax_rate_id/edit",
5241
- lazy: () => import("./tax-region-tax-override-edit-SUL5VZ5D.js")
5425
+ path: "",
5426
+ lazy: () => import("./tax-region-province-detail-WU5GD7VW.js"),
5427
+ children: [
5428
+ {
5429
+ path: "tax-rates/create",
5430
+ lazy: () => import("./tax-region-tax-rate-create-DLLXVZPG.js")
5431
+ },
5432
+ {
5433
+ path: "tax-rates/:tax_rate_id/edit",
5434
+ lazy: () => import("./tax-region-tax-rate-edit-HN5VDJAZ.js")
5435
+ },
5436
+ {
5437
+ path: "overrides/create",
5438
+ lazy: () => import("./tax-region-tax-override-create-XZ5BU2FP.js")
5439
+ },
5440
+ {
5441
+ path: "overrides/:tax_rate_id/edit",
5442
+ lazy: () => import("./tax-region-tax-override-edit-R4EGIUIZ.js")
5443
+ }
5444
+ ]
5242
5445
  }
5243
5446
  ]
5244
5447
  }
5245
5448
  ]
5246
5449
  }
5247
5450
  ]
5248
- }
5249
- ]
5250
- },
5251
- {
5252
- path: "return-reasons",
5253
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
5254
- handle: {
5255
- breadcrumb: () => t("returnReasons.domain")
5256
- },
5257
- children: [
5451
+ },
5258
5452
  {
5259
- path: "",
5260
- lazy: () => import("./return-reason-list-A2RABTGP.js"),
5453
+ path: "return-reasons",
5454
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5455
+ handle: {
5456
+ breadcrumb: () => t("returnReasons.domain"),
5457
+ permissions: "return_reason:read"
5458
+ },
5261
5459
  children: [
5262
5460
  {
5263
- path: "create",
5264
- lazy: () => import("./return-reason-create-GNUVNYS5.js")
5265
- },
5266
- {
5267
- path: ":id",
5461
+ path: "",
5462
+ lazy: () => import("./return-reason-list-IQ2JGNEN.js"),
5268
5463
  children: [
5269
5464
  {
5270
- path: "edit",
5271
- lazy: () => import("./return-reason-edit-5ZICBOB3.js")
5465
+ path: "create",
5466
+ handle: { permissions: "return_reason:create" },
5467
+ lazy: () => import("./return-reason-create-GNUVNYS5.js")
5468
+ },
5469
+ {
5470
+ path: ":id",
5471
+ children: [
5472
+ {
5473
+ path: "edit",
5474
+ handle: { permissions: "return_reason:update" },
5475
+ lazy: () => import("./return-reason-edit-5ZICBOB3.js")
5476
+ }
5477
+ ]
5272
5478
  }
5273
5479
  ]
5274
5480
  }
5275
5481
  ]
5276
- }
5277
- ]
5278
- },
5279
- {
5280
- path: "refund-reasons",
5281
- element: /* @__PURE__ */ jsx17(Outlet4, {}),
5282
- handle: {
5283
- breadcrumb: () => t("refundReasons.domain")
5284
- },
5285
- children: [
5482
+ },
5286
5483
  {
5287
- path: "",
5288
- lazy: () => import("./refund-reason-list-R573DHM7.js"),
5484
+ path: "refund-reasons",
5485
+ element: /* @__PURE__ */ jsx17(Outlet4, {}),
5486
+ handle: {
5487
+ breadcrumb: () => t("refundReasons.domain"),
5488
+ permissions: "refund_reason:read"
5489
+ },
5289
5490
  children: [
5290
5491
  {
5291
- path: "create",
5292
- lazy: () => import("./refund-reason-create-P5FUFEGK.js")
5293
- },
5294
- {
5295
- path: ":id",
5492
+ path: "",
5493
+ lazy: () => import("./refund-reason-list-ODOF3ZLM.js"),
5296
5494
  children: [
5297
5495
  {
5298
- path: "edit",
5299
- lazy: () => import("./refund-reason-edit-AKOTWXCE.js")
5496
+ path: "create",
5497
+ handle: { permissions: "refund_reason:create" },
5498
+ lazy: () => import("./refund-reason-create-P5FUFEGK.js")
5499
+ },
5500
+ {
5501
+ path: ":id",
5502
+ children: [
5503
+ {
5504
+ path: "edit",
5505
+ handle: { permissions: "refund_reason:update" },
5506
+ lazy: () => import("./refund-reason-edit-AKOTWXCE.js")
5507
+ }
5508
+ ]
5300
5509
  }
5301
5510
  ]
5302
5511
  }
5303
5512
  ]
5304
5513
  }
5305
- ]
5306
- }
5307
- ],
5308
- customSettingsRoutes?.[0]?.children || []
5309
- )
5514
+ ],
5515
+ customSettingsRoutes?.[0]?.children || []
5516
+ )
5517
+ }
5518
+ ]
5310
5519
  }
5311
5520
  ]
5312
5521
  },
@@ -5322,7 +5531,7 @@ function getRouteMap({
5322
5531
  },
5323
5532
  {
5324
5533
  path: "/reset-password",
5325
- lazy: () => import("./reset-password-7G75C4RO.js")
5534
+ lazy: () => import("./reset-password-BIAORJOF.js")
5326
5535
  },
5327
5536
  {
5328
5537
  path: "/invite",
@@ -5341,17 +5550,17 @@ function getRouteMap({
5341
5550
  }
5342
5551
 
5343
5552
  // src/app.tsx
5344
- import { useMemo as useMemo5 } from "react";
5553
+ import { useMemo as useMemo7 } from "react";
5345
5554
  import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
5346
5555
  function App() {
5347
- const routes = useMemo5(() => {
5556
+ const routes = useMemo7(() => {
5348
5557
  return {
5349
5558
  settingsRoutes: createRouteMap(getRoutesByType(customRoutes, "settings")),
5350
5559
  mainRoutes: createRouteMap(getRoutesByType(customRoutes, "main")),
5351
5560
  publicRoutes: createRouteMap(getRoutesByType(customRoutes, "public"))
5352
5561
  };
5353
5562
  }, []);
5354
- return /* @__PURE__ */ jsx18(TooltipProvider, { children: /* @__PURE__ */ jsx18(HelmetProvider, { children: /* @__PURE__ */ jsx18(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx18(ThemeProvider, { children: /* @__PURE__ */ jsxs11(
5563
+ return /* @__PURE__ */ jsx18(TooltipProvider, { children: /* @__PURE__ */ jsx18(HelmetProvider, { children: /* @__PURE__ */ jsx18(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx18(ThemeProvider, { children: /* @__PURE__ */ jsx18(FeatureFlagProvider, { children: /* @__PURE__ */ jsxs11(
5355
5564
  ExtensionProvider,
5356
5565
  {
5357
5566
  widgets,
@@ -5370,8 +5579,22 @@ function App() {
5370
5579
  /* @__PURE__ */ jsx18(Toaster, {})
5371
5580
  ]
5372
5581
  }
5373
- ) }) }) }) });
5582
+ ) }) }) }) }) });
5374
5583
  }
5584
+
5585
+ // src/index.ts
5586
+ import {
5587
+ PermissionGuard,
5588
+ PermissionsProvider as PermissionsProvider2,
5589
+ PermissionsRequirement,
5590
+ PermissionsRequirementsProvider,
5591
+ RequiredPermissionsSection,
5592
+ RoutePermissionGuard as RoutePermissionGuard2,
5593
+ usePermissions as usePermissions3,
5594
+ useRegisterPermissions,
5595
+ useRequiredPermissions,
5596
+ useResourcePermissions
5597
+ } from "@mercurjs/dashboard-shared";
5375
5598
  export {
5376
5599
  ActionMenu,
5377
5600
  ChipInput,
@@ -5381,11 +5604,21 @@ export {
5381
5604
  Notifications,
5382
5605
  PRODUCT_DETAIL_FIELDS,
5383
5606
  PRODUCT_DETAIL_QUERY,
5607
+ PermissionGuard,
5608
+ PermissionsProvider2 as PermissionsProvider,
5609
+ PermissionsRequirement,
5610
+ PermissionsRequirementsProvider,
5611
+ RequiredPermissionsSection,
5612
+ RoutePermissionGuard2 as RoutePermissionGuard,
5384
5613
  SingleColumnPage,
5385
5614
  SwitchBox,
5386
5615
  TabbedForm,
5387
5616
  App as default,
5388
5617
  defineTabMeta,
5389
5618
  useDataTable,
5619
+ usePermissions3 as usePermissions,
5620
+ useRegisterPermissions,
5621
+ useRequiredPermissions,
5622
+ useResourcePermissions,
5390
5623
  useTabbedForm
5391
5624
  };