@mohasinac/appkit 3.0.0 → 3.0.1

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 (335) hide show
  1. package/dist/_internal/client/features/layout/SidebarCollapseToggle.js +1 -5
  2. package/dist/_internal/server/features/auctions/actions.js +0 -1
  3. package/dist/_internal/server/features/auctions/og.js +0 -1
  4. package/dist/_internal/server/features/auctions/service.js +0 -4
  5. package/dist/_internal/server/features/auth/capabilities.js +0 -1
  6. package/dist/_internal/server/features/blog/actions.js +0 -2
  7. package/dist/_internal/server/features/brands/actions.js +0 -2
  8. package/dist/_internal/server/features/cart/actions.js +0 -3
  9. package/dist/_internal/server/features/checkout/actions.js +11 -20
  10. package/dist/_internal/server/features/events/actions.js +0 -3
  11. package/dist/_internal/server/features/events/og.js +0 -1
  12. package/dist/_internal/server/features/events/service.js +0 -2
  13. package/dist/_internal/server/features/grouped/data.js +0 -2
  14. package/dist/_internal/server/features/orders/actions.js +0 -4
  15. package/dist/_internal/server/features/pre-orders/actions.js +0 -1
  16. package/dist/_internal/server/features/pre-orders/og.js +0 -1
  17. package/dist/_internal/server/features/pre-orders/service.js +0 -1
  18. package/dist/_internal/server/features/products/actions.js +0 -6
  19. package/dist/_internal/server/features/products/service.js +0 -1
  20. package/dist/_internal/server/features/promotions/actions.js +0 -3
  21. package/dist/_internal/server/features/reviews/actions.js +0 -3
  22. package/dist/_internal/server/functions/https.js +0 -6
  23. package/dist/_internal/server/functions/manifest.js +0 -1
  24. package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +1 -1
  25. package/dist/_internal/server/jobs/core/wrapJobHandler.js +0 -1
  26. package/dist/_internal/shared/listing-types/action-tracker.js +1 -1
  27. package/dist/_internal/shared/serialization/index.js +0 -4
  28. package/dist/_internal/shared/styles/themed.js +0 -3
  29. package/dist/client/api/ApiError.js +1 -4
  30. package/dist/client/api/surface-error.js +0 -1
  31. package/dist/client/api/useApiQuery.js +0 -1
  32. package/dist/configs/next.js +0 -1
  33. package/dist/configs/tailwind.js +0 -1
  34. package/dist/contracts/field-ops.js +0 -2
  35. package/dist/core/EventBus.js +0 -2
  36. package/dist/core/Logger.js +0 -6
  37. package/dist/core/Queue.js +0 -2
  38. package/dist/core/hooks/useSyncManager.js +4 -4
  39. package/dist/core/mutation-events.js +0 -1
  40. package/dist/core/newsletter.repository.js +2 -6
  41. package/dist/errors/api-error.js +0 -1
  42. package/dist/errors/authentication-error.js +0 -1
  43. package/dist/errors/authorization-error.js +0 -1
  44. package/dist/errors/base-error.js +1 -3
  45. package/dist/errors/database-error.js +0 -1
  46. package/dist/errors/error-handler.js +1 -5
  47. package/dist/errors/error-mapping.js +1 -6
  48. package/dist/errors/normalize.js +0 -4
  49. package/dist/errors/not-found-error.js +0 -1
  50. package/dist/errors/razorpay-unreachable.js +0 -1
  51. package/dist/errors/validation-error.js +0 -1
  52. package/dist/features/about/components/FAQPageView.js +1 -3
  53. package/dist/features/about/components/FeesView.js +1 -3
  54. package/dist/features/about/components/HelpPageView.js +1 -3
  55. package/dist/features/about/components/PublicProfileView.js +4 -4
  56. package/dist/features/account/components/AddressBook.js +1 -3
  57. package/dist/features/account/components/AddressForm.js +0 -1
  58. package/dist/features/account/components/AddressesIndexListing.js +0 -1
  59. package/dist/features/account/components/MessagesView.js +1 -3
  60. package/dist/features/account/components/NotificationBell.js +3 -14
  61. package/dist/features/account/components/NotificationPreferencesPanel.js +1 -1
  62. package/dist/features/account/components/UserOffersPanel.js +0 -2
  63. package/dist/features/account/components/UserSidebar.js +1 -3
  64. package/dist/features/admin/components/AdminBlogEditorView.js +0 -1
  65. package/dist/features/admin/components/AdminBundleEditorView.js +0 -1
  66. package/dist/features/admin/components/AdminBundlesView.js +0 -1
  67. package/dist/features/admin/components/AdminCarouselEditorView.js +1 -5
  68. package/dist/features/admin/components/AdminCarouselView.js +1 -4
  69. package/dist/features/admin/components/AdminCartsView.js +0 -1
  70. package/dist/features/admin/components/AdminMediaView.js +1 -3
  71. package/dist/features/admin/components/AdminPayoutsView.js +0 -1
  72. package/dist/features/admin/components/AdminProductsView.js +1 -3
  73. package/dist/features/admin/components/AdminSidebar.js +1 -3
  74. package/dist/features/admin/components/AdminSiteSettingsView.js +1 -5
  75. package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -13
  76. package/dist/features/admin/components/DashboardStats.js +1 -7
  77. package/dist/features/admin/components/DataListingView.js +1 -5
  78. package/dist/features/admin/components/DataTable.js +1 -3
  79. package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +1 -3
  80. package/dist/features/admin/components/analytics/AdminStatCard.js +1 -7
  81. package/dist/features/admin/components/analytics/AdminTopProductsTable.js +1 -3
  82. package/dist/features/admin/components/sections/adminSectionsBuildParse.js +0 -5
  83. package/dist/features/admin/hooks/useAdminListingData.js +0 -5
  84. package/dist/features/admin/hooks/useChat.js +0 -3
  85. package/dist/features/admin/repository/chat.repository.js +0 -1
  86. package/dist/features/admin/repository/notification.repository.js +1 -4
  87. package/dist/features/auctions/components/AuctionBidsTable.js +1 -7
  88. package/dist/features/auctions/components/AuctionDetailPageView.js +1 -6
  89. package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -15
  90. package/dist/features/auctions/components/PlaceBidFormClient.js +0 -3
  91. package/dist/features/auctions/repository/bid.repository.js +0 -1
  92. package/dist/features/auth/components/ForgotPasswordView.js +0 -1
  93. package/dist/features/auth/components/LoginForm.js +0 -1
  94. package/dist/features/auth/components/RegisterForm.js +0 -1
  95. package/dist/features/auth/components/ResetPasswordView.js +0 -1
  96. package/dist/features/auth/hooks/useAuth.js +0 -1
  97. package/dist/features/auth/repository/session.repository.js +0 -1
  98. package/dist/features/auth/repository/token.repository.js +0 -2
  99. package/dist/features/auth/repository/user.repository.js +0 -1
  100. package/dist/features/blog/api/[slug]/route.js +1 -1
  101. package/dist/features/blog/components/BlogFeaturedCard.js +1 -5
  102. package/dist/features/blog/components/BlogIndexListing.js +0 -1
  103. package/dist/features/blog/components/BlogListView.js +1 -5
  104. package/dist/features/blog/components/BlogPostView.js +1 -3
  105. package/dist/features/cart/components/CartDrawer.js +2 -6
  106. package/dist/features/cart/repository/cart.repository.js +0 -1
  107. package/dist/features/categories/api/route.js +0 -1
  108. package/dist/features/categories/components/BrandDetailPageView.js +1 -13
  109. package/dist/features/categories/components/BundleDetailView.js +1 -5
  110. package/dist/features/categories/components/BundleItemsPicker.js +1 -5
  111. package/dist/features/categories/components/CategoriesIndexListing.js +0 -1
  112. package/dist/features/categories/components/CategoriesIndexPageView.js +0 -1
  113. package/dist/features/categories/components/CategoryBundlesListing.js +1 -3
  114. package/dist/features/categories/components/CategoryDetailPageView.js +1 -16
  115. package/dist/features/categories/components/CategoryGrid.js +1 -5
  116. package/dist/features/categories/components/CategorySelectorCreate.js +0 -1
  117. package/dist/features/categories/components/CategoryTableColumns.js +2 -6
  118. package/dist/features/categories/components/CategoryTree.js +1 -3
  119. package/dist/features/categories/components/ConcernCard.js +1 -3
  120. package/dist/features/collections/components/CollectionCard.js +1 -5
  121. package/dist/features/contact/email.js +0 -1
  122. package/dist/features/events/actions/event-actions.js +0 -1
  123. package/dist/features/events/api/[id]/route.js +0 -1
  124. package/dist/features/events/components/AdminEventEditorView.js +1 -2
  125. package/dist/features/events/components/EventCard.js +2 -8
  126. package/dist/features/events/components/EventRaffleEntryForm.js +1 -3
  127. package/dist/features/events/components/EventRaffleWinnerView.js +1 -3
  128. package/dist/features/events/components/EventRafflesSection.js +0 -1
  129. package/dist/features/events/components/EventsIndexListing.js +0 -1
  130. package/dist/features/events/hooks/useBulkEvent.js +0 -1
  131. package/dist/features/events/repository/event-entry.repository.js +0 -1
  132. package/dist/features/faq/components/ContactCTA.js +1 -3
  133. package/dist/features/faq/components/FAQAccordion.js +1 -3
  134. package/dist/features/faq/components/FAQCategorySidebar.js +1 -3
  135. package/dist/features/faq/components/RelatedFAQs.js +1 -5
  136. package/dist/features/filters/AsyncFacetSection.js +1 -3
  137. package/dist/features/filters/FilterFacetSection.js +4 -14
  138. package/dist/features/forms/Checkbox.js +1 -3
  139. package/dist/features/forms/Slider.js +1 -3
  140. package/dist/features/history/hooks/useHistory.js +0 -1
  141. package/dist/features/history/repository/user-history.repository.js +0 -2
  142. package/dist/features/homepage/actions/carousel-actions.js +0 -1
  143. package/dist/features/homepage/actions/homepage-section-actions.js +1 -3
  144. package/dist/features/homepage/api/carousel/route.js +0 -1
  145. package/dist/features/homepage/api/route.js +0 -1
  146. package/dist/features/homepage/components/AdSlot.js +3 -9
  147. package/dist/features/homepage/components/AdvertisementBanner.js +2 -12
  148. package/dist/features/homepage/components/BeforeAfterCard.js +1 -5
  149. package/dist/features/homepage/components/CharacterHotspotForm.js +2 -10
  150. package/dist/features/homepage/components/CollectionCardsSection.js +1 -3
  151. package/dist/features/homepage/components/CustomCardsSection.js +1 -5
  152. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -3
  153. package/dist/features/homepage/components/GoogleReviewsSection.js +1 -3
  154. package/dist/features/homepage/components/HeroCarousel.js +5 -26
  155. package/dist/features/homepage/components/HeroSection.js +2 -6
  156. package/dist/features/homepage/components/HowItWorksSection.js +2 -8
  157. package/dist/features/homepage/components/MarketplaceHomepageView.js +0 -8
  158. package/dist/features/homepage/components/NewsletterBanner.js +2 -10
  159. package/dist/features/homepage/components/PromoGrid.js +1 -3
  160. package/dist/features/homepage/components/SecurityHighlightsSection.js +2 -6
  161. package/dist/features/homepage/components/ShopByCategorySection.js +2 -6
  162. package/dist/features/homepage/components/SocialPostCard.js +1 -3
  163. package/dist/features/homepage/components/StatsCounterSection.js +1 -5
  164. package/dist/features/homepage/components/TrustBadges.js +1 -3
  165. package/dist/features/homepage/components/TrustFeaturesSection.js +1 -3
  166. package/dist/features/homepage/components/WelcomeSection.js +2 -16
  167. package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -5
  168. package/dist/features/homepage/lib/social-feed-fetcher.js +0 -8
  169. package/dist/features/layout/AppLayoutShell.js +1 -3
  170. package/dist/features/layout/BottomNavbar.js +1 -11
  171. package/dist/features/media/MediaAudio.js +2 -6
  172. package/dist/features/media/MediaImage.js +0 -1
  173. package/dist/features/media/MediaLightbox.js +3 -9
  174. package/dist/features/media/MediaVideo.js +2 -8
  175. package/dist/features/media/upload/MediaUploadField.js +1 -3
  176. package/dist/features/messages/hooks/useConversation.js +0 -2
  177. package/dist/features/messages/hooks/useConversations.js +0 -1
  178. package/dist/features/messages/repository/conversations.repository.js +0 -1
  179. package/dist/features/orders/api/track/[trackingId]/route.js +0 -1
  180. package/dist/features/orders/components/OrdersList.js +1 -3
  181. package/dist/features/orders/components/RefundHistoryTable.js +1 -3
  182. package/dist/features/orders/repository/orders.repository.js +0 -2
  183. package/dist/features/payments/repository/payout.repository.js +0 -1
  184. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +2 -6
  185. package/dist/features/pre-orders/components/PreOrderActionsClient.js +0 -1
  186. package/dist/features/pre-orders/components/PreOrderBadge.js +1 -3
  187. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +1 -5
  188. package/dist/features/products/api/route.js +1 -3
  189. package/dist/features/products/components/CompareOverlay.js +1 -6
  190. package/dist/features/products/components/FeatureBadge.js +1 -3
  191. package/dist/features/products/components/MakeOfferButton.js +0 -2
  192. package/dist/features/products/components/MarketplaceBundleCard.js +1 -3
  193. package/dist/features/products/components/MarketplacePrizeDrawCard.js +1 -3
  194. package/dist/features/products/components/PrizeDrawDetailPageView.js +0 -2
  195. package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -3
  196. package/dist/features/products/components/PrizeDrawsSection.js +1 -3
  197. package/dist/features/products/components/ProductDetailPageView.js +0 -6
  198. package/dist/features/products/components/ProductFeatureBadges.js +1 -3
  199. package/dist/features/products/components/ProductFeaturesSelector.js +0 -1
  200. package/dist/features/products/components/ProductGrid.js +5 -15
  201. package/dist/features/products/components/ShareButton.js +1 -1
  202. package/dist/features/products/components/ShowGroupSection.js +3 -7
  203. package/dist/features/products/components/SublistingCarouselSection.js +2 -4
  204. package/dist/features/products/repository/product-features.repository.js +0 -1
  205. package/dist/features/products/repository/products.repository.js +0 -1
  206. package/dist/features/promotions/components/CouponCard.js +2 -5
  207. package/dist/features/promotions/repository/coupons.repository.js +0 -1
  208. package/dist/features/reviews/api/route.js +0 -1
  209. package/dist/features/reviews/components/ReviewDetailShell.js +3 -13
  210. package/dist/features/reviews/components/ReviewModal.js +1 -5
  211. package/dist/features/reviews/components/ReviewSummary.js +2 -6
  212. package/dist/features/reviews/components/ReviewsIndexListing.js +0 -1
  213. package/dist/features/reviews/components/ReviewsList.js +1 -7
  214. package/dist/features/reviews/repository/reviews.repository.js +0 -3
  215. package/dist/features/scams/actions/scam-actions.js +1 -1
  216. package/dist/features/scams/components/ScamProfileView.js +1 -3
  217. package/dist/features/search/components/Search.js +2 -8
  218. package/dist/features/search/components/SearchFiltersRow.js +1 -3
  219. package/dist/features/seller/components/PhysicalLocationModal.js +1 -5
  220. package/dist/features/seller/components/SellerAddressesView.js +1 -6
  221. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -4
  222. package/dist/features/seller/components/SellerBidsView.js +1 -3
  223. package/dist/features/seller/components/SellerBundlesView.js +0 -1
  224. package/dist/features/seller/components/SellerCouponEditorView.js +1 -3
  225. package/dist/features/seller/components/SellerFeaturesView.js +0 -1
  226. package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
  227. package/dist/features/seller/components/SellerLiveView.js +1 -3
  228. package/dist/features/seller/components/SellerOffersPanel.js +0 -2
  229. package/dist/features/seller/components/SellerOrdersView.js +1 -6
  230. package/dist/features/seller/components/SellerPayoutMethodsView.js +0 -1
  231. package/dist/features/seller/components/SellerPayoutRequestView.js +1 -1
  232. package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
  233. package/dist/features/seller/components/SellerProductShell.js +2 -4
  234. package/dist/features/seller/components/SellerProductsCards.js +1 -3
  235. package/dist/features/seller/components/SellerProductsView.js +1 -7
  236. package/dist/features/seller/components/SellerReviewsView.js +1 -4
  237. package/dist/features/seller/components/SellerShippingConfigsView.js +1 -4
  238. package/dist/features/seller/components/SellerShippingView.js +1 -1
  239. package/dist/features/seller/components/SellerSidebar.js +4 -12
  240. package/dist/features/seller/components/SellerStoreCategoriesView.js +0 -2
  241. package/dist/features/seller/components/SellerTemplatesView.js +0 -1
  242. package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -3
  243. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -3
  244. package/dist/features/seller/hooks/useSellerListingData.js +0 -5
  245. package/dist/features/seller/repository/offer.repository.js +0 -1
  246. package/dist/features/shell/FormShell.js +2 -15
  247. package/dist/features/shell/QuickFormDrawer.js +1 -5
  248. package/dist/features/site-settings/components/NavPermissionsManager.js +1 -3
  249. package/dist/features/site-settings/components/ThemeManagerView.js +0 -1
  250. package/dist/features/stores/api/[storeSlug]/reviews/route.js +0 -1
  251. package/dist/features/stores/components/StoreHeader.js +1 -7
  252. package/dist/features/stores/components/StoreReviewsListing.js +0 -1
  253. package/dist/features/stores/components/StoresIndexListing.js +0 -1
  254. package/dist/features/stores/repository/store.repository.js +0 -2
  255. package/dist/features/support/repository/support.repository.js +0 -1
  256. package/dist/features/wishlist/components/WishlistPage.js +1 -3
  257. package/dist/features/wishlist/hooks/useWishlistCount.js +1 -1
  258. package/dist/features/wishlist/repository/user-wishlist.repository.js +0 -2
  259. package/dist/http/ApiClient.js +4 -12
  260. package/dist/index.js +0 -1
  261. package/dist/monitoring/client-logger.js +7 -22
  262. package/dist/monitoring/error-tracking.js +0 -1
  263. package/dist/monitoring/performance.js +0 -1
  264. package/dist/monitoring/server-logger.js +11 -33
  265. package/dist/next/api/api-response.js +1 -4
  266. package/dist/next/api/apiHandler.js +1 -5
  267. package/dist/next/api/errorHandler.js +0 -3
  268. package/dist/next/api/parseJsonBody.js +0 -1
  269. package/dist/next/api/routeHandler.js +1 -6
  270. package/dist/next/cache-middleware.js +1 -3
  271. package/dist/next/middleware/chain.js +0 -1
  272. package/dist/next/middleware/pii-scrubber.js +0 -2
  273. package/dist/providers/auth-firebase/provider.js +0 -1
  274. package/dist/providers/db-firebase/admin.js +0 -1
  275. package/dist/providers/db-firebase/base.js +0 -4
  276. package/dist/providers/db-firebase/base.repository.js +0 -3
  277. package/dist/providers/db-firebase/field-ops.js +0 -2
  278. package/dist/providers/db-firebase/helpers.js +0 -4
  279. package/dist/providers/db-firebase/realtime.js +3 -15
  280. package/dist/providers/db-firebase/sieve.js +2 -8
  281. package/dist/providers/payment-razorpay/index.js +0 -3
  282. package/dist/providers/shipping-shiprocket/index.js +0 -1
  283. package/dist/providers/storage-firebase/client.js +0 -4
  284. package/dist/react/contexts/SessionContext.js +0 -1
  285. package/dist/react/hooks/useCountdown.js +0 -1
  286. package/dist/security/authorization.js +0 -1
  287. package/dist/security/pii-encrypt.js +0 -4
  288. package/dist/security/pii-redact.js +0 -3
  289. package/dist/seed/manifest.js +1 -6
  290. package/dist/seed/runner.js +0 -2
  291. package/dist/ui/DataTable.js +2 -6
  292. package/dist/ui/components/Anchor.js +0 -1
  293. package/dist/ui/components/AvatarDisplay.js +1 -3
  294. package/dist/ui/components/BackgroundRenderer.js +2 -6
  295. package/dist/ui/components/BaseListingCard.js +0 -1
  296. package/dist/ui/components/Button.js +0 -3
  297. package/dist/ui/components/Card.js +2 -6
  298. package/dist/ui/components/Details.js +2 -8
  299. package/dist/ui/components/Dialog.js +0 -1
  300. package/dist/ui/components/FallbackShell.js +5 -17
  301. package/dist/ui/components/Fieldset.js +2 -6
  302. package/dist/ui/components/HorizontalRule.js +0 -1
  303. package/dist/ui/components/HotspotMarker.js +1 -3
  304. package/dist/ui/components/IconBox.js +0 -1
  305. package/dist/ui/components/Iframe.js +0 -1
  306. package/dist/ui/components/ImageGallery.js +1 -3
  307. package/dist/ui/components/ImageLightbox.js +1 -5
  308. package/dist/ui/components/Kbd.js +0 -1
  309. package/dist/ui/components/Motion.js +1 -3
  310. package/dist/ui/components/NavbarChevron.js +0 -1
  311. package/dist/ui/components/PasswordStrengthIndicator.js +1 -3
  312. package/dist/ui/components/Progress.js +2 -6
  313. package/dist/ui/components/Quote.js +1 -4
  314. package/dist/ui/components/Responsive.js +0 -4
  315. package/dist/ui/components/RowActionMenu.js +1 -3
  316. package/dist/ui/components/Scrim.js +0 -1
  317. package/dist/ui/components/SiteLogo.js +1 -9
  318. package/dist/ui/components/Skeleton.js +1 -3
  319. package/dist/ui/components/Slider.js +1 -3
  320. package/dist/ui/components/StickyToolbar.js +0 -1
  321. package/dist/ui/components/TabStrip.js +1 -3
  322. package/dist/ui/components/Toast.js +1 -3
  323. package/dist/ui/components/Tooltip.js +1 -4
  324. package/dist/ui/components/UnsavedChangesModal.js +1 -3
  325. package/dist/ui/rich-text/RichText.js +1 -1
  326. package/dist/utils/action-response.js +0 -1
  327. package/dist/utils/date.formatter.js +0 -1
  328. package/dist/utils/object.helper.js +0 -2
  329. package/dist/utils/schema-ui.js +1 -3
  330. package/dist/validation/input.validator.js +0 -1
  331. package/dist/validation/schemas.js +1 -3
  332. package/package.json +5 -2
  333. package/scripts/bundle-css.mjs +47 -0
  334. package/scripts/copy-assets.mjs +34 -0
  335. package/scripts/dedupe-peer-deps.mjs +81 -0
@@ -67,9 +67,7 @@ const TEXT_ALIGN_OPTIONS = [
67
67
  // ── Zone Picker ──────────────────────────────────────────────────────────────
68
68
  function ZonePicker({ selected, onChange, disabled, }) {
69
69
  const zones = [1, 2, 3, 4, 5, 6];
70
- return (_jsxs(Div, { children: [_jsx(Text, { className: "mb-1", color: "muted", size: "xs", children: "Zone (row \u00D7 col grid)" }), _jsx("div", { className: "grid gap-1",
71
- // audit-inline-style-ok: dynamic CSS
72
- style: { gridTemplateRows: "repeat(2, 1fr)", gridTemplateColumns: "repeat(3, 1fr)", width: 150 }, children: zones.map((z) => {
70
+ return (_jsxs(Div, { children: [_jsx(Text, { className: "mb-1", color: "muted", size: "xs", children: "Zone (row \u00D7 col grid)" }), _jsx("div", { className: "grid gap-1", style: { gridTemplateRows: "repeat(2, 1fr)", gridTemplateColumns: "repeat(3, 1fr)", width: 150 }, children: zones.map((z) => {
73
71
  const isDisabled = disabled?.(z) ?? false;
74
72
  return (_jsx("button", { type: "button", disabled: isDisabled, onClick: () => !isDisabled && onChange(z), className: `rounded text-xs font-mono py-2 border transition-colors ${selected === z
75
73
  ? "bg-primary text-white border-primary"
@@ -144,10 +142,8 @@ export function AdminCarouselEditorView({ slideId, onSaved, onDeleted, onCancel,
144
142
  const s = d.settings;
145
143
  setHeight(s?.height ?? "tall");
146
144
  setAutoplayDelayMs(s?.autoplayDelayMs !== undefined ? String(s.autoplayDelayMs) : "4000");
147
- // audit-unknown-ok: TS structural escape — CarouselBackground
148
145
  if (d.background)
149
146
  setBackground(d.background);
150
- // audit-unknown-ok: TS structural escape — CarouselCard
151
147
  if (Array.isArray(d.cards))
152
148
  setCards(d.cards);
153
149
  const ov = d.overlay;
@@ -103,9 +103,7 @@ export function AdminCarouselView({ children, onBulkDelete, ...props }) {
103
103
  }
104
104
  const displayRows = (localRows.length > 0 ? localRows : fetchedRows).map((row) => ({
105
105
  ...row,
106
- secondary: (_jsxs(Row, { align: "center", gap: "3", children: [row.thumbnailUrl && (_jsx("img", { src: row.thumbnailUrl, alt: "", className: "w-14 h-9 object-cover rounded flex-shrink-0 bg-zinc-200 dark:bg-zinc-800" })), _jsx(Span, { size: "sm", className: "truncate", color: "muted", children: row.secondary })] })
107
- // audit-unknown-ok: TS structural escape — primitive cast
108
- ),
106
+ secondary: (_jsxs(Row, { align: "center", gap: "3", children: [row.thumbnailUrl && (_jsx("img", { src: row.thumbnailUrl, alt: "", className: "w-14 h-9 object-cover rounded flex-shrink-0 bg-zinc-200 dark:bg-zinc-800" })), _jsx(Span, { size: "sm", className: "truncate", color: "muted", children: row.secondary })] })),
109
107
  }));
110
108
  const columns = [
111
109
  {
@@ -121,7 +119,6 @@ export function AdminCarouselView({ children, onBulkDelete, ...props }) {
121
119
  {
122
120
  key: "secondary",
123
121
  header: "Details",
124
- // audit-unknown-ok: TS structural escape — DOM/JSX node
125
122
  render: (row) => row.secondary,
126
123
  },
127
124
  {
@@ -23,7 +23,6 @@ const ADMIN_CARTS_CONFIG = {
23
23
  ],
24
24
  mapRows: (response) => toRecordArray(response.items).map((item, index) => {
25
25
  const isGuest = !item.userId;
26
- // audit-unknown-ok: TS structural escape
27
26
  const itemCount = Array.isArray(item.items) ? item.items.length : 0;
28
27
  const sessionShort = toStringValue(item.sessionId, "").slice(0, 8);
29
28
  return {
@@ -67,9 +67,7 @@ function MediaBrowser({ onCopy }) {
67
67
  const isImage = (f.contentType ?? "").startsWith("image/");
68
68
  return (_jsxs(Div, { className: "group overflow-hidden", surface: "muted", rounded: "lg", border: "default", children: [_jsx(Row, { color: "muted", textSize: "xs", className: "aspect-square", surface: "subtle", align: "center", justify: "center", children: isImage ? (
69
69
  // eslint-disable-next-line @next/next/no-img-element
70
- _jsx("img", { src: f.downloadURL, alt: f.name, className: "h-full w-full object-cover", loading: "lazy" })) : (
71
- // audit-variant-ok: file label — px-2 horizontal nudge + break-all; Text lacks paddingX variant
72
- _jsx(Text, { align: "center", className: "px-2 break-all", children: f.contentType ?? "file" })) }), _jsxs(Div, { className: "p-1.5", children: [_jsx(Text, { className: "truncate text-[10px] font-mono", color: "muted", children: f.name.split("/").pop() }), _jsx(Button, { type: "button", variant: "ghost", textSize: "xs", className: "mt-1 w-full", onClick: () => onCopy(f.downloadURL), children: ACTIONS.MEDIA["copy-url"].label })] })] }, f.name));
70
+ _jsx("img", { src: f.downloadURL, alt: f.name, className: "h-full w-full object-cover", loading: "lazy" })) : (_jsx(Text, { align: "center", className: "px-2 break-all", children: f.contentType ?? "file" })) }), _jsxs(Div, { className: "p-1.5", children: [_jsx(Text, { className: "truncate text-[10px] font-mono", color: "muted", children: f.name.split("/").pop() }), _jsx(Button, { type: "button", variant: "ghost", textSize: "xs", className: "mt-1 w-full", onClick: () => onCopy(f.downloadURL), children: ACTIONS.MEDIA["copy-url"].label })] })] }, f.name));
73
71
  }), filtered.length === 0 && !isLoading && (_jsx(Text, { paddingY: "lg", className: "col-span-full", color: "muted", size: "sm", align: "center", children: "No files found." }))] }), _jsxs(Row, { align: "center", justify: "between", children: [_jsxs(Text, { size: "xs", color: "muted", children: [filtered.length, " file(s)", nextPageToken ? " · more available" : ""] }), nextPageToken && (_jsx(Button, { type: "button", variant: "outline", onClick: () => void load(nextPageToken), disabled: isLoading, children: isLoading ? "Loading…" : "Load more" }))] })] }));
74
72
  }
75
73
  function MediaUploaderPanel({ onUpload, isUploadPending, isCleanupPending, heroAssetUrl, setHeroAssetUrl, galleryAssets, setGalleryAssets, stagedUrls, setHeroStagedUrls, setGalleryStagedUrls, handleAbort, copiedUrl, onCopy, onClearPreviews, onDiscardStaged, }) {
@@ -40,7 +40,6 @@ export function AdminPayoutsView({ children, ...props }) {
40
40
  });
41
41
  const handleExportCsv = async () => {
42
42
  try {
43
- // audit-form-mutation-hook-ok: CSV download — returns binary blob, not a form submit
44
43
  const res = await fetch(ADMIN_ENDPOINTS.PAYOUTS_EXPORT);
45
44
  if (!res.ok)
46
45
  throw new Error("Export failed");
@@ -68,9 +68,7 @@ export function AdminProductsView({ children, ...props }) {
68
68
  showToast(err?.message ?? "Failed to update product.", "error");
69
69
  }
70
70
  }, [showToast, overrides]);
71
- const handleQuickEdit = useCallback(
72
- // audit-unknown-ok: QuickEditMenu values passthrough
73
- async (id, values) => {
71
+ const handleQuickEdit = useCallback(async (id, values) => {
74
72
  const prev = overrides[id];
75
73
  setOverrides((o) => ({ ...o, [id]: { ...o[id], ...values } }));
76
74
  try {
@@ -47,9 +47,7 @@ export function AdminSidebar({ renderNavItems, renderHeader, renderFooter, activ
47
47
  const mobileNavContent = groups ? (_jsx(GroupsContent, { groups: groups, activePath: activePath, onItemClick: close })) : (_jsxs(Nav, { "aria-label": "Admin sidebar", padding: "y-sm", children: [renderHeader?.(), renderNavItems?.(activePath), renderFooter?.()] }));
48
48
  if (variant === "sidebar") {
49
49
  const handleToggle = onToggle ?? close;
50
- return (_jsxs(_Fragment, { children: [desktopOpen && (_jsx(Div, { surface: "overlay-xs", className: "hidden md:block fixed inset-0 backdrop-blur-[2px] z-30", onClick: handleToggle, "aria-hidden": "true" })), _jsxs(Div, { className: "hidden md:flex fixed left-0 z-40 transition-transform duration-300",
51
- // audit-inline-style-ok: dynamic CSS
52
- style: {
50
+ return (_jsxs(_Fragment, { children: [desktopOpen && (_jsx(Div, { surface: "overlay-xs", className: "hidden md:block fixed inset-0 backdrop-blur-[2px] z-30", onClick: handleToggle, "aria-hidden": "true" })), _jsxs(Div, { className: "hidden md:flex fixed left-0 z-40 transition-transform duration-300", style: {
53
51
  top: "var(--header-height, 3.5rem)",
54
52
  height: "calc(100vh - var(--header-height, 3.5rem))",
55
53
  width: "18rem",
@@ -182,7 +182,6 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
182
182
  setFontFamily(s.appearance?.fontFamily ?? "inter");
183
183
  const themeBlock = s.theme;
184
184
  setThemeRegistry({
185
- // audit-unknown-ok: TS structural escape — ThemeManagerValue
186
185
  themes: (themeBlock?.themes ?? []),
187
186
  defaultLightThemeId: themeBlock?.defaultLightThemeId ?? DEFAULT_LIGHT_THEME.id,
188
187
  defaultDarkThemeId: themeBlock?.defaultDarkThemeId ?? DEFAULT_DARK_THEME.id,
@@ -298,7 +297,6 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
298
297
  }));
299
298
  const themeMutation = useSave("Themes", () => ({
300
299
  theme: {
301
- // audit-unknown-ok: TS structural escape — domain document type lacks index signature
302
300
  themes: themeRegistry.themes,
303
301
  defaultLightThemeId: themeRegistry.defaultLightThemeId,
304
302
  defaultDarkThemeId: themeRegistry.defaultDarkThemeId,
@@ -402,9 +400,7 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
402
400
  ].map(([value, label]) => (_jsx(TabsTrigger, { value: value, children: label }, value))) }), _jsx(TabsContent, { value: "about", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); aboutMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Override the About page hero and mission text. Leave blank to use the platform defaults." }), _jsx(Input, { label: "Hero title", value: aboutTitle, onChange: (e) => setAboutTitle(e.target.value), placeholder: "About LetItRip" }), _jsx(Input, { label: "Hero subtitle", value: aboutSubtitle, onChange: (e) => setAboutSubtitle(e.target.value), placeholder: "Connecting buyers, sellers, and bidders in one vibrant marketplace" }), _jsx(Input, { label: "Mission section title", value: aboutMissionTitle, onChange: (e) => setAboutMissionTitle(e.target.value), placeholder: "Our Mission" }), _jsxs(_Fragment, { children: [_jsx(Text, { className: "mb-1", color: "muted", size: "sm", weight: "medium", children: "Mission text" }), _jsx("textarea", { value: aboutMissionText, onChange: (e) => setAboutMissionText(e.target.value), placeholder: "LetItRip was built to democratise commerce\u2026", rows: 4, className: CLS_TEXTAREA })] }), _jsx(Input, { label: "CTA banner title", value: aboutCtaTitle, onChange: (e) => setAboutCtaTitle(e.target.value), placeholder: "Ready to get started?" }), _jsx(GroupSaveButton, { isPending: aboutMutation.isPending })] }) }), _jsx(TabsContent, { value: "branding", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); brandingMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Input, { label: "Site name", value: siteName, onChange: (e) => setSiteName(e.target.value), placeholder: "LetItRip" }), _jsx(Input, { label: "Tagline", value: tagline, onChange: (e) => setTagline(e.target.value), placeholder: "India's Largest Collectibles Marketplace" }), _jsx(ImageUpload, { label: "Logo", currentImage: logoUrl, onUpload: (file) => upload(file, "store"), onChange: setLogoUrl }), _jsx(ImageUpload, { label: "Favicon", currentImage: faviconUrl, onUpload: (file) => upload(file, "store"), onChange: setFaviconUrl }), _jsxs(Stack, { gap: "sm", rounded: "lg", border: "default", padding: "md", children: [_jsx(Toggle, { label: "Maintenance mode", checked: maintenanceMode, onChange: setMaintenanceMode }), _jsx(Input, { label: "Maintenance message", value: maintenanceMessage, onChange: (e) => setMaintenanceMessage(e.target.value), placeholder: "We're back soon.", disabled: !maintenanceMode })] }), _jsx(GroupSaveButton, { isPending: brandingMutation.isPending })] }) }), _jsx(TabsContent, { value: "appearance", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); appearanceMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsxs(Grid, { gap: "md", className: "grid-cols-3", children: [_jsxs(Stack, { gap: "none", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", className: "mb-1", children: "Primary color" }), _jsx("input", { type: "color", value: primaryColor || "#000000", onChange: (e) => setPrimaryColor(e.target.value), className: "h-10 w-full rounded border border-zinc-200 dark:border-zinc-700 cursor-pointer" })] }), _jsxs(Stack, { gap: "none", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", className: "mb-1", children: "Secondary color" }), _jsx("input", { type: "color", value: secondaryColor || "#000000", onChange: (e) => setSecondaryColor(e.target.value), className: "h-10 w-full rounded border border-zinc-200 dark:border-zinc-700 cursor-pointer" })] }), _jsxs(Stack, { gap: "none", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", className: "mb-1", children: "Accent color" }), _jsx("input", { type: "color", value: accentColor || "#000000", onChange: (e) => setAccentColor(e.target.value), className: "h-10 w-full rounded border border-zinc-200 dark:border-zinc-700 cursor-pointer" })] })] }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Select, { label: "Default theme", options: THEME_OPTIONS, value: defaultTheme, onValueChange: setDefaultTheme }), _jsx(Select, { label: "Font family", options: FONT_OPTIONS, value: fontFamily, onValueChange: setFontFamily })] }), _jsx(GroupSaveButton, { isPending: appearanceMutation.isPending })] }) }), _jsx(TabsContent, { value: "themes", children: _jsxs(Form, { onSubmit: (e) => {
403
401
  e.preventDefault();
404
402
  themeMutation.mutate();
405
- }, className: "pt-4", spacing: "md", children: [_jsx(ThemeManagerView, { value: themeRegistry, onChange: setThemeRegistry, previewOrigin: "/" }), _jsx(GroupSaveButton, { isPending: themeMutation.isPending })] }) }), _jsx(TabsContent, { value: "announcement", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); announcementMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Toggle, { label: "Show announcement bar", checked: announcementEnabled, onChange: setAnnouncementEnabled }), _jsx(Input, { label: "Announcement text", value: announcementText, onChange: (e) => setAnnouncementText(e.target.value), placeholder: "\uD83C\uDF89 Free shipping on orders \u20B9999+", disabled: !announcementEnabled }), _jsx(Input, { label: "Link URL (optional)", value: announcementLink, onChange: (e) => setAnnouncementLink(e.target.value), placeholder: "/products", disabled: !announcementEnabled }), _jsxs(Stack, { gap: "none", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", className: "mb-1", children: "Background color" }), _jsx("input", { type: "color", value: announcementBg || "#1d4ed8", onChange: (e) => setAnnouncementBg(e.target.value), className: "h-10 w-32 rounded border border-zinc-200 dark:border-zinc-700 cursor-pointer", disabled: !announcementEnabled })] }), _jsx(GroupSaveButton, { isPending: announcementMutation.isPending })] }) }), _jsx(TabsContent, { value: "seo", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); seoMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Input, { label: "Default meta title", value: seoTitle, onChange: (e) => setSeoTitle(e.target.value), placeholder: "LetItRip \u2014 Buy, Sell & Auction Collectibles in India", maxLength: 60, helperText: "Max 60 chars. Use {page} token for dynamic insertion." }), _jsx(Input, { label: "Default meta description", value: seoDescription, onChange: (e) => setSeoDescription(e.target.value), placeholder: "India's largest collectibles marketplace\u2026", maxLength: 160, helperText: "Max 160 chars." }), _jsx(ImageUpload, { label: "Default OG image", currentImage: seoOgImage, onUpload: (file) => upload(file, "store"), onChange: setSeoOgImage }), _jsx(Input, { label: "Canonical base URL", value: canonicalUrl, onChange: (e) => setCanonicalUrl(e.target.value), placeholder: "https://letitrip.in" }), _jsx(Toggle, { label: "Robots noindex (disables search indexing \u2014 use carefully)", checked: seoNoIndex, onChange: setSeoNoIndex }), _jsx(GroupSaveButton, { isPending: seoMutation.isPending })] }) }), _jsx(TabsContent, { value: "contact", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); contactMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Support email", value: supportEmail, onChange: (e) => setSupportEmail(e.target.value), type: "email", placeholder: "support@letitrip.in" }), _jsx(Input, { label: "Support phone", value: supportPhone, onChange: (e) => setSupportPhone(e.target.value), placeholder: "+91 XXXXX XXXXX" })] }), _jsx(Input, { label: "Physical address", value: supportAddress, onChange: (e) => setSupportAddress(e.target.value), placeholder: "Mumbai, Maharashtra, India" }), _jsx(Input, { label: "Support hours", value: supportHours, onChange: (e) => setSupportHours(e.target.value), placeholder: "Mon\u2013Fri, 10 AM \u2013 6 PM IST" }), _jsx(Text, { className: "pt-2", color: "muted", size: "sm", weight: "medium", children: "Social links" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Instagram URL", value: instagram, onChange: (e) => setInstagram(e.target.value), placeholder: "https://instagram.com/letitrip" }), _jsx(Input, { label: "Twitter / X URL", value: twitter, onChange: (e) => setTwitter(e.target.value), placeholder: "https://twitter.com/letitrip" }), _jsx(Input, { label: "Facebook URL", value: facebook, onChange: (e) => setFacebook(e.target.value), placeholder: "https://facebook.com/letitrip" }), _jsx(Input, { label: "YouTube URL", value: youtube, onChange: (e) => setYoutube(e.target.value), placeholder: "https://youtube.com/@letitrip" }), _jsx(Input, { label: "WhatsApp number", value: whatsapp, onChange: (e) => setWhatsapp(e.target.value), placeholder: "+91XXXXXXXXXX" }), _jsx(Input, { label: "LinkedIn URL", value: linkedin, onChange: (e) => setLinkedin(e.target.value), placeholder: "https://linkedin.com/company/letitrip" }), _jsx(Input, { label: "Pinterest URL", value: pinterest, onChange: (e) => setPinterest(e.target.value), placeholder: "https://pinterest.com/letitrip" })] }), _jsx(GroupSaveButton, { isPending: contactMutation.isPending })] }) }), _jsx(TabsContent, { value: "watermark", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); watermarkMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Select, { label: "Watermark type", options: [{ label: "Text", value: "text" }, { label: "Image", value: "image" }], value: watermarkType, onValueChange: (v) => setWatermarkType(v) }), watermarkType === "text" ? (_jsx(Input, { label: "Watermark text", value: watermarkText, onChange: (e) => setWatermarkText(e.target.value), placeholder: "letitrip.in" })) : (_jsx(ImageUpload, { label: "Watermark image", currentImage: watermarkImageUrl, onUpload: (file) => upload(file, "store"), onChange: setWatermarkImageUrl })), _jsx(Slider, { label: `Size — ${watermarkSize}% of image width`, value: watermarkSize, onChange: setWatermarkSize, min: 5, max: 100, step: 5 }), _jsx(Slider, { label: `Opacity — ${watermarkOpacity}%`, value: watermarkOpacity, onChange: setWatermarkOpacity, min: 5, max: 100, step: 5 }), _jsxs(Stack, { gap: "xs", surface: "muted", rounded: "lg", border: "default", padding: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Preview (text watermark only)" }), _jsx(Row, { surface: "default", justify: "end", align: "end", className: `relative h-32 ${__O.hidden}`, rounded: "default", children: _jsx(Span, { weight: "medium", className: "select-none p-2", color: "faint",
406
- // audit-inline-style-ok: computed pixel offset
407
- style: { fontSize: `${Math.max(10, watermarkSize / 5)}px`, opacity: watermarkOpacity / 100 }, children: watermarkText }) })] }), _jsx(GroupSaveButton, { isPending: watermarkMutation.isPending })] }) }), _jsx(TabsContent, { value: "fees", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); feesMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Platform fee \u2014 our cut (%)", helperText: "% charged on order value. Buyer pays this.", value: String(platformFeePercent), onChange: (e) => setPlatformFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "GST on platform fee (%)", helperText: "Applied to our fee only (not full order). Usually 18%.", value: String(gstPercent), onChange: (e) => setGstPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "Razorpay gateway cost (%)", helperText: "Gateway's own fee \u2014 absorbed by platform, not passed through.", value: String(gatewayFeePercent), onChange: (e) => setGatewayFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 10, step: 0.01 }), _jsx(Input, { label: "Minimum transaction fee (\u20B9)", helperText: "Per-transaction floor. Total charge will never be below base + this.", value: String(minimumTransactionFee), onChange: (e) => setMinimumTransactionFee(parseFloat(e.target.value) || 0), type: "number", min: 0, step: 0.01 }), _jsx(Input, { label: "Seller payout hold (days)", value: String(payoutHoldDays), onChange: (e) => setPayoutHoldDays(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Minimum payout amount (\u20B9)", value: String(minPayoutAmount), onChange: (e) => setMinPayoutAmount(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Auction listing fee (\u20B9)", value: String(auctionListingFee), onChange: (e) => setAuctionListingFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Pre-order listing fee (\u20B9)", value: String(preOrderListingFee), onChange: (e) => setPreOrderListingFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Featured slot fee (\u20B9)", value: String(featuredSlotFee), onChange: (e) => setFeaturedSlotFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Promoted slot fee (\u20B9)", value: String(promotedSlotFee), onChange: (e) => setPromotedSlotFee(parseInt(e.target.value) || 0), type: "number", min: 0 })] }), _jsx(GroupSaveButton, { isPending: feesMutation.isPending })] }) }), _jsx(TabsContent, { value: "integrations", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); integrationsMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Keys are masked in transit and stored encrypted. Click Reveal to view." }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Razorpay" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Razorpay Key ID", value: razorpayKeyId, onChange: setRazorpayKeyId, placeholder: "rzp_live_\u2026" }), _jsx(MaskedInput, { label: "Razorpay Secret", value: razorpaySecret, onChange: setRazorpaySecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Shiprocket" }), _jsx(MaskedInput, { label: "Shiprocket API token", value: shiprocketToken, onChange: setShiprocketToken, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "SMTP / Email" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "SMTP host", value: smtpHost, onChange: (e) => setSmtpHost(e.target.value), placeholder: "smtp.sendgrid.net" }), _jsx(Input, { label: "SMTP port", value: smtpPort, onChange: (e) => setSmtpPort(e.target.value), type: "number", placeholder: "587" }), _jsx(Input, { label: "SMTP user", value: smtpUser, onChange: (e) => setSmtpUser(e.target.value), placeholder: "apikey" }), _jsx(MaskedInput, { label: "SMTP password", value: smtpPassword, onChange: setSmtpPassword, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] }), _jsx(Input, { label: "From address", value: smtpFrom, onChange: (e) => setSmtpFrom(e.target.value), placeholder: "noreply@letitrip.in", type: "email" })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Analytics & Tracking" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Google Analytics ID", value: gaMeasurementId, onChange: (e) => setGaMeasurementId(e.target.value), placeholder: "G-XXXXXXXXXX" }), _jsx(Input, { label: "Facebook Pixel ID", value: fbPixelId, onChange: (e) => setFbPixelId(e.target.value), placeholder: "XXXXXXXXXXXXXXXX" }), _jsx(Input, { label: "GTM Container ID", value: gtmContainerId, onChange: (e) => setGtmContainerId(e.target.value), placeholder: "GTM-XXXXXXX" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Meta (Instagram & Facebook Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Used by the Social Feed section to fetch Instagram and Facebook posts via Meta Graph API v19." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Page Access Token", value: metaPageAccessToken, onChange: setMetaPageAccessToken, placeholder: "EAAxxxxxxx\u2026" }), _jsx(Input, { label: "Page ID (or handle)", value: metaPageId, onChange: (e) => setMetaPageId(e.target.value), placeholder: "letitrip" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "TikTok for Developers (Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Client credentials + long-lived access token from TikTok for Developers. Used to list your account's public videos." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Client Key", value: tiktokClientKey, onChange: setTiktokClientKey, placeholder: "aw\u2026" }), _jsx(MaskedInput, { label: "Client Secret", value: tiktokClientSecret, onChange: setTiktokClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(MaskedInput, { label: "Access Token (long-lived)", value: tiktokAccessToken, onChange: setTiktokAccessToken, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "DeviantArt OAuth2 (Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Client credentials for DeviantArt gallery fetching (client-credentials OAuth2 flow \u2014 no user login required)." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Client ID", value: deviantartClientId, onChange: setDeviantartClientId, placeholder: "1234" }), _jsx(MaskedInput, { label: "Client Secret", value: deviantartClientSecret, onChange: setDeviantartClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsx(GroupSaveButton, { isPending: integrationsMutation.isPending })] }) }), _jsx(TabsContent, { value: "shipping", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); shippingMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Input, { label: "Free shipping threshold (\u20B9)", value: String(freeShippingThreshold), onChange: (e) => setFreeShippingThreshold(parseInt(e.target.value) || 0), type: "number", min: 0, helperText: "Orders above this amount get free shipping." }), _jsx(Toggle, { label: "Cash on delivery (COD) enabled", checked: codEnabled, onChange: setCodEnabled }), _jsx(Select, { label: "Default carrier", options: CARRIER_OPTIONS, value: defaultCarrier, onValueChange: setDefaultCarrier }), _jsx(Input, { label: "Max delivery radius (km, 0 = no limit)", value: String(maxDeliveryRadius), onChange: (e) => setMaxDeliveryRadius(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(GroupSaveButton, { isPending: shippingMutation.isPending })] }) }), _jsx(TabsContent, { value: "auction", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); auctionMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Input, { label: "Minimum bid increment (\u20B9)", value: String(minBidIncrement), onChange: (e) => setMinBidIncrement(parseInt(e.target.value) || 0), type: "number", min: 1, helperText: "Global default \u2014 individual auctions may override." }), _jsx(Input, { label: "Auto-extend window (minutes before end)", value: String(autoExtendWindow), onChange: (e) => setAutoExtendWindow(parseInt(e.target.value) || 0), type: "number", min: 0, helperText: "Extend auction end time if a bid arrives within this window." }), _jsx(Input, { label: "Settlement grace period (hours)", value: String(settlementGrace), onChange: (e) => setSettlementGrace(parseInt(e.target.value) || 0), type: "number", min: 1, helperText: "Time winner has to pay before the auction is re-listed." }), _jsx(GroupSaveButton, { isPending: auctionMutation.isPending })] }) }), _jsx(TabsContent, { value: "limits", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); limitsMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Max products per store", value: String(maxProductsPerStore), onChange: (e) => setMaxProductsPerStore(parseInt(e.target.value) || 0), type: "number", min: 1 }), _jsx(Input, { label: "Max images per product", value: String(maxImagesPerProduct), onChange: (e) => setMaxImagesPerProduct(parseInt(e.target.value) || 0), type: "number", min: 1 }), _jsx(Input, { label: "Max video size (MB)", value: String(maxVideoSizeMb), onChange: (e) => setMaxVideoSizeMb(parseInt(e.target.value) || 0), type: "number", min: 1 }), _jsx(Input, { label: "Max custom fields per product", value: String(maxCustomFields), onChange: (e) => setMaxCustomFields(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Max custom sections per product", value: String(maxCustomSections), onChange: (e) => setMaxCustomSections(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Order cancellation window (hours)", value: String(orderCancelWindow), onChange: (e) => setOrderCancelWindow(parseInt(e.target.value) || 0), type: "number", min: 0 })] }), _jsx(GroupSaveButton, { isPending: limitsMutation.isPending })] }) }), _jsx(TabsContent, { value: "whatsapp", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); whatsappMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Platform-level WhatsApp Business Cloud API credentials. Used for automated purchase announcements to admin numbers when orders are placed. Store owners configure their own credentials in Store \u2192 WhatsApp." }), _jsx(Input, { label: "Phone Number ID", value: waPhoneNumberId, onChange: (e) => setWaPhoneNumberId(e.target.value), placeholder: "987654321098765", helperText: "From Meta for Developers \u2192 App \u2192 WhatsApp \u2192 API Setup" }), _jsx(MaskedInput, { label: "Cloud API System User Token", value: waCloudApiToken, onChange: setWaCloudApiToken, placeholder: "EAAxxxxxxxx\u2026", helperText: "Long-lived system user access token with WhatsApp Business permissions" }), _jsx(Input, { label: "Admin Notify Numbers", value: waAdminNotifyNumbers, onChange: (e) => setWaAdminNotifyNumbers(e.target.value), placeholder: "919876543210,918765432109", helperText: "Comma-separated, digits-only, include country code. These receive a WhatsApp message when any order is placed." }), _jsx(GroupSaveButton, { isPending: whatsappMutation.isPending })] }) }), _jsx(TabsContent, { value: "notifications", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); notifChannelsMutation.mutate(); }, className: "pt-4", spacing: "lg", children: [_jsx(Text, { size: "xs", color: "muted", children: "In-app notifications are always on. Enable external channels below to let the platform fan out to email, WhatsApp, or SMS. Users can further restrict which types they receive." }), _jsxs(Stack, { gap: "xs", surface: "muted", rounded: "lg", border: "default", padding: "md", children: [_jsxs(Row, { justify: "between", gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "In-app (notification bell)" }), _jsx(Span, { color: "success", surface: "success-surface", size: "xs", weight: "semibold", rounded: "full", padding: "pill-xs", children: "Always on" })] }), _jsx(Text, { size: "xs", color: "muted", children: "Displayed in the notification bell and inbox. Cannot be disabled." })] }), _jsxs(Stack, { gap: "md", rounded: "lg", border: "default", padding: "md", children: [_jsx(Toggle, { label: "Email notifications", checked: notifEmailEnabled, onChange: setNotifEmailEnabled }), notifEmailEnabled && (_jsxs(Stack, { gap: "md", className: NOTIF_CHANNEL_INDENT, children: [_jsx(Select, { label: "Minimum priority to send email", options: PRIORITY_OPTIONS, value: notifEmailMinPriority, onValueChange: setNotifEmailMinPriority }), _jsx(Text, { size: "xs", weight: "medium", color: "muted", className: "pt-1", children: "Resend API (for transactional email)" }), _jsx(MaskedInput, { label: "Resend API Key", value: resendApiKey, onChange: setResendApiKey, placeholder: "re_live_\u2026", helperText: "Get your key at resend.com \u2014 used for all transactional notifications." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "From email", value: notifFromEmail, onChange: (e) => setNotifFromEmail(e.target.value), placeholder: "noreply@letitrip.in", type: "email" }), _jsx(Input, { label: "From name", value: notifFromName, onChange: (e) => setNotifFromName(e.target.value), placeholder: "LetItRip" })] })] }))] }), _jsxs(Stack, { gap: "md", rounded: "lg", border: "default", padding: "md", children: [_jsx(Toggle, { label: "WhatsApp notifications", checked: notifWhatsappEnabled, onChange: setNotifWhatsappEnabled }), notifWhatsappEnabled && (_jsxs(Stack, { gap: "md", className: NOTIF_CHANNEL_INDENT, children: [_jsx(Select, { label: "Minimum priority to send WhatsApp", options: PRIORITY_OPTIONS, value: notifWhatsappMinPriority, onValueChange: setNotifWhatsappMinPriority }), _jsx(Toggle, { label: "Enable WhatsApp OTP (for login and verification)", checked: notifWhatsappOtpEnabled, onChange: setNotifWhatsappOtpEnabled }), _jsx(Text, { size: "xs", color: "muted", children: "WhatsApp credentials are configured in the WhatsApp tab (\u246C). OTP messages use the same phone number." })] }))] }), _jsxs(Stack, { gap: "md", rounded: "lg", border: "default", padding: "md", children: [_jsx(Toggle, { label: "SMS notifications", checked: notifSmsEnabled, onChange: setNotifSmsEnabled }), notifSmsEnabled && (_jsxs(Stack, { gap: "md", className: NOTIF_CHANNEL_INDENT, children: [_jsx(Select, { label: "Minimum priority to send SMS", options: PRIORITY_OPTIONS, value: notifSmsMinPriority, onValueChange: setNotifSmsMinPriority }), _jsx(Text, { size: "xs", color: "muted", children: "SMS gateway credentials (e.g. Twilio, MSG91) can be configured in the Integrations tab once an SMS provider is connected." })] }))] }), _jsx(GroupSaveButton, { isPending: notifChannelsMutation.isPending })] }) }), _jsx(TabsContent, { value: "legal", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); legalMutation.mutate(); }, className: "pt-4", spacing: "md", children: [[
403
+ }, className: "pt-4", spacing: "md", children: [_jsx(ThemeManagerView, { value: themeRegistry, onChange: setThemeRegistry, previewOrigin: "/" }), _jsx(GroupSaveButton, { isPending: themeMutation.isPending })] }) }), _jsx(TabsContent, { value: "announcement", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); announcementMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Toggle, { label: "Show announcement bar", checked: announcementEnabled, onChange: setAnnouncementEnabled }), _jsx(Input, { label: "Announcement text", value: announcementText, onChange: (e) => setAnnouncementText(e.target.value), placeholder: "\uD83C\uDF89 Free shipping on orders \u20B9999+", disabled: !announcementEnabled }), _jsx(Input, { label: "Link URL (optional)", value: announcementLink, onChange: (e) => setAnnouncementLink(e.target.value), placeholder: "/products", disabled: !announcementEnabled }), _jsxs(Stack, { gap: "none", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", className: "mb-1", children: "Background color" }), _jsx("input", { type: "color", value: announcementBg || "#1d4ed8", onChange: (e) => setAnnouncementBg(e.target.value), className: "h-10 w-32 rounded border border-zinc-200 dark:border-zinc-700 cursor-pointer", disabled: !announcementEnabled })] }), _jsx(GroupSaveButton, { isPending: announcementMutation.isPending })] }) }), _jsx(TabsContent, { value: "seo", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); seoMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Input, { label: "Default meta title", value: seoTitle, onChange: (e) => setSeoTitle(e.target.value), placeholder: "LetItRip \u2014 Buy, Sell & Auction Collectibles in India", maxLength: 60, helperText: "Max 60 chars. Use {page} token for dynamic insertion." }), _jsx(Input, { label: "Default meta description", value: seoDescription, onChange: (e) => setSeoDescription(e.target.value), placeholder: "India's largest collectibles marketplace\u2026", maxLength: 160, helperText: "Max 160 chars." }), _jsx(ImageUpload, { label: "Default OG image", currentImage: seoOgImage, onUpload: (file) => upload(file, "store"), onChange: setSeoOgImage }), _jsx(Input, { label: "Canonical base URL", value: canonicalUrl, onChange: (e) => setCanonicalUrl(e.target.value), placeholder: "https://letitrip.in" }), _jsx(Toggle, { label: "Robots noindex (disables search indexing \u2014 use carefully)", checked: seoNoIndex, onChange: setSeoNoIndex }), _jsx(GroupSaveButton, { isPending: seoMutation.isPending })] }) }), _jsx(TabsContent, { value: "contact", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); contactMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Support email", value: supportEmail, onChange: (e) => setSupportEmail(e.target.value), type: "email", placeholder: "support@letitrip.in" }), _jsx(Input, { label: "Support phone", value: supportPhone, onChange: (e) => setSupportPhone(e.target.value), placeholder: "+91 XXXXX XXXXX" })] }), _jsx(Input, { label: "Physical address", value: supportAddress, onChange: (e) => setSupportAddress(e.target.value), placeholder: "Mumbai, Maharashtra, India" }), _jsx(Input, { label: "Support hours", value: supportHours, onChange: (e) => setSupportHours(e.target.value), placeholder: "Mon\u2013Fri, 10 AM \u2013 6 PM IST" }), _jsx(Text, { className: "pt-2", color: "muted", size: "sm", weight: "medium", children: "Social links" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Instagram URL", value: instagram, onChange: (e) => setInstagram(e.target.value), placeholder: "https://instagram.com/letitrip" }), _jsx(Input, { label: "Twitter / X URL", value: twitter, onChange: (e) => setTwitter(e.target.value), placeholder: "https://twitter.com/letitrip" }), _jsx(Input, { label: "Facebook URL", value: facebook, onChange: (e) => setFacebook(e.target.value), placeholder: "https://facebook.com/letitrip" }), _jsx(Input, { label: "YouTube URL", value: youtube, onChange: (e) => setYoutube(e.target.value), placeholder: "https://youtube.com/@letitrip" }), _jsx(Input, { label: "WhatsApp number", value: whatsapp, onChange: (e) => setWhatsapp(e.target.value), placeholder: "+91XXXXXXXXXX" }), _jsx(Input, { label: "LinkedIn URL", value: linkedin, onChange: (e) => setLinkedin(e.target.value), placeholder: "https://linkedin.com/company/letitrip" }), _jsx(Input, { label: "Pinterest URL", value: pinterest, onChange: (e) => setPinterest(e.target.value), placeholder: "https://pinterest.com/letitrip" })] }), _jsx(GroupSaveButton, { isPending: contactMutation.isPending })] }) }), _jsx(TabsContent, { value: "watermark", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); watermarkMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Select, { label: "Watermark type", options: [{ label: "Text", value: "text" }, { label: "Image", value: "image" }], value: watermarkType, onValueChange: (v) => setWatermarkType(v) }), watermarkType === "text" ? (_jsx(Input, { label: "Watermark text", value: watermarkText, onChange: (e) => setWatermarkText(e.target.value), placeholder: "letitrip.in" })) : (_jsx(ImageUpload, { label: "Watermark image", currentImage: watermarkImageUrl, onUpload: (file) => upload(file, "store"), onChange: setWatermarkImageUrl })), _jsx(Slider, { label: `Size — ${watermarkSize}% of image width`, value: watermarkSize, onChange: setWatermarkSize, min: 5, max: 100, step: 5 }), _jsx(Slider, { label: `Opacity — ${watermarkOpacity}%`, value: watermarkOpacity, onChange: setWatermarkOpacity, min: 5, max: 100, step: 5 }), _jsxs(Stack, { gap: "xs", surface: "muted", rounded: "lg", border: "default", padding: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Preview (text watermark only)" }), _jsx(Row, { surface: "default", justify: "end", align: "end", className: `relative h-32 ${__O.hidden}`, rounded: "default", children: _jsx(Span, { weight: "medium", className: "select-none p-2", color: "faint", style: { fontSize: `${Math.max(10, watermarkSize / 5)}px`, opacity: watermarkOpacity / 100 }, children: watermarkText }) })] }), _jsx(GroupSaveButton, { isPending: watermarkMutation.isPending })] }) }), _jsx(TabsContent, { value: "fees", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); feesMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Platform fee \u2014 our cut (%)", helperText: "% charged on order value. Buyer pays this.", value: String(platformFeePercent), onChange: (e) => setPlatformFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "GST on platform fee (%)", helperText: "Applied to our fee only (not full order). Usually 18%.", value: String(gstPercent), onChange: (e) => setGstPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "Razorpay gateway cost (%)", helperText: "Gateway's own fee \u2014 absorbed by platform, not passed through.", value: String(gatewayFeePercent), onChange: (e) => setGatewayFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 10, step: 0.01 }), _jsx(Input, { label: "Minimum transaction fee (\u20B9)", helperText: "Per-transaction floor. Total charge will never be below base + this.", value: String(minimumTransactionFee), onChange: (e) => setMinimumTransactionFee(parseFloat(e.target.value) || 0), type: "number", min: 0, step: 0.01 }), _jsx(Input, { label: "Seller payout hold (days)", value: String(payoutHoldDays), onChange: (e) => setPayoutHoldDays(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Minimum payout amount (\u20B9)", value: String(minPayoutAmount), onChange: (e) => setMinPayoutAmount(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Auction listing fee (\u20B9)", value: String(auctionListingFee), onChange: (e) => setAuctionListingFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Pre-order listing fee (\u20B9)", value: String(preOrderListingFee), onChange: (e) => setPreOrderListingFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Featured slot fee (\u20B9)", value: String(featuredSlotFee), onChange: (e) => setFeaturedSlotFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Promoted slot fee (\u20B9)", value: String(promotedSlotFee), onChange: (e) => setPromotedSlotFee(parseInt(e.target.value) || 0), type: "number", min: 0 })] }), _jsx(GroupSaveButton, { isPending: feesMutation.isPending })] }) }), _jsx(TabsContent, { value: "integrations", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); integrationsMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Keys are masked in transit and stored encrypted. Click Reveal to view." }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Razorpay" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Razorpay Key ID", value: razorpayKeyId, onChange: setRazorpayKeyId, placeholder: "rzp_live_\u2026" }), _jsx(MaskedInput, { label: "Razorpay Secret", value: razorpaySecret, onChange: setRazorpaySecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Shiprocket" }), _jsx(MaskedInput, { label: "Shiprocket API token", value: shiprocketToken, onChange: setShiprocketToken, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "SMTP / Email" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "SMTP host", value: smtpHost, onChange: (e) => setSmtpHost(e.target.value), placeholder: "smtp.sendgrid.net" }), _jsx(Input, { label: "SMTP port", value: smtpPort, onChange: (e) => setSmtpPort(e.target.value), type: "number", placeholder: "587" }), _jsx(Input, { label: "SMTP user", value: smtpUser, onChange: (e) => setSmtpUser(e.target.value), placeholder: "apikey" }), _jsx(MaskedInput, { label: "SMTP password", value: smtpPassword, onChange: setSmtpPassword, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] }), _jsx(Input, { label: "From address", value: smtpFrom, onChange: (e) => setSmtpFrom(e.target.value), placeholder: "noreply@letitrip.in", type: "email" })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Analytics & Tracking" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Google Analytics ID", value: gaMeasurementId, onChange: (e) => setGaMeasurementId(e.target.value), placeholder: "G-XXXXXXXXXX" }), _jsx(Input, { label: "Facebook Pixel ID", value: fbPixelId, onChange: (e) => setFbPixelId(e.target.value), placeholder: "XXXXXXXXXXXXXXXX" }), _jsx(Input, { label: "GTM Container ID", value: gtmContainerId, onChange: (e) => setGtmContainerId(e.target.value), placeholder: "GTM-XXXXXXX" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Meta (Instagram & Facebook Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Used by the Social Feed section to fetch Instagram and Facebook posts via Meta Graph API v19." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Page Access Token", value: metaPageAccessToken, onChange: setMetaPageAccessToken, placeholder: "EAAxxxxxxx\u2026" }), _jsx(Input, { label: "Page ID (or handle)", value: metaPageId, onChange: (e) => setMetaPageId(e.target.value), placeholder: "letitrip" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "TikTok for Developers (Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Client credentials + long-lived access token from TikTok for Developers. Used to list your account's public videos." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Client Key", value: tiktokClientKey, onChange: setTiktokClientKey, placeholder: "aw\u2026" }), _jsx(MaskedInput, { label: "Client Secret", value: tiktokClientSecret, onChange: setTiktokClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(MaskedInput, { label: "Access Token (long-lived)", value: tiktokAccessToken, onChange: setTiktokAccessToken, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "DeviantArt OAuth2 (Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Client credentials for DeviantArt gallery fetching (client-credentials OAuth2 flow \u2014 no user login required)." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Client ID", value: deviantartClientId, onChange: setDeviantartClientId, placeholder: "1234" }), _jsx(MaskedInput, { label: "Client Secret", value: deviantartClientSecret, onChange: setDeviantartClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsx(GroupSaveButton, { isPending: integrationsMutation.isPending })] }) }), _jsx(TabsContent, { value: "shipping", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); shippingMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Input, { label: "Free shipping threshold (\u20B9)", value: String(freeShippingThreshold), onChange: (e) => setFreeShippingThreshold(parseInt(e.target.value) || 0), type: "number", min: 0, helperText: "Orders above this amount get free shipping." }), _jsx(Toggle, { label: "Cash on delivery (COD) enabled", checked: codEnabled, onChange: setCodEnabled }), _jsx(Select, { label: "Default carrier", options: CARRIER_OPTIONS, value: defaultCarrier, onValueChange: setDefaultCarrier }), _jsx(Input, { label: "Max delivery radius (km, 0 = no limit)", value: String(maxDeliveryRadius), onChange: (e) => setMaxDeliveryRadius(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(GroupSaveButton, { isPending: shippingMutation.isPending })] }) }), _jsx(TabsContent, { value: "auction", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); auctionMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Input, { label: "Minimum bid increment (\u20B9)", value: String(minBidIncrement), onChange: (e) => setMinBidIncrement(parseInt(e.target.value) || 0), type: "number", min: 1, helperText: "Global default \u2014 individual auctions may override." }), _jsx(Input, { label: "Auto-extend window (minutes before end)", value: String(autoExtendWindow), onChange: (e) => setAutoExtendWindow(parseInt(e.target.value) || 0), type: "number", min: 0, helperText: "Extend auction end time if a bid arrives within this window." }), _jsx(Input, { label: "Settlement grace period (hours)", value: String(settlementGrace), onChange: (e) => setSettlementGrace(parseInt(e.target.value) || 0), type: "number", min: 1, helperText: "Time winner has to pay before the auction is re-listed." }), _jsx(GroupSaveButton, { isPending: auctionMutation.isPending })] }) }), _jsx(TabsContent, { value: "limits", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); limitsMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Max products per store", value: String(maxProductsPerStore), onChange: (e) => setMaxProductsPerStore(parseInt(e.target.value) || 0), type: "number", min: 1 }), _jsx(Input, { label: "Max images per product", value: String(maxImagesPerProduct), onChange: (e) => setMaxImagesPerProduct(parseInt(e.target.value) || 0), type: "number", min: 1 }), _jsx(Input, { label: "Max video size (MB)", value: String(maxVideoSizeMb), onChange: (e) => setMaxVideoSizeMb(parseInt(e.target.value) || 0), type: "number", min: 1 }), _jsx(Input, { label: "Max custom fields per product", value: String(maxCustomFields), onChange: (e) => setMaxCustomFields(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Max custom sections per product", value: String(maxCustomSections), onChange: (e) => setMaxCustomSections(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Order cancellation window (hours)", value: String(orderCancelWindow), onChange: (e) => setOrderCancelWindow(parseInt(e.target.value) || 0), type: "number", min: 0 })] }), _jsx(GroupSaveButton, { isPending: limitsMutation.isPending })] }) }), _jsx(TabsContent, { value: "whatsapp", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); whatsappMutation.mutate(); }, className: "pt-4", spacing: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Platform-level WhatsApp Business Cloud API credentials. Used for automated purchase announcements to admin numbers when orders are placed. Store owners configure their own credentials in Store \u2192 WhatsApp." }), _jsx(Input, { label: "Phone Number ID", value: waPhoneNumberId, onChange: (e) => setWaPhoneNumberId(e.target.value), placeholder: "987654321098765", helperText: "From Meta for Developers \u2192 App \u2192 WhatsApp \u2192 API Setup" }), _jsx(MaskedInput, { label: "Cloud API System User Token", value: waCloudApiToken, onChange: setWaCloudApiToken, placeholder: "EAAxxxxxxxx\u2026", helperText: "Long-lived system user access token with WhatsApp Business permissions" }), _jsx(Input, { label: "Admin Notify Numbers", value: waAdminNotifyNumbers, onChange: (e) => setWaAdminNotifyNumbers(e.target.value), placeholder: "919876543210,918765432109", helperText: "Comma-separated, digits-only, include country code. These receive a WhatsApp message when any order is placed." }), _jsx(GroupSaveButton, { isPending: whatsappMutation.isPending })] }) }), _jsx(TabsContent, { value: "notifications", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); notifChannelsMutation.mutate(); }, className: "pt-4", spacing: "lg", children: [_jsx(Text, { size: "xs", color: "muted", children: "In-app notifications are always on. Enable external channels below to let the platform fan out to email, WhatsApp, or SMS. Users can further restrict which types they receive." }), _jsxs(Stack, { gap: "xs", surface: "muted", rounded: "lg", border: "default", padding: "md", children: [_jsxs(Row, { justify: "between", gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "In-app (notification bell)" }), _jsx(Span, { color: "success", surface: "success-surface", size: "xs", weight: "semibold", rounded: "full", padding: "pill-xs", children: "Always on" })] }), _jsx(Text, { size: "xs", color: "muted", children: "Displayed in the notification bell and inbox. Cannot be disabled." })] }), _jsxs(Stack, { gap: "md", rounded: "lg", border: "default", padding: "md", children: [_jsx(Toggle, { label: "Email notifications", checked: notifEmailEnabled, onChange: setNotifEmailEnabled }), notifEmailEnabled && (_jsxs(Stack, { gap: "md", className: NOTIF_CHANNEL_INDENT, children: [_jsx(Select, { label: "Minimum priority to send email", options: PRIORITY_OPTIONS, value: notifEmailMinPriority, onValueChange: setNotifEmailMinPriority }), _jsx(Text, { size: "xs", weight: "medium", color: "muted", className: "pt-1", children: "Resend API (for transactional email)" }), _jsx(MaskedInput, { label: "Resend API Key", value: resendApiKey, onChange: setResendApiKey, placeholder: "re_live_\u2026", helperText: "Get your key at resend.com \u2014 used for all transactional notifications." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "From email", value: notifFromEmail, onChange: (e) => setNotifFromEmail(e.target.value), placeholder: "noreply@letitrip.in", type: "email" }), _jsx(Input, { label: "From name", value: notifFromName, onChange: (e) => setNotifFromName(e.target.value), placeholder: "LetItRip" })] })] }))] }), _jsxs(Stack, { gap: "md", rounded: "lg", border: "default", padding: "md", children: [_jsx(Toggle, { label: "WhatsApp notifications", checked: notifWhatsappEnabled, onChange: setNotifWhatsappEnabled }), notifWhatsappEnabled && (_jsxs(Stack, { gap: "md", className: NOTIF_CHANNEL_INDENT, children: [_jsx(Select, { label: "Minimum priority to send WhatsApp", options: PRIORITY_OPTIONS, value: notifWhatsappMinPriority, onValueChange: setNotifWhatsappMinPriority }), _jsx(Toggle, { label: "Enable WhatsApp OTP (for login and verification)", checked: notifWhatsappOtpEnabled, onChange: setNotifWhatsappOtpEnabled }), _jsx(Text, { size: "xs", color: "muted", children: "WhatsApp credentials are configured in the WhatsApp tab (\u246C). OTP messages use the same phone number." })] }))] }), _jsxs(Stack, { gap: "md", rounded: "lg", border: "default", padding: "md", children: [_jsx(Toggle, { label: "SMS notifications", checked: notifSmsEnabled, onChange: setNotifSmsEnabled }), notifSmsEnabled && (_jsxs(Stack, { gap: "md", className: NOTIF_CHANNEL_INDENT, children: [_jsx(Select, { label: "Minimum priority to send SMS", options: PRIORITY_OPTIONS, value: notifSmsMinPriority, onValueChange: setNotifSmsMinPriority }), _jsx(Text, { size: "xs", color: "muted", children: "SMS gateway credentials (e.g. Twilio, MSG91) can be configured in the Integrations tab once an SMS provider is connected." })] }))] }), _jsx(GroupSaveButton, { isPending: notifChannelsMutation.isPending })] }) }), _jsx(TabsContent, { value: "legal", children: _jsxs(Form, { onSubmit: (e) => { e.preventDefault(); legalMutation.mutate(); }, className: "pt-4", spacing: "md", children: [[
408
404
  ["Terms of Service", termsHtml, setTermsHtml],
409
405
  ["Privacy Policy", privacyHtml, setPrivacyHtml],
410
406
  ["Refund Policy", refundHtml, setRefundHtml],
@@ -127,7 +127,7 @@ export function AdminSupportTicketDetailView({ open, onClose, ticketId, subject,
127
127
  internalNotes: (notes ? notes + "\n" : "") +
128
128
  `[${new Date().toISOString()}] Applied store change to ${linkedStoreId}: status=${storeStatus}, verified=${storeIsVerified}, featured=${storeIsFeatured}`,
129
129
  })
130
- .catch(() => { }); // audit-silent-catch-ok: ticket-note metadata; primary admin action already succeeded
130
+ .catch(() => { });
131
131
  invalidate();
132
132
  },
133
133
  onError: (err) => {
@@ -176,7 +176,7 @@ export function AdminSupportTicketDetailView({ open, onClose, ticketId, subject,
176
176
  `[${new Date().toISOString()}] Lifted hard ban for ${linkedUserId}`,
177
177
  status: "resolved",
178
178
  })
179
- .catch(() => { }); // audit-silent-catch-ok: ticket-note metadata; primary admin action already succeeded
179
+ .catch(() => { });
180
180
  invalidate();
181
181
  },
182
182
  onError: (err) => {
@@ -197,7 +197,7 @@ export function AdminSupportTicketDetailView({ open, onClose, ticketId, subject,
197
197
  `[${new Date().toISOString()}] Lifted create_support_tickets soft ban for ${linkedUserId}`,
198
198
  status: "resolved",
199
199
  })
200
- .catch(() => { }); // audit-silent-catch-ok: ticket-note metadata; primary admin action already succeeded
200
+ .catch(() => { });
201
201
  invalidate();
202
202
  },
203
203
  onError: (err) => {
@@ -233,7 +233,7 @@ export function AdminSupportTicketDetailView({ open, onClose, ticketId, subject,
233
233
  .map((it) => `${it.productId}x${it.quantity}`)
234
234
  .join(", ")}`,
235
235
  })
236
- .catch(() => { }); // audit-silent-catch-ok: ticket-note metadata; primary admin action already succeeded
236
+ .catch(() => { });
237
237
  invalidate();
238
238
  setOrderItemsOpen(false);
239
239
  },
@@ -241,9 +241,7 @@ export function AdminSupportTicketDetailView({ open, onClose, ticketId, subject,
241
241
  showToast(err?.message ?? "Failed to update order items.", "error");
242
242
  },
243
243
  });
244
- return (_jsx(SideDrawer, { isOpen: open, onClose: onClose, title: subject ?? "Support Ticket", children: _jsxs(Stack, { className: `${__P.p4}`, gap: "md", children: [_jsxs(Row, { align: "center", gap: "sm", wrap: true, children: [_jsx(Span, { size: "xs", weight: "medium", className: `inline-flex ${STATUS_COLOR[currentStatus ?? "open"] ?? STATUS_COLOR.open}`, rounded: "full", padding: "pill-sm-tall", children: (currentStatus ?? "open").replace(/_/g, " ") }), _jsx(Span, { size: "xs", rounded: "full", padding: "pill-sm-tall", surface: "subtle", color: "muted", children: category }), orderId && (_jsxs(Span, { size: "xs", rounded: "full", padding: "pill-sm-tall", surface: "subtle", color: "muted", children: ["Order: ", orderId] }))] }), _jsxs(Div, { textSize: "sm", color: "muted", children: ["From: ", _jsx(Span, { weight: "medium", color: "primary", children: userDisplayName })] }), description && (_jsxs(Div, { className: `${__P.p3}`, rounded: "lg", surface: "muted", border: "default", children: [_jsx(Text, { className: "mb-1 tracking-wide", color: "muted", size: "xs", weight: "semibold", transform: "uppercase", children: "Description" }), _jsx(Text, { className: "whitespace-pre-wrap", color: "primary", size: "sm", children: description })] })), messages.length > 0 && (_jsxs(Stack, { gap: "sm", children: [_jsxs(Text, { className: "tracking-wide", color: "muted", size: "xs", weight: "semibold", transform: "uppercase", children: ["Messages (", messages.length, ")"] }), _jsx(Stack, { className: `max-h-64 ${__O.yAuto}`, gap: "sm", children: messages.map((msg, i) => (
245
- // audit-variant-ok: message bubble — conditional bg-zinc-50 (user) vs bg-info-surface + border-info (system); Div lacks role-bubble variant
246
- _jsxs(Div, { textSize: "sm", border: "default", className: `${msg.authorRole === "user" ? "bg-zinc-50 dark:bg-zinc-900/40 " : "bg-info-surface border-info dark:border-info"}`, rounded: "lg", padding: "sm", children: [_jsxs(Row, { color: "muted", textSize: "xs", className: "mb-1", align: "center", gap: "sm", children: [_jsx(Span, { weight: "medium", color: "muted", children: ROLE_LABEL[msg.authorRole ?? "user"] ?? msg.authorRole }), msg.createdAt && (_jsx(Span, { children: new Date(msg.createdAt).toLocaleString() }))] }), _jsx(Text, { className: "whitespace-pre-wrap", color: "primary", children: msg.body })] }, msg.id ?? i))) })] })), _jsxs(Stack, { gap: "xs", children: [_jsx(Label, { className: "uppercase tracking-wide", color: "muted", size: "xs", weight: "semibold", children: "Reply to user" }), _jsx("textarea", { value: replyBody, onChange: (e) => setReplyBody(e.target.value), rows: 3, placeholder: "Type a reply\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" }), _jsx(Button, { type: "button", variant: "primary", size: "sm", isLoading: replyMutation.isPending, disabled: !replyBody.trim() || !ticketId || replyMutation.isPending, onClick: () => replyMutation.mutate(), children: "Send reply" })] }), _jsx(HorizontalRule, { tone: "subtle", spacing: "comfortable" }), _jsx(Select, { label: "Status", options: STATUS_OPTIONS, value: status, onValueChange: setStatus }), _jsx(Select, { label: "Priority", options: PRIORITY_OPTIONS, value: priority, onValueChange: setPriority }), _jsxs(Stack, { gap: "xs", children: [_jsx(Label, { className: "uppercase tracking-wide", color: "muted", size: "xs", weight: "semibold", children: "Internal notes (staff only)" }), _jsx("textarea", { value: notes, onChange: (e) => setNotes(e.target.value), rows: 3, placeholder: "Notes visible only to admins and employees\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" })] }), _jsxs(Stack, { padding: "sm", gap: "sm", rounded: "lg", border: "default", children: [_jsx(Text, { className: "tracking-wide", color: "muted", size: "xs", weight: "semibold", transform: "uppercase", children: "Linked parties" }), _jsx(Text, { size: "xs", color: "muted", children: "Tag the buyer / store / order / product / bid this ticket concerns." }), [
244
+ return (_jsx(SideDrawer, { isOpen: open, onClose: onClose, title: subject ?? "Support Ticket", children: _jsxs(Stack, { className: `${__P.p4}`, gap: "md", children: [_jsxs(Row, { align: "center", gap: "sm", wrap: true, children: [_jsx(Span, { size: "xs", weight: "medium", className: `inline-flex ${STATUS_COLOR[currentStatus ?? "open"] ?? STATUS_COLOR.open}`, rounded: "full", padding: "pill-sm-tall", children: (currentStatus ?? "open").replace(/_/g, " ") }), _jsx(Span, { size: "xs", rounded: "full", padding: "pill-sm-tall", surface: "subtle", color: "muted", children: category }), orderId && (_jsxs(Span, { size: "xs", rounded: "full", padding: "pill-sm-tall", surface: "subtle", color: "muted", children: ["Order: ", orderId] }))] }), _jsxs(Div, { textSize: "sm", color: "muted", children: ["From: ", _jsx(Span, { weight: "medium", color: "primary", children: userDisplayName })] }), description && (_jsxs(Div, { className: `${__P.p3}`, rounded: "lg", surface: "muted", border: "default", children: [_jsx(Text, { className: "mb-1 tracking-wide", color: "muted", size: "xs", weight: "semibold", transform: "uppercase", children: "Description" }), _jsx(Text, { className: "whitespace-pre-wrap", color: "primary", size: "sm", children: description })] })), messages.length > 0 && (_jsxs(Stack, { gap: "sm", children: [_jsxs(Text, { className: "tracking-wide", color: "muted", size: "xs", weight: "semibold", transform: "uppercase", children: ["Messages (", messages.length, ")"] }), _jsx(Stack, { className: `max-h-64 ${__O.yAuto}`, gap: "sm", children: messages.map((msg, i) => (_jsxs(Div, { textSize: "sm", border: "default", className: `${msg.authorRole === "user" ? "bg-zinc-50 dark:bg-zinc-900/40 " : "bg-info-surface border-info dark:border-info"}`, rounded: "lg", padding: "sm", children: [_jsxs(Row, { color: "muted", textSize: "xs", className: "mb-1", align: "center", gap: "sm", children: [_jsx(Span, { weight: "medium", color: "muted", children: ROLE_LABEL[msg.authorRole ?? "user"] ?? msg.authorRole }), msg.createdAt && (_jsx(Span, { children: new Date(msg.createdAt).toLocaleString() }))] }), _jsx(Text, { className: "whitespace-pre-wrap", color: "primary", children: msg.body })] }, msg.id ?? i))) })] })), _jsxs(Stack, { gap: "xs", children: [_jsx(Label, { className: "uppercase tracking-wide", color: "muted", size: "xs", weight: "semibold", children: "Reply to user" }), _jsx("textarea", { value: replyBody, onChange: (e) => setReplyBody(e.target.value), rows: 3, placeholder: "Type a reply\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" }), _jsx(Button, { type: "button", variant: "primary", size: "sm", isLoading: replyMutation.isPending, disabled: !replyBody.trim() || !ticketId || replyMutation.isPending, onClick: () => replyMutation.mutate(), children: "Send reply" })] }), _jsx(HorizontalRule, { tone: "subtle", spacing: "comfortable" }), _jsx(Select, { label: "Status", options: STATUS_OPTIONS, value: status, onValueChange: setStatus }), _jsx(Select, { label: "Priority", options: PRIORITY_OPTIONS, value: priority, onValueChange: setPriority }), _jsxs(Stack, { gap: "xs", children: [_jsx(Label, { className: "uppercase tracking-wide", color: "muted", size: "xs", weight: "semibold", children: "Internal notes (staff only)" }), _jsx("textarea", { value: notes, onChange: (e) => setNotes(e.target.value), rows: 3, placeholder: "Notes visible only to admins and employees\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" })] }), _jsxs(Stack, { padding: "sm", gap: "sm", rounded: "lg", border: "default", children: [_jsx(Text, { className: "tracking-wide", color: "muted", size: "xs", weight: "semibold", transform: "uppercase", children: "Linked parties" }), _jsx(Text, { size: "xs", color: "muted", children: "Tag the buyer / store / order / product / bid this ticket concerns." }), [
247
245
  ["userId", "User slug"],
248
246
  ["storeId", "Store slug"],
249
247
  ["orderId", "Order ID"],
@@ -257,15 +255,11 @@ function OrderItemsPanel(props) {
257
255
  const q = Math.max(0, parseInt(raw, 10) || 0);
258
256
  setOrderItems((prev) => prev.map((p, i) => (i === idx ? { ...p, quantity: q } : p)));
259
257
  };
260
- return (
261
- // audit-variant-ok: info panel — bg-info-surface/40 + border-info/40 translucent tint; Stack.surface=info-surface is fully opaque
262
- _jsxs(Stack, { padding: "sm", className: "border border-info/40 bg-info-surface/40", gap: "sm", rounded: "lg", children: [_jsx(Text, { className: "text-info tracking-wide", size: "xs", weight: "semibold", transform: "uppercase", children: "Modify order items" }), linkedOrderId ? (_jsxs(_Fragment, { children: [_jsxs(Text, { size: "xs", color: "muted", children: ["Editing order: ", _jsx(Code, { className: "font-mono", children: linkedOrderId })] }), !orderItemsOpen ? (_jsx(Button, { type: "button", variant: "secondary", size: "sm", isLoading: loadOrderItems.isPending, disabled: loadOrderItems.isPending, onClick: () => loadOrderItems.mutate(), children: "Load current items" })) : (_jsxs(_Fragment, { children: [orderItems.length === 0 ? (_jsx(Text, { size: "xs", color: "muted", children: "Order has no items." })) : (_jsx(Stack, { gap: "sm", children: orderItems.map((it, idx) => (_jsxs(Row, { paddingY: "y-2xs", padding: "x-xs", rounded: "default", align: "center", gap: "sm", border: "default", children: [_jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", size: "xs", weight: "medium", children: it.productTitle }), _jsxs(Text, { size: "xs", color: "muted", children: [it.productId, " \u00B7 \u20B9", (it.unitPrice / 100).toFixed(2), "/ea"] })] }), _jsx("input", { type: "number", min: "0", value: it.quantity, onChange: (e) => updateQty(idx, e.target.value), className: "w-16 rounded border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-2 py-1 text-xs" })] }, `${it.productId}-${idx}`))) })), _jsxs(Row, { gap: "sm", children: [_jsx(Button, { type: "button", variant: "secondary", size: "sm", onClick: () => setOrderItemsOpen(false), children: "Cancel" }), _jsx(Button, { type: "button", variant: "primary", size: "sm", isLoading: applyOrderItems.isPending, disabled: applyOrderItems.isPending, onClick: () => applyOrderItems.mutate(), children: "Apply changes" })] })] }))] })) : (_jsxs(Text, { size: "xs", color: "muted", children: ["Set the", " ", _jsx(Text, { as: "span", weight: "semibold", children: "Order ID" }), " ", "field in the Linked parties panel above to enable this action."] }))] }));
258
+ return (_jsxs(Stack, { padding: "sm", className: "border border-info/40 bg-info-surface/40", gap: "sm", rounded: "lg", children: [_jsx(Text, { className: "text-info tracking-wide", size: "xs", weight: "semibold", transform: "uppercase", children: "Modify order items" }), linkedOrderId ? (_jsxs(_Fragment, { children: [_jsxs(Text, { size: "xs", color: "muted", children: ["Editing order: ", _jsx(Code, { className: "font-mono", children: linkedOrderId })] }), !orderItemsOpen ? (_jsx(Button, { type: "button", variant: "secondary", size: "sm", isLoading: loadOrderItems.isPending, disabled: loadOrderItems.isPending, onClick: () => loadOrderItems.mutate(), children: "Load current items" })) : (_jsxs(_Fragment, { children: [orderItems.length === 0 ? (_jsx(Text, { size: "xs", color: "muted", children: "Order has no items." })) : (_jsx(Stack, { gap: "sm", children: orderItems.map((it, idx) => (_jsxs(Row, { paddingY: "y-2xs", padding: "x-xs", rounded: "default", align: "center", gap: "sm", border: "default", children: [_jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", size: "xs", weight: "medium", children: it.productTitle }), _jsxs(Text, { size: "xs", color: "muted", children: [it.productId, " \u00B7 \u20B9", (it.unitPrice / 100).toFixed(2), "/ea"] })] }), _jsx("input", { type: "number", min: "0", value: it.quantity, onChange: (e) => updateQty(idx, e.target.value), className: "w-16 rounded border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-2 py-1 text-xs" })] }, `${it.productId}-${idx}`))) })), _jsxs(Row, { gap: "sm", children: [_jsx(Button, { type: "button", variant: "secondary", size: "sm", onClick: () => setOrderItemsOpen(false), children: "Cancel" }), _jsx(Button, { type: "button", variant: "primary", size: "sm", isLoading: applyOrderItems.isPending, disabled: applyOrderItems.isPending, onClick: () => applyOrderItems.mutate(), children: "Apply changes" })] })] }))] })) : (_jsxs(Text, { size: "xs", color: "muted", children: ["Set the", " ", _jsx(Text, { as: "span", weight: "semibold", children: "Order ID" }), " ", "field in the Linked parties panel above to enable this action."] }))] }));
263
259
  }
264
260
  function StoreChangePanel(props) {
265
261
  const { linkedStoreId, storeStatus, setStoreStatus, storeIsVerified, setStoreIsVerified, storeIsFeatured, setStoreIsFeatured, applyStoreChange, } = props;
266
- return (
267
- // audit-variant-ok: warning panel — bg-warning-surface/40 + border-warning/40 translucent tint; Stack.surface=warning-surface is fully opaque
268
- _jsxs(Stack, { padding: "sm", className: "border border-warning/40 bg-warning-surface/40", gap: "sm", rounded: "lg", children: [_jsx(Text, { className: "text-warning tracking-wide", size: "xs", weight: "semibold", transform: "uppercase", children: "Apply store change" }), linkedStoreId ? (_jsxs(_Fragment, { children: [_jsxs(Text, { size: "xs", color: "muted", children: ["Editing store: ", _jsx(Code, { className: "font-mono", children: linkedStoreId })] }), _jsx(Select, { label: "Store status", options: [
262
+ return (_jsxs(Stack, { padding: "sm", className: "border border-warning/40 bg-warning-surface/40", gap: "sm", rounded: "lg", children: [_jsx(Text, { className: "text-warning tracking-wide", size: "xs", weight: "semibold", transform: "uppercase", children: "Apply store change" }), linkedStoreId ? (_jsxs(_Fragment, { children: [_jsxs(Text, { size: "xs", color: "muted", children: ["Editing store: ", _jsx(Code, { className: "font-mono", children: linkedStoreId })] }), _jsx(Select, { label: "Store status", options: [
269
263
  { label: "Active", value: "active" },
270
264
  { label: "Pending", value: "pending" },
271
265
  { label: "Suspended", value: "suspended" },
@@ -15,13 +15,7 @@ const BRAND_FROM = "var(--appkit-color-primary-700)";
15
15
  const BRAND_MID = "var(--appkit-color-cobalt)";
16
16
  const BRAND_TO = "var(--appkit-color-secondary-400)";
17
17
  function StatCard({ label, value, sub, icon: Icon, gradient, iconColor }) {
18
- return (
19
- // audit-variant-ok: stat card — static shadow-sm + hover-shadow-md transition combo; Div.shadow accepts only one value
20
- _jsxs(Div, { className: `relative border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] ${__O.hidden} hover:shadow-md transition-shadow`, rounded: "xl", shadow: "sm", children: [_jsx(Div, { className: "absolute top-0 left-0 right-0 h-[3px]",
21
- // audit-inline-style-ok: runtime theme gradient
22
- style: { background: gradient }, "aria-hidden": "true" }), _jsxs(Row, { paddingX: "x-5", paddingY: "b-md-lg", padding: "t-lg", align: "start", justify: "between", gap: "3", children: [_jsxs(Div, { className: `min-w-0 flex-1 ${__O.hidden}`, children: [_jsx(Text, { className: "text-[11px] tracking-widest text-[var(--appkit-color-text-muted)] truncate", weight: "semibold", transform: "uppercase", children: label }), _jsx(Text, { className: "mt-2 text-[var(--appkit-color-text)] tabular-nums leading-tight break-words", size: "xl", weight: "bold", children: value }), sub && (_jsx(Text, { className: "mt-1.5 text-[var(--appkit-color-text-muted)]", size: "xs", children: sub }))] }), _jsx(Row, { className: "flex-shrink-0 w-10 h-10", align: "center", justify: "center", rounded: "lg",
23
- // audit-inline-style-ok: runtime theme gradient
24
- style: { background: gradient, opacity: 0.92 }, children: _jsx(Icon, { className: "w-5 h-5 text-white drop-shadow-sm" }) })] })] }));
18
+ return (_jsxs(Div, { className: `relative border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] ${__O.hidden} hover:shadow-md transition-shadow`, rounded: "xl", shadow: "sm", children: [_jsx(Div, { className: "absolute top-0 left-0 right-0 h-[3px]", style: { background: gradient }, "aria-hidden": "true" }), _jsxs(Row, { paddingX: "x-5", paddingY: "b-md-lg", padding: "t-lg", align: "start", justify: "between", gap: "3", children: [_jsxs(Div, { className: `min-w-0 flex-1 ${__O.hidden}`, children: [_jsx(Text, { className: "text-[11px] tracking-widest text-[var(--appkit-color-text-muted)] truncate", weight: "semibold", transform: "uppercase", children: label }), _jsx(Text, { className: "mt-2 text-[var(--appkit-color-text)] tabular-nums leading-tight break-words", size: "xl", weight: "bold", children: value }), sub && (_jsx(Text, { className: "mt-1.5 text-[var(--appkit-color-text-muted)]", size: "xs", children: sub }))] }), _jsx(Row, { className: "flex-shrink-0 w-10 h-10", align: "center", justify: "center", rounded: "lg", style: { background: gradient, opacity: 0.92 }, children: _jsx(Icon, { className: "w-5 h-5 text-white drop-shadow-sm" }) })] })] }));
25
19
  }
26
20
  function SkeletonCard() {
27
21
  return (_jsxs(Div, { className: `relative border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] ${__O.hidden} ${__P.p5} animate-pulse`, rounded: "xl", children: [_jsx(Div, { className: "absolute top-0 left-0 right-0 h-[3px] bg-[var(--appkit-color-border)]" }), _jsxs(Row, { align: "start", justify: "between", gap: "3", padding: "t-2xs", children: [_jsxs(Stack, { className: "flex-1", gap: "sm", children: [_jsx(Div, { className: "h-2.5 w-20 bg-[var(--appkit-color-border)]", rounded: "default" }), _jsx(Div, { className: "h-7 w-24 bg-[var(--appkit-color-border)]", rounded: "default" })] }), _jsx(Div, { className: "w-10 h-10 bg-[var(--appkit-color-border)]", rounded: "lg" })] })] }));
@@ -52,11 +52,7 @@ export function DataListingView({ config, }) {
52
52
  })
53
53
  : config.renderEditor
54
54
  ? (row) => panel.openEditPanel(row.id)
55
- : undefined, renderRowActions: config.renderRowActions })) : config.renderCards ? (config.renderCards(rows, view, selectionContext, isLoading)) : (_jsx(AdminViewCards
56
- // audit-unknown-ok: TS structural escape — extracted function type
57
- , {
58
- // audit-unknown-ok: TS structural escape — extracted function type
59
- rows: rows, view: view, isLoading: isLoading, emptyLabel: config.emptyLabel ?? `No ${config.title.toLowerCase()} found`, onRowClick: (row) => panel.openEditPanel(row.id), selectedIdSet: selection.selectedIdSet, onToggleSelect: selection.toggle }))] }), config.renderFilterPanel && (_jsx(ListingFilterDrawer, { open: filterOpen, onClose: () => setFilterOpen(false), onApply: applyFilters, onClear: clearFilters, activeCount: activeFilterCount, children: config.renderFilterPanel({
55
+ : undefined, renderRowActions: config.renderRowActions })) : config.renderCards ? (config.renderCards(rows, view, selectionContext, isLoading)) : (_jsx(AdminViewCards, { rows: rows, view: view, isLoading: isLoading, emptyLabel: config.emptyLabel ?? `No ${config.title.toLowerCase()} found`, onRowClick: (row) => panel.openEditPanel(row.id), selectedIdSet: selection.selectedIdSet, onToggleSelect: selection.toggle }))] }), config.renderFilterPanel && (_jsx(ListingFilterDrawer, { open: filterOpen, onClose: () => setFilterOpen(false), onApply: applyFilters, onClear: clearFilters, activeCount: activeFilterCount, children: config.renderFilterPanel({
60
56
  pendingFilters,
61
57
  setPendingFilters,
62
58
  applyFilters,
@@ -39,9 +39,7 @@ function SelectableRow({ row, columns, isSelected, onToggle, renderRowActions, o
39
39
  }
40
40
  : undefined;
41
41
  const isInteractive = Boolean(onRowClick ?? rowHref);
42
- return (
43
- // audit-variant-ok: data-table row — hover + conditional selected-row tint; Tr lacks hover-state / selected-state variants
44
- _jsxs(Tr, { "data-testid": "data-table-row", onClick: handleClick, onKeyDown: handleKeyDown, role: isInteractive ? "link" : undefined, tabIndex: isInteractive ? 0 : undefined, onMouseDown: selectionEnabled && !isSelected ? longPress.onMouseDown : undefined, onMouseUp: selectionEnabled && !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: selectionEnabled && !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: selectionEnabled && !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: selectionEnabled && !isSelected ? longPress.onTouchEnd : undefined, className: `hover:bg-neutral-50 dark:hover:bg-slate-800 ${isInteractive ? "cursor-pointer" : ""} ${isSelected ? "bg-primary/5 dark:bg-primary/10" : ""}`, border: "default", children: [selectionEnabled && (_jsx(Td, { padding: "xs-3", className: "relative w-10", onClick: (e) => e.stopPropagation(), children: _jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: (e) => { e.preventDefault(); onToggle?.(row.id, !isSelected); }, label: isSelected ? "Deselect row" : "Select row", position: "top-1/2 left-2 -translate-y-1/2", "data-testid": "row-checkbox" }) })), columns.map((col) => (_jsx(Td, { color: "muted", className: col.className ?? "", padding: "md", children: col.render
42
+ return (_jsxs(Tr, { "data-testid": "data-table-row", onClick: handleClick, onKeyDown: handleKeyDown, role: isInteractive ? "link" : undefined, tabIndex: isInteractive ? 0 : undefined, onMouseDown: selectionEnabled && !isSelected ? longPress.onMouseDown : undefined, onMouseUp: selectionEnabled && !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: selectionEnabled && !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: selectionEnabled && !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: selectionEnabled && !isSelected ? longPress.onTouchEnd : undefined, className: `hover:bg-neutral-50 dark:hover:bg-slate-800 ${isInteractive ? "cursor-pointer" : ""} ${isSelected ? "bg-primary/5 dark:bg-primary/10" : ""}`, border: "default", children: [selectionEnabled && (_jsx(Td, { padding: "xs-3", className: "relative w-10", onClick: (e) => e.stopPropagation(), children: _jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: (e) => { e.preventDefault(); onToggle?.(row.id, !isSelected); }, label: isSelected ? "Deselect row" : "Select row", position: "top-1/2 left-2 -translate-y-1/2", "data-testid": "row-checkbox" }) })), columns.map((col) => (_jsx(Td, { color: "muted", className: col.className ?? "", padding: "md", children: col.render
45
43
  ? col.render(row)
46
44
  : String(row[col.key] ?? "") }, col.key))), renderRowActions && (_jsx(Td, { padding: "xs-3", onClick: (e) => e.stopPropagation(), children: renderRowActions(row) }))] }));
47
45
  }
@@ -19,9 +19,7 @@ const CartesianGrid = dynamic(() => import("recharts").then((m) => m.CartesianGr
19
19
  const Tooltip = dynamic(() => import("recharts").then((m) => m.Tooltip), { ssr: false });
20
20
  // Shared chart card wrapper
21
21
  function ChartCard({ title, children, className = "", }) {
22
- return (_jsxs(Div, { className: `relative border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] overflow-hidden ${className}`, rounded: "xl", shadow: "sm", children: [_jsx("div", { className: "absolute top-0 left-0 right-0 h-[3px]",
23
- // audit-inline-style-ok: dynamic CSS
24
- style: {
22
+ return (_jsxs(Div, { className: `relative border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] overflow-hidden ${className}`, rounded: "xl", shadow: "sm", children: [_jsx("div", { className: "absolute top-0 left-0 right-0 h-[3px]", style: {
25
23
  background: "linear-gradient(to right, var(--appkit-color-primary-700) 0%, var(--appkit-color-cobalt) 55%, var(--appkit-color-secondary-400) 100%)",
26
24
  }, "aria-hidden": "true" }), _jsxs(Div, { className: `${__P.p4} sm:${__P.p6} sm:pt-7`, padding: "t-md", children: [title && (_jsx(Heading, { level: 3, className: "text-[var(--appkit-color-text)] mb-4", size: "sm", weight: "semibold", children: title })), children] })] }));
27
25
  }
@@ -12,11 +12,5 @@ const GRADIENTS = {
12
12
  };
13
13
  export function AdminStatCard({ label, value, sub, icon, gradient = "brand", className = "", }) {
14
14
  const resolvedGradient = GRADIENTS[gradient] ?? gradient;
15
- return (
16
- // audit-variant-ok: stat card — static shadow-sm + hover-shadow-md transition combo; Div.shadow accepts only one value, so the hover layer needs raw className
17
- _jsxs(Div, { className: `relative border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] overflow-hidden hover:shadow-md transition-shadow ${className}`, rounded: "xl", shadow: "sm", children: [_jsx("div", { className: "absolute top-0 left-0 right-0 h-[3px]",
18
- // audit-inline-style-ok: dynamic CSS
19
- style: { background: resolvedGradient }, "aria-hidden": "true" }), _jsxs(Row, { paddingX: "x-5", paddingY: "b-md-lg", padding: "t-lg", align: "start", justify: "between", gap: "3", children: [_jsxs(Div, { className: "min-w-0 flex-1", children: [_jsx(Text, { className: "text-[11px] tracking-widest text-[var(--appkit-color-text-muted)]", weight: "semibold", transform: "uppercase", children: label }), _jsx(Heading, { level: 3, className: "mt-2 tabular-nums leading-none text-[var(--appkit-color-text)]", size: "2xl", weight: "bold", children: value }), sub && (_jsx(Text, { className: "mt-1.5 text-[var(--appkit-color-text-muted)]", size: "xs", children: sub }))] }), icon && (_jsx(Row, { textSize: "xl", className: "flex-shrink-0 w-10 h-10", align: "center", justify: "center", rounded: "lg",
20
- // audit-inline-style-ok: dynamic CSS
21
- style: { background: resolvedGradient }, children: icon }))] })] }));
15
+ return (_jsxs(Div, { className: `relative border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] overflow-hidden hover:shadow-md transition-shadow ${className}`, rounded: "xl", shadow: "sm", children: [_jsx("div", { className: "absolute top-0 left-0 right-0 h-[3px]", style: { background: resolvedGradient }, "aria-hidden": "true" }), _jsxs(Row, { paddingX: "x-5", paddingY: "b-md-lg", padding: "t-lg", align: "start", justify: "between", gap: "3", children: [_jsxs(Div, { className: "min-w-0 flex-1", children: [_jsx(Text, { className: "text-[11px] tracking-widest text-[var(--appkit-color-text-muted)]", weight: "semibold", transform: "uppercase", children: label }), _jsx(Heading, { level: 3, className: "mt-2 tabular-nums leading-none text-[var(--appkit-color-text)]", size: "2xl", weight: "bold", children: value }), sub && (_jsx(Text, { className: "mt-1.5 text-[var(--appkit-color-text-muted)]", size: "xs", children: sub }))] }), icon && (_jsx(Row, { textSize: "xl", className: "flex-shrink-0 w-10 h-10", align: "center", justify: "center", rounded: "lg", style: { background: resolvedGradient }, children: icon }))] })] }));
22
16
  }
@@ -1,7 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Div, Heading, Row, Text } from "../../../../ui";
3
3
  export function AdminTopProductsTable({ products, labels = {}, formatRevenue = (n) => String(n), renderProductLink, className = "", }) {
4
- return (
5
- // audit-variant-ok: card container — border + sm:p-6 responsive bump (PADDING_MAP lacks responsive sm-up ladder)
6
- _jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-6 ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), _jsx(Div, { children: products.map((product) => (_jsxs(Row, { className: "border-b last:border-b-0 border-neutral-100 dark:border-neutral-800", padding: "y-sm", align: "center", justify: "between", children: [_jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", weight: "medium", children: product.title }), _jsxs(Text, { className: "text-neutral-500 dark:text-neutral-400", size: "sm", children: [product.orders, " ", labels.orders ?? "orders"] })] }), _jsxs(Div, { className: "text-right ml-4", children: [_jsx(Text, { weight: "semibold", children: formatRevenue(product.revenue) }), renderProductLink?.(product)] })] }, product.productId))) })] }));
4
+ return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-6 ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), _jsx(Div, { children: products.map((product) => (_jsxs(Row, { className: "border-b last:border-b-0 border-neutral-100 dark:border-neutral-800", padding: "y-sm", align: "center", justify: "between", children: [_jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", weight: "medium", children: product.title }), _jsxs(Text, { className: "text-neutral-500 dark:text-neutral-400", size: "sm", children: [product.orders, " ", labels.orders ?? "orders"] })] }), _jsxs(Div, { className: "text-right ml-4", children: [_jsx(Text, { weight: "semibold", children: formatRevenue(product.revenue) }), renderProductLink?.(product)] })] }, product.productId))) })] }));
7
5
  }
@@ -5,7 +5,6 @@ export function parseCsvValues(value) {
5
5
  .map((part) => part.trim())
6
6
  .filter(Boolean);
7
7
  }
8
- // audit-unknown-ok: type-narrowing entry point — accepts any value, narrows by typeof
9
8
  export function toNumberValue(value, fallback) {
10
9
  if (typeof value === "number" && Number.isFinite(value)) {
11
10
  return value;
@@ -18,15 +17,12 @@ export function toNumberValue(value, fallback) {
18
17
  }
19
18
  return fallback;
20
19
  }
21
- // audit-unknown-ok: type-narrowing entry point — accepts any value
22
20
  export function toStringValue(value, fallback = "") {
23
21
  return typeof value === "string" ? value : fallback;
24
22
  }
25
- // audit-unknown-ok: type-narrowing entry point — accepts any value
26
23
  export function toBooleanValue(value, fallback = false) {
27
24
  return typeof value === "boolean" ? value : fallback;
28
25
  }
29
- // audit-unknown-ok: type-narrowing entry point — accepts any value
30
26
  export function toStringArray(value) {
31
27
  return Array.isArray(value)
32
28
  ? value.filter((item) => typeof item === "string")
@@ -762,7 +758,6 @@ const COLLECTION_CARD_ENTRY_TYPES = [
762
758
  "brands",
763
759
  "categories",
764
760
  ];
765
- // audit-unknown-ok: parses arbitrary saved Firestore section config
766
761
  function parseCollectionCardsEntry(raw) {
767
762
  const r = (raw ?? {});
768
763
  const typeRaw = toStringValue(r.type, "products");
@@ -37,11 +37,9 @@ export function useAdminListingData({ queryKey, endpoint, page = 1, pageSize = 2
37
37
  refetch: () => { void query.refetch(); },
38
38
  };
39
39
  }
40
- // audit-unknown-ok: type-narrowing entry point — receives arbitrary repo data
41
40
  export function toRecordArray(value) {
42
41
  return Array.isArray(value) ? value.filter(Boolean) : [];
43
42
  }
44
- // audit-unknown-ok: type-narrowing entry point — accepts any value, narrows by typeof
45
43
  export function toStringValue(value, fallback = "-") {
46
44
  if (typeof value === "string") {
47
45
  return value.trim() || fallback;
@@ -51,14 +49,12 @@ export function toStringValue(value, fallback = "-") {
51
49
  }
52
50
  return fallback;
53
51
  }
54
- // audit-unknown-ok: type-narrowing entry point — accepts any value, narrows by typeof
55
52
  export function toRupees(value) {
56
53
  if (typeof value !== "number" || Number.isNaN(value)) {
57
54
  return "-";
58
55
  }
59
56
  return `INR ${value.toLocaleString("en-IN")}`;
60
57
  }
61
- // audit-unknown-ok: type-narrowing entry point — Date | string | number | other
62
58
  export function toRelativeDate(value) {
63
59
  const date = parseDate(value);
64
60
  if (!date) {
@@ -86,7 +82,6 @@ export function toRelativeDate(value) {
86
82
  year: "numeric",
87
83
  });
88
84
  }
89
- // audit-unknown-ok: type-narrowing entry point — Date | string | number | Timestamp
90
85
  function parseDate(value) {
91
86
  if (value instanceof Date && !Number.isNaN(value.getTime())) {
92
87
  return value;
@@ -16,7 +16,6 @@ export function useChat(chatId, options) {
16
16
  const tokenExpiresAtRef = useRef(0);
17
17
  const unsubscribeRef = useRef(null);
18
18
  const connectAndSubscribe = useCallback(async () => {
19
- // toast-intentionally-silent — error stored in setError() for UI inline render
20
19
  if (!chatId)
21
20
  return;
22
21
  setIsLoading(true);
@@ -83,7 +82,6 @@ export function useChatRooms() {
83
82
  return useQuery({
84
83
  queryKey: ["chat", "rooms"],
85
84
  queryFn: () => apiClient
86
- // audit-unknown-ok: chat rooms/room dynamic JSON response
87
85
  .get(CHAT_ENDPOINTS.LIST)
88
86
  .then((r) => r.rooms),
89
87
  });
@@ -91,7 +89,6 @@ export function useChatRooms() {
91
89
  export function useCreateChatRoom() {
92
90
  return useApiMutation({
93
91
  mutationFn: (data) => apiClient
94
- // audit-unknown-ok: chat rooms/room dynamic JSON response
95
92
  .post(CHAT_ENDPOINTS.LIST, data)
96
93
  .then((r) => r.room),
97
94
  });
@@ -36,7 +36,6 @@ class ChatRepository extends BaseRepository {
36
36
  const raw = super.mapDoc(snap);
37
37
  return decryptPiiFields(raw, [
38
38
  ...CHAT_PII_FIELDS,
39
- // audit-unknown-ok: TS structural escape — generic param
40
39
  ]);
41
40
  }
42
41
  /**
@@ -198,11 +198,8 @@ export class NotificationRepository extends BaseRepository {
198
198
  * Returns the new DocumentReference synchronously for chaining.
199
199
  */
200
200
  createInBatch(batch, input) {
201
- // audit-unknown-ok: TS structural escape — Firebase SDK type
202
201
  const ref = this.getCollection().doc();
203
- batch.create(
204
- // audit-unknown-ok: TS structural escape — Firebase SDK type
205
- ref, prepareForFirestore({
202
+ batch.create(ref, prepareForFirestore({
206
203
  id: ref.id,
207
204
  ...input,
208
205
  isRead: false,