@burdenoff/microfe-billing 2026.510.114

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 (636) hide show
  1. package/README.md +12 -0
  2. package/dist/billing/BillingAdminRoutes.d.ts +6 -0
  3. package/dist/billing/BillingAdminRoutes.d.ts.map +1 -0
  4. package/dist/billing/BillingAdminRoutes.js +359 -0
  5. package/dist/billing/BillingAdminRoutes.js.map +1 -0
  6. package/dist/billing/BillingRoot.d.ts +37 -0
  7. package/dist/billing/BillingRoot.d.ts.map +1 -0
  8. package/dist/billing/BillingRoot.js +190 -0
  9. package/dist/billing/BillingRoot.js.map +1 -0
  10. package/dist/billing/BillingUserRoutes.d.ts +7 -0
  11. package/dist/billing/BillingUserRoutes.d.ts.map +1 -0
  12. package/dist/billing/BillingUserRoutes.js +479 -0
  13. package/dist/billing/BillingUserRoutes.js.map +1 -0
  14. package/dist/billing/constants/permissions.d.ts +18 -0
  15. package/dist/billing/constants/permissions.d.ts.map +1 -0
  16. package/dist/billing/hooks/useBillingAccountSelection.d.ts +36 -0
  17. package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +1 -0
  18. package/dist/billing/hooks/useBillingAccountSelection.js +81 -0
  19. package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -0
  20. package/dist/billing/hooks/useBillingEventEmitter.d.ts +8 -0
  21. package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +1 -0
  22. package/dist/billing/hooks/useBillingEventEmitter.js +15 -0
  23. package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -0
  24. package/dist/billing/hooks/useBillingNavigate.d.ts +30 -0
  25. package/dist/billing/hooks/useBillingNavigate.d.ts.map +1 -0
  26. package/dist/billing/hooks/useBillingNavigate.js +23 -0
  27. package/dist/billing/hooks/useBillingNavigate.js.map +1 -0
  28. package/dist/billing/hooks/useBillingPermissions.d.ts +94 -0
  29. package/dist/billing/hooks/useBillingPermissions.d.ts.map +1 -0
  30. package/dist/billing/hooks/useBillingPermissions.js +78 -0
  31. package/dist/billing/hooks/useBillingPermissions.js.map +1 -0
  32. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +14 -0
  33. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +1 -0
  34. package/dist/billing/hooks/useDefaultBillingCurrency.js +23 -0
  35. package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -0
  36. package/dist/billing/index.d.ts +31 -0
  37. package/dist/billing/index.d.ts.map +1 -0
  38. package/dist/billing/lib/native-purchases.d.ts +51 -0
  39. package/dist/billing/lib/native-purchases.d.ts.map +1 -0
  40. package/dist/billing/lib/native-purchases.js +44 -0
  41. package/dist/billing/lib/native-purchases.js.map +1 -0
  42. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +4 -0
  43. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +1 -0
  44. package/dist/billing/modules/addons/components/FloatingCartDrawer.js +179 -0
  45. package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -0
  46. package/dist/billing/modules/addons/components/index.d.ts +5 -0
  47. package/dist/billing/modules/addons/components/index.d.ts.map +1 -0
  48. package/dist/billing/modules/addons/hooks/index.d.ts +6 -0
  49. package/dist/billing/modules/addons/hooks/index.d.ts.map +1 -0
  50. package/dist/billing/modules/addons/hooks/index.js +1 -0
  51. package/dist/billing/modules/addons/hooks/useAddons.d.ts +55 -0
  52. package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +1 -0
  53. package/dist/billing/modules/addons/hooks/useAddons.js +77 -0
  54. package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -0
  55. package/dist/billing/modules/addons/index.d.ts +7 -0
  56. package/dist/billing/modules/addons/index.d.ts.map +1 -0
  57. package/dist/billing/modules/addons/index.js +10 -0
  58. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +4 -0
  59. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +1 -0
  60. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +266 -0
  61. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -0
  62. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +4 -0
  63. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +1 -0
  64. package/dist/billing/modules/addons/pages/AddonCreatePage.js +369 -0
  65. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -0
  66. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +4 -0
  67. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +1 -0
  68. package/dist/billing/modules/addons/pages/AddonDetailPage.js +280 -0
  69. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -0
  70. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +4 -0
  71. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +1 -0
  72. package/dist/billing/modules/addons/pages/AddonEditPage.js +396 -0
  73. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -0
  74. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +4 -0
  75. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +1 -0
  76. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +582 -0
  77. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -0
  78. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +4 -0
  79. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +1 -0
  80. package/dist/billing/modules/addons/pages/AddonsListPage.js +744 -0
  81. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -0
  82. package/dist/billing/modules/addons/pages/index.d.ts +11 -0
  83. package/dist/billing/modules/addons/pages/index.d.ts.map +1 -0
  84. package/dist/billing/modules/addons/pages/index.js +6 -0
  85. package/dist/billing/modules/addons/store/addonCartStore.d.ts +38 -0
  86. package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +1 -0
  87. package/dist/billing/modules/addons/store/addonCartStore.js +74 -0
  88. package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -0
  89. package/dist/billing/modules/affiliate/api.d.ts +101 -0
  90. package/dist/billing/modules/affiliate/api.d.ts.map +1 -0
  91. package/dist/billing/modules/affiliate/api.js +38 -0
  92. package/dist/billing/modules/affiliate/api.js.map +1 -0
  93. package/dist/billing/modules/affiliate/index.d.ts +2 -0
  94. package/dist/billing/modules/affiliate/index.d.ts.map +1 -0
  95. package/dist/billing/modules/affiliate/index.js +2 -0
  96. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +4 -0
  97. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +1 -0
  98. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +464 -0
  99. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -0
  100. package/dist/billing/modules/analytics/index.d.ts +5 -0
  101. package/dist/billing/modules/analytics/index.d.ts.map +1 -0
  102. package/dist/billing/modules/analytics/index.js +3 -0
  103. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +4 -0
  104. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +1 -0
  105. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +469 -0
  106. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -0
  107. package/dist/billing/modules/analytics/pages/index.d.ts +5 -0
  108. package/dist/billing/modules/analytics/pages/index.d.ts.map +1 -0
  109. package/dist/billing/modules/analytics/pages/index.js +1 -0
  110. package/dist/billing/modules/billing/hooks/index.d.ts +10 -0
  111. package/dist/billing/modules/billing/hooks/index.d.ts.map +1 -0
  112. package/dist/billing/modules/billing/hooks/index.js +4 -0
  113. package/dist/billing/modules/billing/hooks/useInvoices.d.ts +67 -0
  114. package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +1 -0
  115. package/dist/billing/modules/billing/hooks/useInvoices.js +87 -0
  116. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -0
  117. package/dist/billing/modules/billing/hooks/usePayments.d.ts +62 -0
  118. package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +1 -0
  119. package/dist/billing/modules/billing/hooks/usePayments.js +3 -0
  120. package/dist/billing/modules/billing/hooks/useRefunds.d.ts +191 -0
  121. package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +1 -0
  122. package/dist/billing/modules/billing/hooks/useRefunds.js +162 -0
  123. package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -0
  124. package/dist/billing/modules/billing/hooks/useTransactions.d.ts +41 -0
  125. package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +1 -0
  126. package/dist/billing/modules/billing/hooks/useTransactions.js +55 -0
  127. package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -0
  128. package/dist/billing/modules/billing/index.d.ts +7 -0
  129. package/dist/billing/modules/billing/index.d.ts.map +1 -0
  130. package/dist/billing/modules/billing/index.js +11 -0
  131. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +4 -0
  132. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +1 -0
  133. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +631 -0
  134. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -0
  135. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +4 -0
  136. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +1 -0
  137. package/dist/billing/modules/billing/pages/InvoicesListPage.js +382 -0
  138. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -0
  139. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +4 -0
  140. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +1 -0
  141. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +147 -0
  142. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -0
  143. package/dist/billing/modules/billing/pages/RefundsPage.d.ts +4 -0
  144. package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +1 -0
  145. package/dist/billing/modules/billing/pages/RefundsPage.js +1074 -0
  146. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -0
  147. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +4 -0
  148. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +1 -0
  149. package/dist/billing/modules/billing/pages/TransactionsPage.js +587 -0
  150. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -0
  151. package/dist/billing/modules/billing/pages/index.d.ts +10 -0
  152. package/dist/billing/modules/billing/pages/index.d.ts.map +1 -0
  153. package/dist/billing/modules/billing/pages/index.js +5 -0
  154. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +14 -0
  155. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +1 -0
  156. package/dist/billing/modules/checkout/components/AutoPayToggle.js +3 -0
  157. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +14 -0
  158. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +1 -0
  159. package/dist/billing/modules/checkout/components/BillingAccountSelector.js +151 -0
  160. package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -0
  161. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +14 -0
  162. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +1 -0
  163. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.js +4 -0
  164. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +14 -0
  165. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +1 -0
  166. package/dist/billing/modules/checkout/components/CreditsAmountInput.js +130 -0
  167. package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -0
  168. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +16 -0
  169. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +1 -0
  170. package/dist/billing/modules/checkout/components/CreditsPaymentOption.js +5 -0
  171. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +19 -0
  172. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +1 -0
  173. package/dist/billing/modules/checkout/components/CurrencySelector.js +5 -0
  174. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +14 -0
  175. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +1 -0
  176. package/dist/billing/modules/checkout/components/NativeCheckoutView.js +273 -0
  177. package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -0
  178. package/dist/billing/modules/checkout/components/OrderSummary.d.ts +22 -0
  179. package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +1 -0
  180. package/dist/billing/modules/checkout/components/OrderSummary.js +293 -0
  181. package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -0
  182. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +19 -0
  183. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +1 -0
  184. package/dist/billing/modules/checkout/components/PaymentProviderSelector.js +3 -0
  185. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +19 -0
  186. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +1 -0
  187. package/dist/billing/modules/checkout/components/PromoCodeInput.js +102 -0
  188. package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -0
  189. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +25 -0
  190. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +1 -0
  191. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +169 -0
  192. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -0
  193. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +13 -0
  194. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +1 -0
  195. package/dist/billing/modules/checkout/components/SavedCardSelector.js +4 -0
  196. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +13 -0
  197. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +1 -0
  198. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +78 -0
  199. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -0
  200. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +16 -0
  201. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +1 -0
  202. package/dist/billing/modules/checkout/components/StripePaymentForm.js +253 -0
  203. package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -0
  204. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +26 -0
  205. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +1 -0
  206. package/dist/billing/modules/checkout/components/SubscriptionSelector.js +84 -0
  207. package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -0
  208. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +23 -0
  209. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +1 -0
  210. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +229 -0
  211. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -0
  212. package/dist/billing/modules/checkout/components/index.d.ts +20 -0
  213. package/dist/billing/modules/checkout/components/index.d.ts.map +1 -0
  214. package/dist/billing/modules/checkout/components/index.js +16 -0
  215. package/dist/billing/modules/checkout/graphql/index.d.ts +6 -0
  216. package/dist/billing/modules/checkout/graphql/index.d.ts.map +1 -0
  217. package/dist/billing/modules/checkout/hooks/index.d.ts +9 -0
  218. package/dist/billing/modules/checkout/hooks/index.d.ts.map +1 -0
  219. package/dist/billing/modules/checkout/hooks/index.js +4 -0
  220. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +69 -0
  221. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +1 -0
  222. package/dist/billing/modules/checkout/hooks/useCheckout.js +377 -0
  223. package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -0
  224. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +26 -0
  225. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +1 -0
  226. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +88 -0
  227. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -0
  228. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +19 -0
  229. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +1 -0
  230. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +16 -0
  231. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -0
  232. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +59 -0
  233. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +1 -0
  234. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +107 -0
  235. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -0
  236. package/dist/billing/modules/checkout/index.d.ts +24 -0
  237. package/dist/billing/modules/checkout/index.d.ts.map +1 -0
  238. package/dist/billing/modules/checkout/index.js +19 -0
  239. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +4 -0
  240. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +1 -0
  241. package/dist/billing/modules/checkout/pages/CheckoutPage.js +1248 -0
  242. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -0
  243. package/dist/billing/modules/checkout/pages/index.d.ts +5 -0
  244. package/dist/billing/modules/checkout/pages/index.d.ts.map +1 -0
  245. package/dist/billing/modules/checkout/pages/index.js +1 -0
  246. package/dist/billing/modules/checkout/types/index.d.ts +270 -0
  247. package/dist/billing/modules/checkout/types/index.d.ts.map +1 -0
  248. package/dist/billing/modules/checkout/utils/storeOrder.d.ts +20 -0
  249. package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +1 -0
  250. package/dist/billing/modules/checkout/utils/storeOrder.js +27 -0
  251. package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -0
  252. package/dist/billing/modules/coupons/index.d.ts +5 -0
  253. package/dist/billing/modules/coupons/index.d.ts.map +1 -0
  254. package/dist/billing/modules/coupons/index.js +6 -0
  255. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +4 -0
  256. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +1 -0
  257. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +489 -0
  258. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -0
  259. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +4 -0
  260. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +1 -0
  261. package/dist/billing/modules/coupons/pages/CouponsListPage.js +544 -0
  262. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -0
  263. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +4 -0
  264. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +1 -0
  265. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +421 -0
  266. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -0
  267. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +4 -0
  268. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +1 -0
  269. package/dist/billing/modules/coupons/pages/EditCouponPage.js +379 -0
  270. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -0
  271. package/dist/billing/modules/coupons/pages/index.d.ts +8 -0
  272. package/dist/billing/modules/coupons/pages/index.d.ts.map +1 -0
  273. package/dist/billing/modules/coupons/pages/index.js +4 -0
  274. package/dist/billing/modules/credits/hooks/index.d.ts +5 -0
  275. package/dist/billing/modules/credits/hooks/index.d.ts.map +1 -0
  276. package/dist/billing/modules/credits/hooks/index.js +1 -0
  277. package/dist/billing/modules/credits/hooks/useCredits.d.ts +75 -0
  278. package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +1 -0
  279. package/dist/billing/modules/credits/hooks/useCredits.js +78 -0
  280. package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -0
  281. package/dist/billing/modules/credits/index.d.ts +6 -0
  282. package/dist/billing/modules/credits/index.d.ts.map +1 -0
  283. package/dist/billing/modules/credits/index.js +8 -0
  284. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +4 -0
  285. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +1 -0
  286. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +140 -0
  287. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -0
  288. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +4 -0
  289. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +1 -0
  290. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +331 -0
  291. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -0
  292. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +4 -0
  293. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +1 -0
  294. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +770 -0
  295. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -0
  296. package/dist/billing/modules/credits/pages/CreditsPage.d.ts +4 -0
  297. package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +1 -0
  298. package/dist/billing/modules/credits/pages/CreditsPage.js +324 -0
  299. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -0
  300. package/dist/billing/modules/credits/pages/index.d.ts +8 -0
  301. package/dist/billing/modules/credits/pages/index.d.ts.map +1 -0
  302. package/dist/billing/modules/credits/pages/index.js +4 -0
  303. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +14 -0
  304. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +1 -0
  305. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +185 -0
  306. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -0
  307. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +111 -0
  308. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +1 -0
  309. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +388 -0
  310. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -0
  311. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +16 -0
  312. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +1 -0
  313. package/dist/billing/modules/dashboard/components/BillingAccountCard.js +146 -0
  314. package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -0
  315. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +13 -0
  316. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +1 -0
  317. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1044 -0
  318. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -0
  319. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +15 -0
  320. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +1 -0
  321. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +216 -0
  322. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -0
  323. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +27 -0
  324. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +1 -0
  325. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +193 -0
  326. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -0
  327. package/dist/billing/modules/dashboard/components/index.d.ts +10 -0
  328. package/dist/billing/modules/dashboard/components/index.d.ts.map +1 -0
  329. package/dist/billing/modules/dashboard/components/index.js +6 -0
  330. package/dist/billing/modules/dashboard/hooks/index.d.ts +6 -0
  331. package/dist/billing/modules/dashboard/hooks/index.d.ts.map +1 -0
  332. package/dist/billing/modules/dashboard/hooks/index.js +2 -0
  333. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +17 -0
  334. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +1 -0
  335. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +42 -0
  336. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -0
  337. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +145 -0
  338. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +1 -0
  339. package/dist/billing/modules/dashboard/hooks/useDashboard.js +118 -0
  340. package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -0
  341. package/dist/billing/modules/dashboard/index.d.ts +8 -0
  342. package/dist/billing/modules/dashboard/index.d.ts.map +1 -0
  343. package/dist/billing/modules/dashboard/index.js +12 -0
  344. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +4 -0
  345. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +1 -0
  346. package/dist/billing/modules/dashboard/pages/OverviewPage.js +478 -0
  347. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -0
  348. package/dist/billing/modules/dashboard/pages/index.d.ts +5 -0
  349. package/dist/billing/modules/dashboard/pages/index.d.ts.map +1 -0
  350. package/dist/billing/modules/dashboard/pages/index.js +1 -0
  351. package/dist/billing/modules/discounts/index.d.ts +6 -0
  352. package/dist/billing/modules/discounts/index.d.ts.map +1 -0
  353. package/dist/billing/modules/discounts/index.js +3 -0
  354. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +4 -0
  355. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +1 -0
  356. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +1009 -0
  357. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -0
  358. package/dist/billing/modules/discounts/pages/index.d.ts +6 -0
  359. package/dist/billing/modules/discounts/pages/index.d.ts.map +1 -0
  360. package/dist/billing/modules/discounts/pages/index.js +1 -0
  361. package/dist/billing/modules/earnings/api.d.ts +131 -0
  362. package/dist/billing/modules/earnings/api.d.ts.map +1 -0
  363. package/dist/billing/modules/earnings/api.js +122 -0
  364. package/dist/billing/modules/earnings/api.js.map +1 -0
  365. package/dist/billing/modules/earnings/index.d.ts +4 -0
  366. package/dist/billing/modules/earnings/index.d.ts.map +1 -0
  367. package/dist/billing/modules/earnings/index.js +4 -0
  368. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +4 -0
  369. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +1 -0
  370. package/dist/billing/modules/earnings/pages/EarningsPage.js +435 -0
  371. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -0
  372. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +4 -0
  373. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +1 -0
  374. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +273 -0
  375. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -0
  376. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +4 -0
  377. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +1 -0
  378. package/dist/billing/modules/earnings/pages/PayoutsPage.js +480 -0
  379. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -0
  380. package/dist/billing/modules/plans/hooks/index.d.ts +7 -0
  381. package/dist/billing/modules/plans/hooks/index.d.ts.map +1 -0
  382. package/dist/billing/modules/plans/hooks/index.js +2 -0
  383. package/dist/billing/modules/plans/hooks/usePlans.d.ts +46 -0
  384. package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +1 -0
  385. package/dist/billing/modules/plans/hooks/usePlans.js +77 -0
  386. package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -0
  387. package/dist/billing/modules/plans/hooks/useQuotas.d.ts +27 -0
  388. package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +1 -0
  389. package/dist/billing/modules/plans/hooks/useQuotas.js +21 -0
  390. package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -0
  391. package/dist/billing/modules/plans/index.d.ts +7 -0
  392. package/dist/billing/modules/plans/index.d.ts.map +1 -0
  393. package/dist/billing/modules/plans/index.js +11 -0
  394. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +4 -0
  395. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +1 -0
  396. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +264 -0
  397. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -0
  398. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +4 -0
  399. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +1 -0
  400. package/dist/billing/modules/plans/pages/PlanCreatePage.js +368 -0
  401. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -0
  402. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +4 -0
  403. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +1 -0
  404. package/dist/billing/modules/plans/pages/PlanDetailPage.js +356 -0
  405. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -0
  406. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +4 -0
  407. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +1 -0
  408. package/dist/billing/modules/plans/pages/PlanEditPage.js +395 -0
  409. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -0
  410. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +4 -0
  411. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +1 -0
  412. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +314 -0
  413. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -0
  414. package/dist/billing/modules/plans/pages/PlansListPage.d.ts +4 -0
  415. package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +1 -0
  416. package/dist/billing/modules/plans/pages/PlansListPage.js +438 -0
  417. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -0
  418. package/dist/billing/modules/plans/pages/index.d.ts +11 -0
  419. package/dist/billing/modules/plans/pages/index.d.ts.map +1 -0
  420. package/dist/billing/modules/plans/pages/index.js +6 -0
  421. package/dist/billing/modules/quota/hooks/index.d.ts +6 -0
  422. package/dist/billing/modules/quota/hooks/index.d.ts.map +1 -0
  423. package/dist/billing/modules/quota/hooks/index.js +2 -0
  424. package/dist/billing/modules/quota/hooks/useQuota.d.ts +102 -0
  425. package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +1 -0
  426. package/dist/billing/modules/quota/hooks/useQuota.js +63 -0
  427. package/dist/billing/modules/quota/hooks/useQuota.js.map +1 -0
  428. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +39 -0
  429. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +1 -0
  430. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +67 -0
  431. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -0
  432. package/dist/billing/modules/quota/index.d.ts +6 -0
  433. package/dist/billing/modules/quota/index.d.ts.map +1 -0
  434. package/dist/billing/modules/quota/index.js +10 -0
  435. package/dist/billing/modules/quota/pages/QuotaPage.d.ts +4 -0
  436. package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +1 -0
  437. package/dist/billing/modules/quota/pages/QuotaPage.js +337 -0
  438. package/dist/billing/modules/quota/pages/QuotaPage.js.map +1 -0
  439. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +4 -0
  440. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +1 -0
  441. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +273 -0
  442. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -0
  443. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +4 -0
  444. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +1 -0
  445. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +272 -0
  446. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -0
  447. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +4 -0
  448. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +1 -0
  449. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +316 -0
  450. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -0
  451. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +4 -0
  452. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +1 -0
  453. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +401 -0
  454. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -0
  455. package/dist/billing/modules/quota/pages/index.d.ts +9 -0
  456. package/dist/billing/modules/quota/pages/index.d.ts.map +1 -0
  457. package/dist/billing/modules/quota/pages/index.js +5 -0
  458. package/dist/billing/modules/settings/index.d.ts +5 -0
  459. package/dist/billing/modules/settings/index.d.ts.map +1 -0
  460. package/dist/billing/modules/settings/index.js +4 -0
  461. package/dist/billing/modules/settings/pages/SettingsPage.d.ts +4 -0
  462. package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +1 -0
  463. package/dist/billing/modules/settings/pages/SettingsPage.js +632 -0
  464. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -0
  465. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +4 -0
  466. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +1 -0
  467. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +270 -0
  468. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -0
  469. package/dist/billing/modules/settings/pages/index.d.ts +6 -0
  470. package/dist/billing/modules/settings/pages/index.d.ts.map +1 -0
  471. package/dist/billing/modules/settings/pages/index.js +2 -0
  472. package/dist/billing/modules/store/graphql/index.d.ts +6 -0
  473. package/dist/billing/modules/store/graphql/index.d.ts.map +1 -0
  474. package/dist/billing/modules/store/graphql/index.js +1 -0
  475. package/dist/billing/modules/store/index.d.ts +6 -0
  476. package/dist/billing/modules/store/index.d.ts.map +1 -0
  477. package/dist/billing/modules/store/index.js +3 -0
  478. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +11 -0
  479. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +1 -0
  480. package/dist/billing/modules/store/pages/StoreCheckoutPage.js +18 -0
  481. package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -0
  482. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +12 -0
  483. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +1 -0
  484. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +167 -0
  485. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -0
  486. package/dist/billing/modules/subscriptions/hooks/index.d.ts +6 -0
  487. package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +1 -0
  488. package/dist/billing/modules/subscriptions/hooks/index.js +1 -0
  489. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +92 -0
  490. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +1 -0
  491. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +136 -0
  492. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -0
  493. package/dist/billing/modules/subscriptions/index.d.ts +7 -0
  494. package/dist/billing/modules/subscriptions/index.d.ts.map +1 -0
  495. package/dist/billing/modules/subscriptions/index.js +7 -0
  496. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +4 -0
  497. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +1 -0
  498. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +551 -0
  499. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -0
  500. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +4 -0
  501. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +1 -0
  502. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +529 -0
  503. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -0
  504. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +4 -0
  505. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +1 -0
  506. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +430 -0
  507. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -0
  508. package/dist/billing/modules/subscriptions/pages/index.d.ts +8 -0
  509. package/dist/billing/modules/subscriptions/pages/index.d.ts.map +1 -0
  510. package/dist/billing/modules/subscriptions/pages/index.js +3 -0
  511. package/dist/billing/modules/usage/hooks/index.d.ts +6 -0
  512. package/dist/billing/modules/usage/hooks/index.d.ts.map +1 -0
  513. package/dist/billing/modules/usage/hooks/index.js +1 -0
  514. package/dist/billing/modules/usage/hooks/useUsage.d.ts +203 -0
  515. package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +1 -0
  516. package/dist/billing/modules/usage/hooks/useUsage.js +271 -0
  517. package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -0
  518. package/dist/billing/modules/usage/index.d.ts +6 -0
  519. package/dist/billing/modules/usage/index.d.ts.map +1 -0
  520. package/dist/billing/modules/usage/index.js +5 -0
  521. package/dist/billing/modules/usage/pages/UsagePage.d.ts +4 -0
  522. package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +1 -0
  523. package/dist/billing/modules/usage/pages/UsagePage.js +817 -0
  524. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -0
  525. package/dist/billing/modules/usage/pages/index.d.ts +5 -0
  526. package/dist/billing/modules/usage/pages/index.d.ts.map +1 -0
  527. package/dist/billing/modules/usage/pages/index.js +1 -0
  528. package/dist/billing/providers/BillingProvider.d.ts +16 -0
  529. package/dist/billing/providers/BillingProvider.d.ts.map +1 -0
  530. package/dist/billing/providers/BillingProvider.js +40 -0
  531. package/dist/billing/providers/BillingProvider.js.map +1 -0
  532. package/dist/billing/shared/components/AccessDenied.d.ts +8 -0
  533. package/dist/billing/shared/components/AccessDenied.d.ts.map +1 -0
  534. package/dist/billing/shared/components/AccessDenied.js +44 -0
  535. package/dist/billing/shared/components/AccessDenied.js.map +1 -0
  536. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +11 -0
  537. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +1 -0
  538. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +230 -0
  539. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -0
  540. package/dist/billing/shared/components/EmptyState.d.ts +11 -0
  541. package/dist/billing/shared/components/EmptyState.d.ts.map +1 -0
  542. package/dist/billing/shared/components/EmptyState.js +27 -0
  543. package/dist/billing/shared/components/EmptyState.js.map +1 -0
  544. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +11 -0
  545. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +1 -0
  546. package/dist/billing/shared/components/GeoPricingOverridesEditor.js +1 -0
  547. package/dist/billing/shared/components/PageHeader.d.ts +11 -0
  548. package/dist/billing/shared/components/PageHeader.d.ts.map +1 -0
  549. package/dist/billing/shared/components/PageHeader.js +25 -0
  550. package/dist/billing/shared/components/PageHeader.js.map +1 -0
  551. package/dist/billing/shared/components/ServerError.d.ts +11 -0
  552. package/dist/billing/shared/components/ServerError.d.ts.map +1 -0
  553. package/dist/billing/shared/components/ServerError.js +75 -0
  554. package/dist/billing/shared/components/ServerError.js.map +1 -0
  555. package/dist/billing/shared/components/StatCard.d.ts +15 -0
  556. package/dist/billing/shared/components/StatCard.d.ts.map +1 -0
  557. package/dist/billing/shared/components/StatCard.js +37 -0
  558. package/dist/billing/shared/components/StatCard.js.map +1 -0
  559. package/dist/billing/shared/components/index.d.ts +11 -0
  560. package/dist/billing/shared/components/index.d.ts.map +1 -0
  561. package/dist/billing/shared/components/index.js +7 -0
  562. package/dist/billing/shared/index.d.ts +8 -0
  563. package/dist/billing/shared/index.d.ts.map +1 -0
  564. package/dist/billing/shared/types/graphql.d.ts +926 -0
  565. package/dist/billing/shared/types/graphql.d.ts.map +1 -0
  566. package/dist/billing/shared/types/graphql.js +30 -0
  567. package/dist/billing/shared/types/graphql.js.map +1 -0
  568. package/dist/billing/shared/types/index.d.ts +96 -0
  569. package/dist/billing/shared/types/index.d.ts.map +1 -0
  570. package/dist/billing/shared/utils/directActivityGraphql.d.ts +13 -0
  571. package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +1 -0
  572. package/dist/billing/shared/utils/directActivityGraphql.js +2 -0
  573. package/dist/billing/shared/utils/directBillingGraphql.d.ts +13 -0
  574. package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +1 -0
  575. package/dist/billing/shared/utils/directBillingGraphql.js +22 -0
  576. package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -0
  577. package/dist/billing/shared/utils/error.d.ts +30 -0
  578. package/dist/billing/shared/utils/error.d.ts.map +1 -0
  579. package/dist/billing/shared/utils/error.js +16 -0
  580. package/dist/billing/shared/utils/error.js.map +1 -0
  581. package/dist/billing/shared/utils/format.d.ts +28 -0
  582. package/dist/billing/shared/utils/format.d.ts.map +1 -0
  583. package/dist/billing/shared/utils/format.js +65 -0
  584. package/dist/billing/shared/utils/format.js.map +1 -0
  585. package/dist/billing/shared/utils/gatewayGraphql.d.ts +15 -0
  586. package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +1 -0
  587. package/dist/billing/shared/utils/gatewayGraphql.js +27 -0
  588. package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -0
  589. package/dist/billing/shared/utils/index.d.ts +13 -0
  590. package/dist/billing/shared/utils/index.d.ts.map +1 -0
  591. package/dist/billing/shared/utils/index.js +8 -0
  592. package/dist/billing/shared/utils/navigation.d.ts +2 -0
  593. package/dist/billing/shared/utils/navigation.d.ts.map +1 -0
  594. package/dist/billing/shared/utils/navigation.js +8 -0
  595. package/dist/billing/shared/utils/navigation.js.map +1 -0
  596. package/dist/billing/shared/utils/paymentTheme.d.ts +18 -0
  597. package/dist/billing/shared/utils/paymentTheme.d.ts.map +1 -0
  598. package/dist/billing/shared/utils/paymentTheme.js +32 -0
  599. package/dist/billing/shared/utils/paymentTheme.js.map +1 -0
  600. package/dist/billing/shared/utils/status.d.ts +28 -0
  601. package/dist/billing/shared/utils/status.d.ts.map +1 -0
  602. package/dist/billing/shared/utils/status.js +57 -0
  603. package/dist/billing/shared/utils/status.js.map +1 -0
  604. package/dist/billing/shared/utils/tokens.d.ts +156 -0
  605. package/dist/billing/shared/utils/tokens.d.ts.map +1 -0
  606. package/dist/billing/shared/utils/tokens.js +128 -0
  607. package/dist/billing/shared/utils/tokens.js.map +1 -0
  608. package/dist/billing/types/index.d.ts +268 -0
  609. package/dist/billing/types/index.d.ts.map +1 -0
  610. package/dist/billing/utils/index.d.ts +128 -0
  611. package/dist/billing/utils/index.d.ts.map +1 -0
  612. package/dist/dev/main.d.ts +2 -0
  613. package/dist/dev/main.d.ts.map +1 -0
  614. package/dist/generated/global-operations.d.ts +9544 -0
  615. package/dist/generated/global-operations.d.ts.map +1 -0
  616. package/dist/generated/global-operations.js +3542 -0
  617. package/dist/generated/global-operations.js.map +1 -0
  618. package/dist/generated/global-types.d.ts +22208 -0
  619. package/dist/generated/global-types.d.ts.map +1 -0
  620. package/dist/generated/global-types.js +12 -0
  621. package/dist/generated/global-types.js.map +1 -0
  622. package/dist/generated/wspace-operations.d.ts +61 -0
  623. package/dist/generated/wspace-operations.d.ts.map +1 -0
  624. package/dist/generated/wspace-operations.js +35 -0
  625. package/dist/generated/wspace-operations.js.map +1 -0
  626. package/dist/generated/wspace-types.d.ts +48578 -0
  627. package/dist/generated/wspace-types.d.ts.map +1 -0
  628. package/dist/index.d.ts +8 -0
  629. package/dist/index.d.ts.map +1 -0
  630. package/dist/index.js +2 -0
  631. package/dist/node_modules/@capacitor/core/dist/index.js +270 -0
  632. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
  633. package/dist/utils/nativeBridge.d.ts +3 -0
  634. package/dist/utils/nativeBridge.d.ts.map +1 -0
  635. package/dist/utils/nativeBridge.js +2 -0
  636. package/package.json +112 -0
@@ -0,0 +1,1009 @@
1
+ import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
2
+ import "../../../shared/components/index.js";
3
+ import { formatCurrency as t, formatDate as n } from "../../../shared/utils/format.js";
4
+ import { useBillingPermissions as r } from "../../../hooks/useBillingPermissions.js";
5
+ import { useCreateDiscountMutation as i, useDeleteDiscountMutation as a, useGetDiscountsQuery as o, useUpdateDiscountMutation as s } from "../../../../generated/global-operations.js";
6
+ import { nativeImpact as ee, nativeNotify as c } from "../../../../utils/nativeBridge.js";
7
+ import { useMemo as l, useState as u } from "react";
8
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
+ import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ //#region src/billing/modules/discounts/pages/DiscountsListPage.tsx
11
+ function m(e) {
12
+ return e.validUntil ? new Date(e.validUntil) < /* @__PURE__ */ new Date() : !1;
13
+ }
14
+ function h(e) {
15
+ return e.type === "PERCENTAGE" ? `${e.value}%` : t(e.value, e.currency ?? "USD");
16
+ }
17
+ var g = {
18
+ code: "",
19
+ type: "PERCENTAGE",
20
+ value: "",
21
+ currency: "USD",
22
+ maxUses: "",
23
+ validFrom: "",
24
+ validUntil: ""
25
+ }, _ = () => {
26
+ let { t } = p(), n = (e, n) => {
27
+ let r = t(e);
28
+ return r === e ? n : r;
29
+ }, _ = r(), { data: te, loading: b, error: x, refetch: S } = o(), [C, { loading: w }] = i(), [T, { loading: E }] = s(), [D, { loading: O }] = a(), [k, A] = u(""), [j, M] = u({ kind: "closed" }), [N, P] = u(g), [F, I] = u({
30
+ maxUses: "",
31
+ validUntil: ""
32
+ }), [L, R] = u(null), [z, B] = u(/* @__PURE__ */ new Set()), [V, H] = u(!1), U = te?.getDiscounts ?? [], W = U.filter((e) => k ? e.code.toLowerCase().includes(k.toLowerCase()) : !0), G = l(() => W.filter((e) => z.has(e.id)), [W, z]), K = W.length > 0 && W.every((e) => z.has(e.id)), q = W.some((e) => z.has(e.id)) && !K;
33
+ if (!_.canManageDiscounts) return /* @__PURE__ */ d(e, { message: "You don't have permission to manage discount codes." });
34
+ let J = U.length, Y = U.filter((e) => !m(e)).length, X = U.filter((e) => m(e)).length, Z = () => {
35
+ P(g), R(null), M({ kind: "create" });
36
+ }, ne = (e) => {
37
+ I({
38
+ maxUses: e.maxUses == null ? "" : String(e.maxUses),
39
+ validUntil: e.validUntil ? new Date(e.validUntil).toISOString().slice(0, 16) : ""
40
+ }), R(null), M({
41
+ kind: "edit",
42
+ discount: e
43
+ });
44
+ }, re = (e) => {
45
+ R(null), M({
46
+ kind: "delete",
47
+ discount: e
48
+ });
49
+ }, Q = () => {
50
+ M({ kind: "closed" }), R(null);
51
+ }, ie = async (e) => {
52
+ if (e.preventDefault(), R(null), !N.code.trim()) {
53
+ R("Discount code is required.");
54
+ return;
55
+ }
56
+ let t = Number(N.value);
57
+ if (Number.isNaN(t) || t <= 0) {
58
+ R("Value must be a positive number.");
59
+ return;
60
+ }
61
+ if (N.type === "PERCENTAGE" && t > 100) {
62
+ R("Percentage value cannot exceed 100.");
63
+ return;
64
+ }
65
+ try {
66
+ await C({ variables: {
67
+ code: N.code.trim().toUpperCase(),
68
+ type: N.type,
69
+ value: t,
70
+ currency: N.type === "FIXED" ? N.currency : null,
71
+ maxUses: N.maxUses ? Number(N.maxUses) : null,
72
+ validFrom: N.validFrom ? new Date(N.validFrom).toISOString() : null,
73
+ validUntil: N.validUntil ? new Date(N.validUntil).toISOString() : null
74
+ } }), await S(), Q();
75
+ } catch (e) {
76
+ R(e instanceof Error ? e.message : "Failed to create discount.");
77
+ }
78
+ }, ae = async (e) => {
79
+ if (e.preventDefault(), j.kind === "edit") {
80
+ R(null);
81
+ try {
82
+ await T({ variables: {
83
+ id: j.discount.id,
84
+ maxUses: F.maxUses ? Number(F.maxUses) : null,
85
+ validUntil: F.validUntil ? new Date(F.validUntil).toISOString() : null
86
+ } }), await S(), Q();
87
+ } catch (e) {
88
+ R(e instanceof Error ? e.message : "Failed to update discount.");
89
+ }
90
+ }
91
+ }, oe = async () => {
92
+ if (j.kind === "delete") {
93
+ R(null), ee("medium");
94
+ try {
95
+ await D({ variables: { id: j.discount.id } }), c("success"), await S(), Q();
96
+ } catch (e) {
97
+ c("error"), R(e instanceof Error ? e.message : "Failed to delete discount.");
98
+ }
99
+ }
100
+ }, se = async () => {
101
+ G.length !== 0 && (R(null), H(!1), await Promise.allSettled(G.map((e) => D({ variables: { id: e.id } }))), await S(), B(/* @__PURE__ */ new Set()));
102
+ }, ce = (e, t) => {
103
+ B((n) => {
104
+ let r = new Set(n);
105
+ return t ? r.add(e) : r.delete(e), r;
106
+ }), H(!1);
107
+ }, $ = (e) => {
108
+ B((t) => {
109
+ let n = new Set(t);
110
+ return W.forEach((t) => {
111
+ e ? n.add(t.id) : n.delete(t.id);
112
+ }), n;
113
+ }), H(!1);
114
+ };
115
+ return b && U.length === 0 ? /* @__PURE__ */ f("div", {
116
+ className: "space-y-6 p-6",
117
+ children: [
118
+ /* @__PURE__ */ d("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }),
119
+ /* @__PURE__ */ d("div", {
120
+ className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
121
+ children: [
122
+ 1,
123
+ 2,
124
+ 3
125
+ ].map((e) => /* @__PURE__ */ f("div", {
126
+ className: "border border-border rounded-lg p-4 space-y-2",
127
+ children: [/* @__PURE__ */ d("div", { className: "h-4 w-24 bg-muted animate-pulse rounded" }), /* @__PURE__ */ d("div", { className: "h-6 w-16 bg-muted animate-pulse rounded" })]
128
+ }, e))
129
+ }),
130
+ /* @__PURE__ */ d("div", {
131
+ className: "space-y-3",
132
+ children: [
133
+ 1,
134
+ 2,
135
+ 3,
136
+ 4,
137
+ 5
138
+ ].map((e) => /* @__PURE__ */ d("div", {
139
+ className: "border border-border rounded-lg p-4",
140
+ children: /* @__PURE__ */ f("div", {
141
+ className: "flex items-center gap-4",
142
+ children: [/* @__PURE__ */ d("div", { className: "h-10 w-10 bg-muted animate-pulse rounded" }), /* @__PURE__ */ f("div", {
143
+ className: "flex-1 space-y-2",
144
+ children: [/* @__PURE__ */ d("div", { className: "h-4 w-32 bg-muted animate-pulse rounded" }), /* @__PURE__ */ d("div", { className: "h-3 w-48 bg-muted animate-pulse rounded" })]
145
+ })]
146
+ })
147
+ }, e))
148
+ })
149
+ ]
150
+ }) : x ? /* @__PURE__ */ d("div", {
151
+ className: "flex items-center justify-center h-full min-h-[400px]",
152
+ children: /* @__PURE__ */ f("div", {
153
+ className: "text-center space-y-4",
154
+ children: [
155
+ /* @__PURE__ */ d("div", {
156
+ className: "w-12 h-12 mx-auto rounded-full bg-destructive/10 flex items-center justify-center",
157
+ children: /* @__PURE__ */ d("svg", {
158
+ className: "w-6 h-6 text-destructive",
159
+ fill: "none",
160
+ viewBox: "0 0 24 24",
161
+ stroke: "currentColor",
162
+ children: /* @__PURE__ */ d("path", {
163
+ strokeLinecap: "round",
164
+ strokeLinejoin: "round",
165
+ strokeWidth: 2,
166
+ d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
167
+ })
168
+ })
169
+ }),
170
+ /* @__PURE__ */ d("h2", {
171
+ className: "text-lg font-semibold text-foreground",
172
+ children: "Failed to load discounts"
173
+ }),
174
+ /* @__PURE__ */ d("p", {
175
+ className: "text-sm text-muted-foreground",
176
+ children: x.message
177
+ }),
178
+ /* @__PURE__ */ d("button", {
179
+ onClick: () => S(),
180
+ className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
181
+ children: "Try Again"
182
+ })
183
+ ]
184
+ })
185
+ }) : /* @__PURE__ */ f("div", {
186
+ className: "space-y-6 p-6",
187
+ children: [
188
+ /* @__PURE__ */ f("div", {
189
+ className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
190
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
191
+ className: "text-2xl font-bold text-foreground",
192
+ children: "Discount Codes"
193
+ }), /* @__PURE__ */ d("p", {
194
+ className: "text-sm text-muted-foreground mt-1",
195
+ children: "Create, view, and manage discount codes for billing"
196
+ })] }), /* @__PURE__ */ f("button", {
197
+ onClick: Z,
198
+ className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
199
+ children: [/* @__PURE__ */ d("svg", {
200
+ className: "w-4 h-4",
201
+ fill: "none",
202
+ viewBox: "0 0 24 24",
203
+ stroke: "currentColor",
204
+ children: /* @__PURE__ */ d("path", {
205
+ strokeLinecap: "round",
206
+ strokeLinejoin: "round",
207
+ strokeWidth: 2,
208
+ d: "M12 4v16m8-8H4"
209
+ })
210
+ }), "Create Discount"]
211
+ })]
212
+ }),
213
+ /* @__PURE__ */ f("div", {
214
+ className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
215
+ children: [
216
+ /* @__PURE__ */ f("div", {
217
+ className: "border border-border rounded-lg bg-card p-4",
218
+ children: [/* @__PURE__ */ d("p", {
219
+ className: "text-sm text-muted-foreground",
220
+ children: "Total Discounts"
221
+ }), /* @__PURE__ */ d("p", {
222
+ className: "text-xl font-semibold text-foreground mt-1",
223
+ children: J
224
+ })]
225
+ }),
226
+ /* @__PURE__ */ f("div", {
227
+ className: "border border-border rounded-lg bg-card p-4",
228
+ children: [/* @__PURE__ */ d("p", {
229
+ className: "text-sm text-muted-foreground",
230
+ children: "Active"
231
+ }), /* @__PURE__ */ d("p", {
232
+ className: "text-xl font-semibold text-status-success-text mt-1",
233
+ children: Y
234
+ })]
235
+ }),
236
+ /* @__PURE__ */ f("div", {
237
+ className: "border border-border rounded-lg bg-card p-4",
238
+ children: [/* @__PURE__ */ d("p", {
239
+ className: "text-sm text-muted-foreground",
240
+ children: "Expired"
241
+ }), /* @__PURE__ */ d("p", {
242
+ className: "text-xl font-semibold text-status-warning-text mt-1",
243
+ children: X
244
+ })]
245
+ })
246
+ ]
247
+ }),
248
+ /* @__PURE__ */ d("div", {
249
+ className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border",
250
+ children: /* @__PURE__ */ f("div", {
251
+ className: "relative flex-1 min-w-[200px] max-w-md",
252
+ children: [/* @__PURE__ */ d("svg", {
253
+ className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground",
254
+ fill: "none",
255
+ viewBox: "0 0 24 24",
256
+ stroke: "currentColor",
257
+ children: /* @__PURE__ */ d("path", {
258
+ strokeLinecap: "round",
259
+ strokeLinejoin: "round",
260
+ strokeWidth: 2,
261
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
262
+ })
263
+ }), /* @__PURE__ */ d("input", {
264
+ type: "text",
265
+ placeholder: "Search by discount code...",
266
+ value: k,
267
+ onChange: (e) => A(e.target.value),
268
+ className: "w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
269
+ })]
270
+ })
271
+ }),
272
+ W.length > 0 && /* @__PURE__ */ f("div", {
273
+ className: "flex flex-col gap-3 rounded-lg border border-border bg-card p-4 sm:flex-row sm:items-center sm:justify-between",
274
+ children: [/* @__PURE__ */ f("label", {
275
+ className: "flex items-center gap-2 text-sm text-foreground",
276
+ children: [/* @__PURE__ */ d("input", {
277
+ type: "checkbox",
278
+ checked: K,
279
+ ref: (e) => {
280
+ e && (e.indeterminate = q && !K);
281
+ },
282
+ onChange: (e) => $(e.target.checked),
283
+ "aria-label": "Select all discounts",
284
+ className: "h-4 w-4 rounded border-border text-primary"
285
+ }), /* @__PURE__ */ d("span", { children: "Select all visible" })]
286
+ }), /* @__PURE__ */ f("div", {
287
+ className: "flex items-center gap-2",
288
+ children: [
289
+ /* @__PURE__ */ f("span", {
290
+ className: "text-sm text-muted-foreground",
291
+ children: [z.size, " selected"]
292
+ }),
293
+ z.size > 0 && /* @__PURE__ */ d("button", {
294
+ onClick: () => {
295
+ B(/* @__PURE__ */ new Set()), H(!1);
296
+ },
297
+ className: "text-sm text-muted-foreground hover:text-foreground",
298
+ children: "Clear selection"
299
+ }),
300
+ /* @__PURE__ */ f("button", {
301
+ onClick: () => H(!0),
302
+ disabled: G.length === 0 || O,
303
+ className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium border border-destructive/30 text-destructive rounded-md hover:bg-destructive/10 transition-colors disabled:opacity-50",
304
+ children: ["Delete Selected", G.length > 0 ? ` (${G.length})` : ""]
305
+ })
306
+ ]
307
+ })]
308
+ }),
309
+ V && G.length > 0 && /* @__PURE__ */ d("div", {
310
+ className: "rounded-lg border border-destructive/30 bg-destructive/5 p-4",
311
+ children: /* @__PURE__ */ f("div", {
312
+ className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
313
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
314
+ className: "text-sm font-medium text-foreground",
315
+ children: [
316
+ "Delete ",
317
+ G.length,
318
+ " selected discount",
319
+ G.length === 1 ? "" : "s",
320
+ "?"
321
+ ]
322
+ }), /* @__PURE__ */ d("p", {
323
+ className: "text-sm text-muted-foreground",
324
+ children: "This action cannot be undone."
325
+ })] }), /* @__PURE__ */ f("div", {
326
+ className: "flex items-center gap-2",
327
+ children: [/* @__PURE__ */ d("button", {
328
+ onClick: () => H(!1),
329
+ className: "px-3 py-2 text-sm font-medium text-muted-foreground hover:text-foreground",
330
+ children: "Cancel"
331
+ }), /* @__PURE__ */ d("button", {
332
+ onClick: se,
333
+ disabled: O,
334
+ className: "inline-flex items-center gap-2 rounded-md bg-destructive px-3 py-2 text-sm font-medium text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",
335
+ children: "Confirm Delete"
336
+ })]
337
+ })]
338
+ })
339
+ }),
340
+ W.length === 0 ? /* @__PURE__ */ f("div", {
341
+ className: "flex flex-col items-center justify-center py-12 border border-dashed border-border rounded-lg",
342
+ children: [
343
+ /* @__PURE__ */ d("div", {
344
+ className: "w-12 h-12 rounded-full bg-muted flex items-center justify-center mb-4",
345
+ children: /* @__PURE__ */ d("svg", {
346
+ className: "w-6 h-6 text-muted-foreground",
347
+ fill: "none",
348
+ viewBox: "0 0 24 24",
349
+ stroke: "currentColor",
350
+ children: /* @__PURE__ */ d("path", {
351
+ strokeLinecap: "round",
352
+ strokeLinejoin: "round",
353
+ strokeWidth: 2,
354
+ d: "M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A2 2 0 013 12V7a4 4 0 014-4z"
355
+ })
356
+ })
357
+ }),
358
+ /* @__PURE__ */ d("h3", {
359
+ className: "text-lg font-medium text-foreground",
360
+ children: "No discount codes found"
361
+ }),
362
+ /* @__PURE__ */ d("p", {
363
+ className: "text-sm text-muted-foreground mt-1",
364
+ children: k ? "No discount codes match your search." : "Create your first discount code to get started."
365
+ }),
366
+ !k && /* @__PURE__ */ d("button", {
367
+ onClick: Z,
368
+ className: "mt-4 px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
369
+ children: "Create your first discount"
370
+ })
371
+ ]
372
+ }) : /* @__PURE__ */ d("div", {
373
+ className: "border border-border rounded-lg overflow-hidden",
374
+ children: /* @__PURE__ */ d("div", {
375
+ className: "overflow-x-auto",
376
+ children: /* @__PURE__ */ f("table", {
377
+ className: "w-full",
378
+ children: [/* @__PURE__ */ d("thead", {
379
+ className: "bg-muted/50",
380
+ children: /* @__PURE__ */ f("tr", { children: [
381
+ /* @__PURE__ */ d("th", {
382
+ className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground w-12",
383
+ children: /* @__PURE__ */ d("input", {
384
+ type: "checkbox",
385
+ checked: K,
386
+ ref: (e) => {
387
+ e && (e.indeterminate = q && !K);
388
+ },
389
+ onChange: (e) => $(e.target.checked),
390
+ "aria-label": "Select all discounts",
391
+ className: "h-4 w-4 rounded border-border text-primary"
392
+ })
393
+ }),
394
+ /* @__PURE__ */ d("th", {
395
+ className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground",
396
+ children: "Code"
397
+ }),
398
+ /* @__PURE__ */ d("th", {
399
+ className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground",
400
+ children: "Type"
401
+ }),
402
+ /* @__PURE__ */ d("th", {
403
+ className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground",
404
+ children: "Value"
405
+ }),
406
+ /* @__PURE__ */ d("th", {
407
+ className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground hidden md:table-cell",
408
+ children: "Uses"
409
+ }),
410
+ /* @__PURE__ */ d("th", {
411
+ className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground hidden lg:table-cell",
412
+ children: "Valid From"
413
+ }),
414
+ /* @__PURE__ */ d("th", {
415
+ className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground hidden sm:table-cell",
416
+ children: "Valid Until"
417
+ }),
418
+ /* @__PURE__ */ d("th", {
419
+ className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground",
420
+ children: "Status"
421
+ }),
422
+ /* @__PURE__ */ d("th", {
423
+ className: "text-right px-4 py-3 text-sm font-medium text-muted-foreground",
424
+ children: "Actions"
425
+ })
426
+ ] })
427
+ }), /* @__PURE__ */ d("tbody", {
428
+ className: "divide-y divide-border",
429
+ children: W.map((e) => /* @__PURE__ */ d(v, {
430
+ discount: e,
431
+ selected: z.has(e.id),
432
+ onToggleSelect: ce,
433
+ onEdit: ne,
434
+ onDelete: re
435
+ }, e.id))
436
+ })]
437
+ })
438
+ })
439
+ }),
440
+ j.kind === "create" && /* @__PURE__ */ d(y, {
441
+ onClose: Q,
442
+ children: /* @__PURE__ */ f("form", {
443
+ onSubmit: ie,
444
+ className: "space-y-4",
445
+ children: [
446
+ /* @__PURE__ */ f("div", {
447
+ className: "flex items-center justify-between mb-2",
448
+ children: [/* @__PURE__ */ d("h2", {
449
+ className: "text-lg font-semibold text-foreground",
450
+ children: n("billing.discounts.createDiscountCode", "Create Discount Code")
451
+ }), /* @__PURE__ */ d("button", {
452
+ type: "button",
453
+ onClick: Q,
454
+ className: "p-1.5 rounded hover:bg-muted transition-colors",
455
+ children: /* @__PURE__ */ d("svg", {
456
+ className: "w-5 h-5 text-muted-foreground",
457
+ fill: "none",
458
+ viewBox: "0 0 24 24",
459
+ stroke: "currentColor",
460
+ children: /* @__PURE__ */ d("path", {
461
+ strokeLinecap: "round",
462
+ strokeLinejoin: "round",
463
+ strokeWidth: 2,
464
+ d: "M6 18L18 6M6 6l12 12"
465
+ })
466
+ })
467
+ })]
468
+ }),
469
+ L && /* @__PURE__ */ d("div", {
470
+ className: "p-3 text-sm text-destructive bg-destructive/10 border border-destructive/20 rounded-md",
471
+ children: L
472
+ }),
473
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
474
+ htmlFor: "create-code",
475
+ className: "block text-sm font-medium text-foreground mb-1",
476
+ children: [
477
+ n("billing.discounts.code", "Code"),
478
+ " ",
479
+ /* @__PURE__ */ d("span", {
480
+ className: "text-destructive",
481
+ children: "*"
482
+ })
483
+ ]
484
+ }), /* @__PURE__ */ d("input", {
485
+ id: "create-code",
486
+ type: "text",
487
+ required: !0,
488
+ value: N.code,
489
+ onChange: (e) => P((t) => ({
490
+ ...t,
491
+ code: e.target.value
492
+ })),
493
+ placeholder: n("billing.discounts.codePlaceholder", "e.g. SUMMER25"),
494
+ className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent uppercase"
495
+ })] }),
496
+ /* @__PURE__ */ f("div", {
497
+ className: "grid grid-cols-2 gap-4",
498
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
499
+ htmlFor: "create-type",
500
+ className: "block text-sm font-medium text-foreground mb-1",
501
+ children: [
502
+ n("billing.discounts.type", "Type"),
503
+ " ",
504
+ /* @__PURE__ */ d("span", {
505
+ className: "text-destructive",
506
+ children: "*"
507
+ })
508
+ ]
509
+ }), /* @__PURE__ */ f("select", {
510
+ id: "create-type",
511
+ value: N.type,
512
+ onChange: (e) => P((t) => ({
513
+ ...t,
514
+ type: e.target.value
515
+ })),
516
+ className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
517
+ children: [/* @__PURE__ */ d("option", {
518
+ value: "PERCENTAGE",
519
+ children: n("billing.discounts.typePercentage", "Percentage")
520
+ }), /* @__PURE__ */ d("option", {
521
+ value: "FIXED",
522
+ children: n("billing.discounts.typeFixedAmount", "Fixed Amount")
523
+ })]
524
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
525
+ htmlFor: "create-value",
526
+ className: "block text-sm font-medium text-foreground mb-1",
527
+ children: [
528
+ n("billing.discounts.value", "Value"),
529
+ " ",
530
+ /* @__PURE__ */ d("span", {
531
+ className: "text-destructive",
532
+ children: "*"
533
+ })
534
+ ]
535
+ }), /* @__PURE__ */ f("div", {
536
+ className: "relative",
537
+ children: [/* @__PURE__ */ d("input", {
538
+ id: "create-value",
539
+ type: "number",
540
+ required: !0,
541
+ min: "0.01",
542
+ max: N.type === "PERCENTAGE" ? "100" : void 0,
543
+ step: "0.01",
544
+ value: N.value,
545
+ onChange: (e) => P((t) => ({
546
+ ...t,
547
+ value: e.target.value
548
+ })),
549
+ placeholder: N.type === "PERCENTAGE" ? "10" : "25.00",
550
+ className: "w-full px-3 py-2 pr-8 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
551
+ }), /* @__PURE__ */ d("span", {
552
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",
553
+ children: N.type === "PERCENTAGE" ? "%" : N.currency
554
+ })]
555
+ })] })]
556
+ }),
557
+ N.type === "FIXED" && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
558
+ htmlFor: "create-currency",
559
+ className: "block text-sm font-medium text-foreground mb-1",
560
+ children: n("billing.discounts.currency", "Currency")
561
+ }), /* @__PURE__ */ f("select", {
562
+ id: "create-currency",
563
+ value: N.currency,
564
+ onChange: (e) => P((t) => ({
565
+ ...t,
566
+ currency: e.target.value
567
+ })),
568
+ className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
569
+ children: [
570
+ /* @__PURE__ */ d("option", {
571
+ value: "USD",
572
+ children: "USD"
573
+ }),
574
+ /* @__PURE__ */ d("option", {
575
+ value: "EUR",
576
+ children: "EUR"
577
+ }),
578
+ /* @__PURE__ */ d("option", {
579
+ value: "GBP",
580
+ children: "GBP"
581
+ }),
582
+ /* @__PURE__ */ d("option", {
583
+ value: "INR",
584
+ children: "INR"
585
+ }),
586
+ /* @__PURE__ */ d("option", {
587
+ value: "CAD",
588
+ children: "CAD"
589
+ }),
590
+ /* @__PURE__ */ d("option", {
591
+ value: "AUD",
592
+ children: "AUD"
593
+ })
594
+ ]
595
+ })] }),
596
+ /* @__PURE__ */ f("div", { children: [
597
+ /* @__PURE__ */ d("label", {
598
+ htmlFor: "create-max-uses",
599
+ className: "block text-sm font-medium text-foreground mb-1",
600
+ children: n("billing.discounts.maxUses", "Max Uses")
601
+ }),
602
+ /* @__PURE__ */ d("input", {
603
+ id: "create-max-uses",
604
+ type: "number",
605
+ min: "1",
606
+ step: "1",
607
+ value: N.maxUses,
608
+ onChange: (e) => P((t) => ({
609
+ ...t,
610
+ maxUses: e.target.value
611
+ })),
612
+ placeholder: n("billing.discounts.unlimited", "Unlimited"),
613
+ className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
614
+ }),
615
+ /* @__PURE__ */ d("p", {
616
+ className: "text-xs text-muted-foreground mt-1",
617
+ children: n("billing.discounts.unlimitedHelp", "Leave empty for unlimited uses.")
618
+ })
619
+ ] }),
620
+ /* @__PURE__ */ f("div", {
621
+ className: "grid grid-cols-2 gap-4",
622
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
623
+ htmlFor: "create-valid-from",
624
+ className: "block text-sm font-medium text-foreground mb-1",
625
+ children: n("billing.discounts.validFrom", "Valid From")
626
+ }), /* @__PURE__ */ d("input", {
627
+ id: "create-valid-from",
628
+ type: "datetime-local",
629
+ value: N.validFrom,
630
+ onChange: (e) => P((t) => ({
631
+ ...t,
632
+ validFrom: e.target.value
633
+ })),
634
+ className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
635
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
636
+ htmlFor: "create-valid-until",
637
+ className: "block text-sm font-medium text-foreground mb-1",
638
+ children: n("billing.discounts.validUntil", "Valid Until")
639
+ }), /* @__PURE__ */ d("input", {
640
+ id: "create-valid-until",
641
+ type: "datetime-local",
642
+ value: N.validUntil,
643
+ onChange: (e) => P((t) => ({
644
+ ...t,
645
+ validUntil: e.target.value
646
+ })),
647
+ className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
648
+ })] })]
649
+ }),
650
+ /* @__PURE__ */ f("div", {
651
+ className: "flex items-center justify-end gap-3 pt-2 border-t border-border",
652
+ children: [/* @__PURE__ */ d("button", {
653
+ type: "button",
654
+ onClick: Q,
655
+ className: "px-4 py-2 text-sm font-medium border border-border text-foreground rounded-md hover:bg-muted transition-colors",
656
+ children: n("billing.discounts.cancel", "Cancel")
657
+ }), /* @__PURE__ */ d("button", {
658
+ type: "submit",
659
+ disabled: w,
660
+ className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
661
+ children: w ? n("billing.discounts.creating", "Creating...") : n("billing.discounts.createDiscount", "Create Discount")
662
+ })]
663
+ })
664
+ ]
665
+ })
666
+ }),
667
+ j.kind === "edit" && /* @__PURE__ */ d(y, {
668
+ onClose: Q,
669
+ children: /* @__PURE__ */ f("form", {
670
+ onSubmit: ae,
671
+ className: "space-y-4",
672
+ children: [
673
+ /* @__PURE__ */ f("div", {
674
+ className: "flex items-center justify-between mb-2",
675
+ children: [/* @__PURE__ */ d("h2", {
676
+ className: "text-lg font-semibold text-foreground",
677
+ children: "Edit Discount"
678
+ }), /* @__PURE__ */ d("button", {
679
+ type: "button",
680
+ onClick: Q,
681
+ className: "p-1.5 rounded hover:bg-muted transition-colors",
682
+ children: /* @__PURE__ */ d("svg", {
683
+ className: "w-5 h-5 text-muted-foreground",
684
+ fill: "none",
685
+ viewBox: "0 0 24 24",
686
+ stroke: "currentColor",
687
+ children: /* @__PURE__ */ d("path", {
688
+ strokeLinecap: "round",
689
+ strokeLinejoin: "round",
690
+ strokeWidth: 2,
691
+ d: "M6 18L18 6M6 6l12 12"
692
+ })
693
+ })
694
+ })]
695
+ }),
696
+ L && /* @__PURE__ */ d("div", {
697
+ className: "p-3 text-sm text-destructive bg-destructive/10 border border-destructive/20 rounded-md",
698
+ children: L
699
+ }),
700
+ /* @__PURE__ */ f("div", {
701
+ className: "p-3 bg-muted/50 border border-border rounded-md space-y-1",
702
+ children: [
703
+ /* @__PURE__ */ f("div", {
704
+ className: "flex items-center justify-between text-sm",
705
+ children: [/* @__PURE__ */ d("span", {
706
+ className: "text-muted-foreground",
707
+ children: "Code"
708
+ }), /* @__PURE__ */ d("span", {
709
+ className: "font-mono font-medium text-foreground",
710
+ children: j.discount.code
711
+ })]
712
+ }),
713
+ /* @__PURE__ */ f("div", {
714
+ className: "flex items-center justify-between text-sm",
715
+ children: [/* @__PURE__ */ d("span", {
716
+ className: "text-muted-foreground",
717
+ children: "Type"
718
+ }), /* @__PURE__ */ d("span", {
719
+ className: "text-foreground",
720
+ children: j.discount.type === "PERCENTAGE" ? "Percentage" : "Fixed Amount"
721
+ })]
722
+ }),
723
+ /* @__PURE__ */ f("div", {
724
+ className: "flex items-center justify-between text-sm",
725
+ children: [/* @__PURE__ */ d("span", {
726
+ className: "text-muted-foreground",
727
+ children: "Value"
728
+ }), /* @__PURE__ */ d("span", {
729
+ className: "text-foreground",
730
+ children: h(j.discount)
731
+ })]
732
+ }),
733
+ /* @__PURE__ */ f("div", {
734
+ className: "flex items-center justify-between text-sm",
735
+ children: [/* @__PURE__ */ d("span", {
736
+ className: "text-muted-foreground",
737
+ children: "Used"
738
+ }), /* @__PURE__ */ f("span", {
739
+ className: "text-foreground",
740
+ children: [j.discount.usedCount, " times"]
741
+ })]
742
+ })
743
+ ]
744
+ }),
745
+ /* @__PURE__ */ f("div", { children: [
746
+ /* @__PURE__ */ d("label", {
747
+ htmlFor: "edit-max-uses",
748
+ className: "block text-sm font-medium text-foreground mb-1",
749
+ children: "Max Uses"
750
+ }),
751
+ /* @__PURE__ */ d("input", {
752
+ id: "edit-max-uses",
753
+ type: "number",
754
+ min: "1",
755
+ step: "1",
756
+ value: F.maxUses,
757
+ onChange: (e) => I((t) => ({
758
+ ...t,
759
+ maxUses: e.target.value
760
+ })),
761
+ placeholder: "Unlimited",
762
+ className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
763
+ }),
764
+ /* @__PURE__ */ d("p", {
765
+ className: "text-xs text-muted-foreground mt-1",
766
+ children: "Leave empty for unlimited uses."
767
+ })
768
+ ] }),
769
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
770
+ htmlFor: "edit-valid-until",
771
+ className: "block text-sm font-medium text-foreground mb-1",
772
+ children: "Valid Until"
773
+ }), /* @__PURE__ */ d("input", {
774
+ id: "edit-valid-until",
775
+ type: "datetime-local",
776
+ value: F.validUntil,
777
+ onChange: (e) => I((t) => ({
778
+ ...t,
779
+ validUntil: e.target.value
780
+ })),
781
+ className: "w-full px-3 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
782
+ })] }),
783
+ /* @__PURE__ */ f("div", {
784
+ className: "flex items-center justify-end gap-3 pt-2 border-t border-border",
785
+ children: [/* @__PURE__ */ d("button", {
786
+ type: "button",
787
+ onClick: Q,
788
+ className: "px-4 py-2 text-sm font-medium border border-border text-foreground rounded-md hover:bg-muted transition-colors",
789
+ children: "Cancel"
790
+ }), /* @__PURE__ */ d("button", {
791
+ type: "submit",
792
+ disabled: E,
793
+ className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
794
+ children: E ? "Saving..." : "Save Changes"
795
+ })]
796
+ })
797
+ ]
798
+ })
799
+ }),
800
+ j.kind === "delete" && /* @__PURE__ */ d(y, {
801
+ onClose: Q,
802
+ children: /* @__PURE__ */ f("div", {
803
+ className: "space-y-4",
804
+ children: [
805
+ /* @__PURE__ */ f("div", {
806
+ className: "flex items-center justify-between mb-2",
807
+ children: [/* @__PURE__ */ d("h2", {
808
+ className: "text-lg font-semibold text-foreground",
809
+ children: "Delete Discount"
810
+ }), /* @__PURE__ */ d("button", {
811
+ type: "button",
812
+ onClick: Q,
813
+ className: "p-1.5 rounded hover:bg-muted transition-colors",
814
+ children: /* @__PURE__ */ d("svg", {
815
+ className: "w-5 h-5 text-muted-foreground",
816
+ fill: "none",
817
+ viewBox: "0 0 24 24",
818
+ stroke: "currentColor",
819
+ children: /* @__PURE__ */ d("path", {
820
+ strokeLinecap: "round",
821
+ strokeLinejoin: "round",
822
+ strokeWidth: 2,
823
+ d: "M6 18L18 6M6 6l12 12"
824
+ })
825
+ })
826
+ })]
827
+ }),
828
+ L && /* @__PURE__ */ d("div", {
829
+ className: "p-3 text-sm text-destructive bg-destructive/10 border border-destructive/20 rounded-md",
830
+ children: L
831
+ }),
832
+ /* @__PURE__ */ f("div", {
833
+ className: "flex items-start gap-3",
834
+ children: [/* @__PURE__ */ d("div", {
835
+ className: "w-10 h-10 rounded-full bg-destructive/10 flex items-center justify-center shrink-0",
836
+ children: /* @__PURE__ */ d("svg", {
837
+ className: "w-5 h-5 text-destructive",
838
+ fill: "none",
839
+ viewBox: "0 0 24 24",
840
+ stroke: "currentColor",
841
+ children: /* @__PURE__ */ d("path", {
842
+ strokeLinecap: "round",
843
+ strokeLinejoin: "round",
844
+ strokeWidth: 2,
845
+ d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
846
+ })
847
+ })
848
+ }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
849
+ className: "text-sm text-foreground",
850
+ children: [
851
+ "Are you sure you want to delete the discount code",
852
+ " ",
853
+ /* @__PURE__ */ d("span", {
854
+ className: "font-mono font-semibold",
855
+ children: j.discount.code
856
+ }),
857
+ "?"
858
+ ]
859
+ }), /* @__PURE__ */ f("p", {
860
+ className: "text-sm text-muted-foreground mt-1",
861
+ children: [
862
+ "This action cannot be undone. The discount has been used",
863
+ " ",
864
+ /* @__PURE__ */ d("span", {
865
+ className: "font-medium",
866
+ children: j.discount.usedCount
867
+ }),
868
+ " time",
869
+ j.discount.usedCount === 1 ? "" : "s",
870
+ "."
871
+ ]
872
+ })] })]
873
+ }),
874
+ /* @__PURE__ */ f("div", {
875
+ className: "flex items-center justify-end gap-3 pt-2 border-t border-border",
876
+ children: [/* @__PURE__ */ d("button", {
877
+ type: "button",
878
+ onClick: Q,
879
+ className: "px-4 py-2 text-sm font-medium border border-border text-foreground rounded-md hover:bg-muted transition-colors",
880
+ children: "Cancel"
881
+ }), /* @__PURE__ */ d("button", {
882
+ type: "button",
883
+ onClick: oe,
884
+ disabled: O,
885
+ className: "px-4 py-2 text-sm font-medium bg-destructive text-destructive-foreground rounded-md hover:bg-destructive/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
886
+ children: O ? "Deleting..." : "Delete Discount"
887
+ })]
888
+ })
889
+ ]
890
+ })
891
+ })
892
+ ]
893
+ });
894
+ }, v = ({ discount: e, selected: t, onToggleSelect: r, onEdit: i, onDelete: a }) => {
895
+ let o = m(e);
896
+ return /* @__PURE__ */ f("tr", {
897
+ className: `hover:bg-muted/30 transition-colors ${t ? "bg-muted/20" : ""}`,
898
+ children: [
899
+ /* @__PURE__ */ d("td", {
900
+ className: "px-4 py-4",
901
+ children: /* @__PURE__ */ d("input", {
902
+ type: "checkbox",
903
+ checked: t,
904
+ onChange: (t) => r(e.id, t.target.checked),
905
+ "aria-label": `Select discount ${e.code}`,
906
+ className: "h-4 w-4 rounded border-border text-primary"
907
+ })
908
+ }),
909
+ /* @__PURE__ */ d("td", {
910
+ className: "px-4 py-4",
911
+ children: /* @__PURE__ */ d("span", {
912
+ className: "font-mono font-medium text-foreground",
913
+ children: e.code
914
+ })
915
+ }),
916
+ /* @__PURE__ */ d("td", {
917
+ className: "px-4 py-4",
918
+ children: /* @__PURE__ */ d("span", {
919
+ className: "text-sm text-muted-foreground",
920
+ children: e.type === "PERCENTAGE" ? "Percentage" : "Fixed"
921
+ })
922
+ }),
923
+ /* @__PURE__ */ d("td", {
924
+ className: "px-4 py-4",
925
+ children: /* @__PURE__ */ d("span", {
926
+ className: "text-sm font-medium text-foreground",
927
+ children: h(e)
928
+ })
929
+ }),
930
+ /* @__PURE__ */ d("td", {
931
+ className: "px-4 py-4 hidden md:table-cell",
932
+ children: /* @__PURE__ */ f("span", {
933
+ className: "text-sm text-muted-foreground",
934
+ children: [e.usedCount, e.maxUses == null ? " / ∞" : ` / ${e.maxUses}`]
935
+ })
936
+ }),
937
+ /* @__PURE__ */ d("td", {
938
+ className: "px-4 py-4 text-sm text-muted-foreground hidden lg:table-cell",
939
+ children: e.validFrom ? n(e.validFrom, "short") : "—"
940
+ }),
941
+ /* @__PURE__ */ d("td", {
942
+ className: "px-4 py-4 text-sm text-muted-foreground hidden sm:table-cell",
943
+ children: e.validUntil ? n(e.validUntil, "short") : "—"
944
+ }),
945
+ /* @__PURE__ */ d("td", {
946
+ className: "px-4 py-4",
947
+ children: o ? /* @__PURE__ */ d("span", {
948
+ className: "inline-flex px-2 py-1 text-xs font-medium rounded bg-status-warning-bg-subtle text-status-warning-text",
949
+ children: "Expired"
950
+ }) : /* @__PURE__ */ d("span", {
951
+ className: "inline-flex px-2 py-1 text-xs font-medium rounded bg-status-success-bg-subtle text-status-success-text",
952
+ children: "Active"
953
+ })
954
+ }),
955
+ /* @__PURE__ */ d("td", {
956
+ className: "px-4 py-4 text-right",
957
+ children: /* @__PURE__ */ f("div", {
958
+ className: "flex items-center justify-end gap-2",
959
+ children: [/* @__PURE__ */ d("button", {
960
+ onClick: () => i(e),
961
+ className: "px-3 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md transition-colors",
962
+ title: "Edit discount",
963
+ children: /* @__PURE__ */ d("svg", {
964
+ className: "w-4 h-4",
965
+ fill: "none",
966
+ viewBox: "0 0 24 24",
967
+ stroke: "currentColor",
968
+ children: /* @__PURE__ */ d("path", {
969
+ strokeLinecap: "round",
970
+ strokeLinejoin: "round",
971
+ strokeWidth: 2,
972
+ d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
973
+ })
974
+ })
975
+ }), /* @__PURE__ */ d("button", {
976
+ onClick: () => a(e),
977
+ className: "px-3 py-1.5 text-sm font-medium text-destructive hover:bg-destructive/10 rounded-md transition-colors",
978
+ title: "Delete discount",
979
+ children: /* @__PURE__ */ d("svg", {
980
+ className: "w-4 h-4",
981
+ fill: "none",
982
+ viewBox: "0 0 24 24",
983
+ stroke: "currentColor",
984
+ children: /* @__PURE__ */ d("path", {
985
+ strokeLinecap: "round",
986
+ strokeLinejoin: "round",
987
+ strokeWidth: 2,
988
+ d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
989
+ })
990
+ })
991
+ })]
992
+ })
993
+ })
994
+ ]
995
+ });
996
+ }, y = ({ onClose: e, children: t }) => /* @__PURE__ */ f("div", {
997
+ className: "fixed inset-0 z-50 flex items-center justify-center",
998
+ children: [/* @__PURE__ */ d("div", {
999
+ className: "absolute inset-0 bg-overlay-scrim",
1000
+ onClick: e
1001
+ }), /* @__PURE__ */ d("div", {
1002
+ className: "relative w-full max-w-lg max-h-[85vh] overflow-y-auto bg-card border border-border rounded-xl shadow-xl p-6 mx-4",
1003
+ children: t
1004
+ })]
1005
+ });
1006
+ //#endregion
1007
+ export { _ as DiscountsListPage };
1008
+
1009
+ //# sourceMappingURL=DiscountsListPage.js.map