@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,1074 @@
1
+ import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
2
+ import { PageHeader as t } from "../../../shared/components/PageHeader.js";
3
+ import { statusTokens as n } from "../../../shared/utils/tokens.js";
4
+ import { EmptyState as r } from "../../../shared/components/EmptyState.js";
5
+ import { ServerError as i } from "../../../shared/components/ServerError.js";
6
+ import "../../../shared/components/index.js";
7
+ import { formatCurrency as a, formatDateTime as o } from "../../../shared/utils/format.js";
8
+ import { isServerError as s } from "../../../shared/utils/error.js";
9
+ import "../../../shared/utils/index.js";
10
+ import { useBillingPermissions as c } from "../../../hooks/useBillingPermissions.js";
11
+ import { GetTransactionDocument as l } from "../../../../generated/global-operations.js";
12
+ import { useRefunds as u } from "../hooks/useRefunds.js";
13
+ import "../hooks/index.js";
14
+ import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
15
+ import { AlertTriangle as g, Ban as _, CheckCircle as v, ChevronLeft as y, ChevronRight as b, Clock as x, Download as S, Eye as C, Filter as w, Loader2 as T, MoreHorizontal as E, Play as ee, Plus as te, RefreshCw as D, RotateCcw as O, Search as k, SkipForward as A, X as j, XCircle as M } from "lucide-react";
16
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
17
+ import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
+ import { useApolloClient as I } from "@apollo/client/react";
19
+ //#region src/billing/modules/billing/pages/RefundsPage.tsx
20
+ var L = {
21
+ PENDING: {
22
+ label: "Pending",
23
+ color: "yellow",
24
+ icon: x
25
+ },
26
+ PROCESSING: {
27
+ label: "Processing",
28
+ color: "blue",
29
+ icon: T
30
+ },
31
+ COMPLETED: {
32
+ label: "Completed",
33
+ color: "green",
34
+ icon: v
35
+ },
36
+ FAILED: {
37
+ label: "Failed",
38
+ color: "red",
39
+ icon: M
40
+ },
41
+ SKIPPED: {
42
+ label: "Skipped",
43
+ color: "gray",
44
+ icon: _
45
+ }
46
+ }, R = {
47
+ MANUAL: "Manual",
48
+ WEBHOOK_RECOVERY: "Webhook Recovery",
49
+ SUBSCRIPTION_CANCEL: "Subscription Cancel",
50
+ DUPLICATE_PAYMENT: "Duplicate Payment"
51
+ }, re = ["stripe", "razorpay"], z = (e) => {
52
+ let t = {
53
+ yellow: `${n.warning.bg} ${n.warning.text}`,
54
+ blue: `${n.info.bg} ${n.info.text}`,
55
+ green: `${n.success.bg} ${n.success.text}`,
56
+ red: `${n.error.bg} ${n.error.text}`,
57
+ gray: `${n.neutral.bg} ${n.neutral.text}`
58
+ };
59
+ return t[e] || t.gray;
60
+ }, ie = ({ record: e, onViewDetails: t, onProcess: r, onSkip: i, onRetry: a, isProcessing: o }) => {
61
+ let [s, c] = h(!1), l = m(null);
62
+ f(() => {
63
+ let e = (e) => {
64
+ l.current && !l.current.contains(e.target) && c(!1);
65
+ };
66
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
67
+ }, []);
68
+ let u = e.status === "PENDING", d = e.status === "PENDING", p = e.status === "FAILED";
69
+ return /* @__PURE__ */ F("div", {
70
+ className: "relative",
71
+ ref: l,
72
+ children: [/* @__PURE__ */ P("button", {
73
+ onClick: () => c(!s),
74
+ disabled: o,
75
+ className: "p-1.5 rounded-md hover:bg-muted/50 transition-colors disabled:opacity-50",
76
+ "aria-label": "Refund actions",
77
+ children: o ? /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin text-muted-foreground" }) : /* @__PURE__ */ P(E, { className: "w-4 h-4 text-muted-foreground" })
78
+ }), s && /* @__PURE__ */ F("div", {
79
+ className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] bg-popover border border-border rounded-md shadow-lg py-1",
80
+ children: [
81
+ /* @__PURE__ */ F("button", {
82
+ onClick: () => {
83
+ t(), c(!1);
84
+ },
85
+ className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-muted/50 transition-colors",
86
+ children: [/* @__PURE__ */ P(C, { className: "w-4 h-4" }), "View Details"]
87
+ }),
88
+ u && /* @__PURE__ */ F("button", {
89
+ onClick: () => {
90
+ r(), c(!1);
91
+ },
92
+ className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.success.text} hover:bg-muted/50 transition-colors`,
93
+ children: [/* @__PURE__ */ P(ee, { className: "w-4 h-4" }), "Process Refund"]
94
+ }),
95
+ d && /* @__PURE__ */ F("button", {
96
+ onClick: () => {
97
+ i(), c(!1);
98
+ },
99
+ className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.warning.text} hover:bg-muted/50 transition-colors`,
100
+ children: [/* @__PURE__ */ P(A, { className: "w-4 h-4" }), "Skip Refund"]
101
+ }),
102
+ p && /* @__PURE__ */ F("button", {
103
+ onClick: () => {
104
+ a(), c(!1);
105
+ },
106
+ className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.info.text} hover:bg-muted/50 transition-colors`,
107
+ children: [/* @__PURE__ */ P(O, { className: "w-4 h-4" }), "Retry Refund"]
108
+ })
109
+ ]
110
+ })]
111
+ });
112
+ }, B = {
113
+ provider: "stripe",
114
+ gatewayPaymentId: "",
115
+ amount: 0,
116
+ currency: "USD"
117
+ }, ae = ({ isOpen: e, onClose: t, onSubmit: n, isSubmitting: r }) => {
118
+ let i = I(), [o, s] = h(""), [c, u] = h(null), [f, p] = h(null), [m, g] = h(!1), [_, y] = h(B), b = () => {
119
+ s(""), u(null), p(null), y(B);
120
+ }, x = () => {
121
+ b(), t();
122
+ }, S = d(async (e) => {
123
+ let t = e.trim();
124
+ if (t) {
125
+ g(!0), p(null), u(null);
126
+ try {
127
+ let { data: e } = await i.query({
128
+ query: l,
129
+ variables: { id: t },
130
+ fetchPolicy: "network-only"
131
+ }), n = e?.getTransaction ?? null;
132
+ if (!n) {
133
+ p("Transaction not found. Check the ID and try again."), y(B);
134
+ return;
135
+ }
136
+ let r = n.metadata, a = typeof r?.total == "number" ? r.total : n.amount;
137
+ u({
138
+ id: n.id,
139
+ billingAccountId: n.billingAccountId,
140
+ amount: n.amount,
141
+ totalAmount: a,
142
+ currency: n.currency,
143
+ description: n.description ?? null,
144
+ razorpayPaymentId: n.razorpayPaymentId ?? null,
145
+ stripePaymentId: n.stripePaymentId ?? null,
146
+ metadata: n.metadata ?? null
147
+ });
148
+ let o = n.razorpayPaymentId ? "razorpay" : "stripe", s = n.razorpayPaymentId ?? n.stripePaymentId ?? "", c = r?.purchaseType ?? "", d = n.description ?? "";
149
+ y({
150
+ transactionId: n.id,
151
+ billingAccountId: n.billingAccountId,
152
+ provider: o,
153
+ gatewayPaymentId: s,
154
+ currency: n.currency,
155
+ amount: a,
156
+ purchaseType: c,
157
+ purchaseDetail: d,
158
+ reason: "",
159
+ notes: ""
160
+ });
161
+ } catch {
162
+ p("Failed to look up transaction. Ensure the ID is correct."), y(B);
163
+ } finally {
164
+ g(!1);
165
+ }
166
+ }
167
+ }, [i]), C = async (e) => {
168
+ e.preventDefault(), await n(_), b();
169
+ };
170
+ if (!e) return null;
171
+ let w = c?.totalAmount ?? void 0, E = w !== void 0 && _.amount > w + .01;
172
+ return /* @__PURE__ */ F("div", {
173
+ className: "fixed inset-0 z-50 flex items-center justify-center",
174
+ children: [/* @__PURE__ */ P("div", {
175
+ className: "absolute inset-0 bg-overlay-scrim",
176
+ onClick: x
177
+ }), /* @__PURE__ */ F("div", {
178
+ className: "relative bg-background border border-border rounded-lg shadow-xl max-w-lg w-full mx-4 max-h-[90vh] overflow-auto",
179
+ children: [/* @__PURE__ */ F("div", {
180
+ className: "flex items-center justify-between p-4 border-b border-border",
181
+ children: [/* @__PURE__ */ P("h2", {
182
+ className: "text-lg font-semibold",
183
+ children: "Create Manual Refund"
184
+ }), /* @__PURE__ */ P("button", {
185
+ onClick: x,
186
+ className: "p-1 rounded-md hover:bg-muted/50 transition-colors",
187
+ children: /* @__PURE__ */ P(j, { className: "w-5 h-5" })
188
+ })]
189
+ }), /* @__PURE__ */ F("form", {
190
+ onSubmit: C,
191
+ className: "p-4 space-y-4",
192
+ children: [
193
+ /* @__PURE__ */ F("div", { children: [
194
+ /* @__PURE__ */ P("label", {
195
+ className: "block text-sm font-medium mb-1",
196
+ children: "Transaction ID *"
197
+ }),
198
+ /* @__PURE__ */ F("div", {
199
+ className: "flex gap-2",
200
+ children: [/* @__PURE__ */ P("input", {
201
+ type: "text",
202
+ value: o,
203
+ onChange: (e) => {
204
+ s(e.target.value), u(null), p(null);
205
+ },
206
+ onBlur: () => S(o),
207
+ className: "flex-1 px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
208
+ placeholder: "Paste transaction UUID...",
209
+ required: !0
210
+ }), /* @__PURE__ */ P("button", {
211
+ type: "button",
212
+ onClick: () => S(o),
213
+ disabled: !o.trim() || m,
214
+ className: "px-3 py-2 border border-border rounded-md hover:bg-muted/50 transition-colors disabled:opacity-50 flex items-center gap-1 text-sm",
215
+ children: m ? /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ P(k, { className: "w-4 h-4" })
216
+ })]
217
+ }),
218
+ f && /* @__PURE__ */ P("p", {
219
+ className: "text-xs text-status-error-text mt-1",
220
+ children: f
221
+ }),
222
+ m && /* @__PURE__ */ P("p", {
223
+ className: "text-xs text-muted-foreground mt-1",
224
+ children: "Looking up transaction..."
225
+ })
226
+ ] }),
227
+ c && /* @__PURE__ */ F(N, { children: [
228
+ /* @__PURE__ */ F("div", {
229
+ className: "p-3 bg-status-success-bg-subtle border border-border-subtle rounded-md text-sm space-y-1",
230
+ children: [/* @__PURE__ */ F("div", {
231
+ className: "flex items-center gap-2 text-status-success-text font-medium",
232
+ children: [/* @__PURE__ */ P(v, { className: "w-4 h-4" }), "Transaction found"]
233
+ }), /* @__PURE__ */ F("div", {
234
+ className: "text-muted-foreground grid grid-cols-2 gap-x-4 gap-y-0.5 mt-1",
235
+ children: [
236
+ /* @__PURE__ */ F("span", { children: [
237
+ "Account:",
238
+ " ",
239
+ /* @__PURE__ */ F("span", {
240
+ className: "text-foreground font-mono text-xs",
241
+ children: [c.billingAccountId.slice(0, 16), "…"]
242
+ })
243
+ ] }),
244
+ /* @__PURE__ */ F("span", { children: [
245
+ "Paid:",
246
+ " ",
247
+ /* @__PURE__ */ P("span", {
248
+ className: "text-foreground",
249
+ children: a(c.totalAmount, c.currency)
250
+ })
251
+ ] }),
252
+ /* @__PURE__ */ F("span", { children: [
253
+ "Provider:",
254
+ " ",
255
+ /* @__PURE__ */ P("span", {
256
+ className: "text-foreground capitalize",
257
+ children: _.provider
258
+ })
259
+ ] }),
260
+ /* @__PURE__ */ F("span", { children: ["Currency: ", /* @__PURE__ */ P("span", {
261
+ className: "text-foreground",
262
+ children: c.currency
263
+ })] })
264
+ ]
265
+ })]
266
+ }),
267
+ /* @__PURE__ */ F("div", {
268
+ className: "grid grid-cols-2 gap-3",
269
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
270
+ className: "block text-xs font-medium text-muted-foreground mb-1",
271
+ children: "Provider"
272
+ }), /* @__PURE__ */ P("div", {
273
+ className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm capitalize",
274
+ children: _.provider
275
+ })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
276
+ className: "block text-xs font-medium text-muted-foreground mb-1",
277
+ children: "Currency"
278
+ }), /* @__PURE__ */ P("div", {
279
+ className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm",
280
+ children: _.currency
281
+ })] })]
282
+ }),
283
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
284
+ className: "block text-xs font-medium text-muted-foreground mb-1",
285
+ children: "Gateway Payment ID"
286
+ }), /* @__PURE__ */ P("div", {
287
+ className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm font-mono truncate",
288
+ children: _.gatewayPaymentId
289
+ })] }),
290
+ _.purchaseType && /* @__PURE__ */ F("div", {
291
+ className: "grid grid-cols-2 gap-3",
292
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
293
+ className: "block text-xs font-medium text-muted-foreground mb-1",
294
+ children: "Purchase Type"
295
+ }), /* @__PURE__ */ P("div", {
296
+ className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm",
297
+ children: _.purchaseType
298
+ })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
299
+ className: "block text-xs font-medium text-muted-foreground mb-1",
300
+ children: "Purchase Detail"
301
+ }), /* @__PURE__ */ P("div", {
302
+ className: "px-3 py-2 border border-border rounded-md bg-muted/30 text-sm truncate",
303
+ children: _.purchaseDetail || "—"
304
+ })] })]
305
+ }),
306
+ /* @__PURE__ */ F("div", { children: [
307
+ /* @__PURE__ */ F("label", {
308
+ className: "block text-sm font-medium mb-1",
309
+ children: ["Refund Amount *", /* @__PURE__ */ F("span", {
310
+ className: "text-xs text-muted-foreground ml-1",
311
+ children: [
312
+ "(max ",
313
+ a(w, _.currency),
314
+ ")"
315
+ ]
316
+ })]
317
+ }),
318
+ /* @__PURE__ */ P("input", {
319
+ type: "number",
320
+ step: "0.01",
321
+ min: "0.01",
322
+ max: w,
323
+ value: _.amount,
324
+ onChange: (e) => y({
325
+ ..._,
326
+ amount: parseFloat(e.target.value) || 0
327
+ }),
328
+ className: `w-full px-3 py-2 border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary ${E ? "border-status-error-text" : "border-border"}`,
329
+ required: !0
330
+ }),
331
+ E && /* @__PURE__ */ F("p", {
332
+ className: "text-xs text-status-error-text mt-1",
333
+ children: [
334
+ "Amount cannot exceed the original payment of",
335
+ " ",
336
+ a(w, _.currency)
337
+ ]
338
+ })
339
+ ] }),
340
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
341
+ className: "block text-sm font-medium mb-1",
342
+ children: "Reason"
343
+ }), /* @__PURE__ */ P("input", {
344
+ type: "text",
345
+ value: _.reason || "",
346
+ onChange: (e) => y({
347
+ ..._,
348
+ reason: e.target.value
349
+ }),
350
+ className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
351
+ placeholder: "Reason for refund"
352
+ })] }),
353
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
354
+ className: "block text-sm font-medium mb-1",
355
+ children: "Notes"
356
+ }), /* @__PURE__ */ P("textarea", {
357
+ value: _.notes || "",
358
+ onChange: (e) => y({
359
+ ..._,
360
+ notes: e.target.value
361
+ }),
362
+ className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary resize-none",
363
+ rows: 2,
364
+ placeholder: "Internal notes"
365
+ })] })
366
+ ] }),
367
+ /* @__PURE__ */ F("div", {
368
+ className: "flex gap-2 pt-2",
369
+ children: [/* @__PURE__ */ P("button", {
370
+ type: "button",
371
+ onClick: x,
372
+ className: "flex-1 py-2 px-4 border border-border rounded-md hover:bg-muted/50 transition-colors",
373
+ children: "Cancel"
374
+ }), /* @__PURE__ */ F("button", {
375
+ type: "submit",
376
+ disabled: r || !c || !_.gatewayPaymentId || _.amount <= 0 || E,
377
+ className: "flex-1 py-2 px-4 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",
378
+ children: [r && /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin" }), "Create Refund"]
379
+ })]
380
+ })
381
+ ]
382
+ })]
383
+ })]
384
+ });
385
+ }, oe = ({ isOpen: e, record: t, onClose: r, onSubmit: i, isSubmitting: o }) => {
386
+ let [s, c] = h("");
387
+ return !e || !t ? null : /* @__PURE__ */ F("div", {
388
+ className: "fixed inset-0 z-50 flex items-center justify-center",
389
+ children: [/* @__PURE__ */ P("div", {
390
+ className: "absolute inset-0 bg-overlay-scrim",
391
+ onClick: r
392
+ }), /* @__PURE__ */ F("div", {
393
+ className: "relative bg-background border border-border rounded-lg shadow-xl max-w-md w-full mx-4",
394
+ children: [/* @__PURE__ */ F("div", {
395
+ className: "flex items-center justify-between p-4 border-b border-border",
396
+ children: [/* @__PURE__ */ P("h2", {
397
+ className: "text-lg font-semibold",
398
+ children: "Skip Refund"
399
+ }), /* @__PURE__ */ P("button", {
400
+ onClick: r,
401
+ className: "p-1 rounded-md hover:bg-muted/50 transition-colors",
402
+ children: /* @__PURE__ */ P(j, { className: "w-5 h-5" })
403
+ })]
404
+ }), /* @__PURE__ */ F("form", {
405
+ onSubmit: async (e) => {
406
+ e.preventDefault(), await i(s), c("");
407
+ },
408
+ className: "p-4 space-y-4",
409
+ children: [
410
+ /* @__PURE__ */ P("div", {
411
+ className: `p-3 ${n.warning.bg} border ${n.warning.border} rounded-md`,
412
+ children: /* @__PURE__ */ F("div", {
413
+ className: "flex items-start gap-2",
414
+ children: [/* @__PURE__ */ P(g, { className: `w-5 h-5 ${n.warning.icon} mt-0.5` }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
415
+ className: `text-sm font-medium ${n.warning.text}`,
416
+ children: "You are about to skip this refund"
417
+ }), /* @__PURE__ */ F("p", {
418
+ className: `text-sm ${n.warning.text} mt-1`,
419
+ children: ["Amount: ", a(t.amount, t.currency)]
420
+ })] })]
421
+ })
422
+ }),
423
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
424
+ className: "block text-sm font-medium mb-1",
425
+ children: "Reason for skipping *"
426
+ }), /* @__PURE__ */ P("textarea", {
427
+ value: s,
428
+ onChange: (e) => c(e.target.value),
429
+ className: "w-full px-3 py-2 border border-border rounded-md bg-background resize-none",
430
+ rows: 3,
431
+ placeholder: "Explain why this refund is being skipped...",
432
+ required: !0
433
+ })] }),
434
+ /* @__PURE__ */ F("div", {
435
+ className: "flex gap-2",
436
+ children: [/* @__PURE__ */ P("button", {
437
+ type: "button",
438
+ onClick: r,
439
+ className: "flex-1 py-2 px-4 border border-border rounded-md hover:bg-muted/50 transition-colors",
440
+ children: "Cancel"
441
+ }), /* @__PURE__ */ F("button", {
442
+ type: "submit",
443
+ disabled: o || !s.trim(),
444
+ className: `flex-1 py-2 px-4 ${n.warning.dot} text-primary-foreground rounded-md hover:opacity-90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2`,
445
+ children: [o && /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin" }), "Skip Refund"]
446
+ })]
447
+ })
448
+ ]
449
+ })]
450
+ })]
451
+ });
452
+ }, se = ({ record: e, onClose: t }) => {
453
+ if (!e) return null;
454
+ let r = L[e.status].icon;
455
+ return /* @__PURE__ */ F("div", {
456
+ className: "fixed inset-0 z-50 flex items-center justify-center",
457
+ children: [/* @__PURE__ */ P("div", {
458
+ className: "absolute inset-0 bg-overlay-scrim",
459
+ onClick: t
460
+ }), /* @__PURE__ */ F("div", {
461
+ className: "relative bg-background border border-border rounded-lg shadow-xl max-w-lg w-full mx-4 max-h-[90vh] overflow-auto",
462
+ children: [
463
+ /* @__PURE__ */ F("div", {
464
+ className: "flex items-center justify-between p-4 border-b border-border",
465
+ children: [/* @__PURE__ */ P("h2", {
466
+ className: "text-lg font-semibold",
467
+ children: "Refund Details"
468
+ }), /* @__PURE__ */ P("button", {
469
+ onClick: t,
470
+ className: "p-1 rounded-md hover:bg-muted/50 transition-colors",
471
+ children: /* @__PURE__ */ P(j, { className: "w-5 h-5" })
472
+ })]
473
+ }),
474
+ /* @__PURE__ */ F("div", {
475
+ className: "p-4 space-y-4",
476
+ children: [
477
+ /* @__PURE__ */ F("div", {
478
+ className: `flex items-center gap-2 p-3 rounded-md ${z(L[e.status].color)}`,
479
+ children: [/* @__PURE__ */ P(r, { className: "w-5 h-5" }), /* @__PURE__ */ P("span", {
480
+ className: "font-medium",
481
+ children: L[e.status].label
482
+ })]
483
+ }),
484
+ /* @__PURE__ */ F("div", {
485
+ className: "grid grid-cols-2 gap-4",
486
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
487
+ className: "text-xs text-muted-foreground mb-1",
488
+ children: "Refund ID"
489
+ }), /* @__PURE__ */ P("p", {
490
+ className: "text-sm font-mono break-all",
491
+ children: e.id
492
+ })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
493
+ className: "text-xs text-muted-foreground mb-1",
494
+ children: "Source"
495
+ }), /* @__PURE__ */ P("p", {
496
+ className: "text-sm",
497
+ children: R[e.source]
498
+ })] })]
499
+ }),
500
+ /* @__PURE__ */ F("div", {
501
+ className: "grid grid-cols-2 gap-4",
502
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
503
+ className: "text-xs text-muted-foreground mb-1",
504
+ children: "Amount"
505
+ }), /* @__PURE__ */ P("p", {
506
+ className: "text-lg font-semibold",
507
+ children: a(e.amount, e.currency)
508
+ })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
509
+ className: "text-xs text-muted-foreground mb-1",
510
+ children: "Provider"
511
+ }), /* @__PURE__ */ P("p", {
512
+ className: "text-sm capitalize",
513
+ children: e.provider
514
+ })] })]
515
+ }),
516
+ /* @__PURE__ */ F("div", {
517
+ className: "grid grid-cols-2 gap-4",
518
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
519
+ className: "text-xs text-muted-foreground mb-1",
520
+ children: "Gateway Payment ID"
521
+ }), /* @__PURE__ */ P("p", {
522
+ className: "text-sm font-mono break-all",
523
+ children: e.gatewayPaymentId
524
+ })] }), e.gatewayOrderId && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
525
+ className: "text-xs text-muted-foreground mb-1",
526
+ children: "Gateway Order ID"
527
+ }), /* @__PURE__ */ P("p", {
528
+ className: "text-sm font-mono break-all",
529
+ children: e.gatewayOrderId
530
+ })] })]
531
+ }),
532
+ e.gatewayRefundId && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
533
+ className: "text-xs text-muted-foreground mb-1",
534
+ children: "Gateway Refund ID"
535
+ }), /* @__PURE__ */ P("p", {
536
+ className: "text-sm font-mono break-all",
537
+ children: e.gatewayRefundId
538
+ })] }),
539
+ (e.purchaseType || e.purchaseDetail) && /* @__PURE__ */ F("div", {
540
+ className: "grid grid-cols-2 gap-4",
541
+ children: [e.purchaseType && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
542
+ className: "text-xs text-muted-foreground mb-1",
543
+ children: "Purchase Type"
544
+ }), /* @__PURE__ */ P("p", {
545
+ className: "text-sm",
546
+ children: e.purchaseType
547
+ })] }), e.purchaseDetail && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
548
+ className: "text-xs text-muted-foreground mb-1",
549
+ children: "Purchase Detail"
550
+ }), /* @__PURE__ */ P("p", {
551
+ className: "text-sm",
552
+ children: e.purchaseDetail
553
+ })] })]
554
+ }),
555
+ e.reason && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
556
+ className: "text-xs text-muted-foreground mb-1",
557
+ children: "Reason"
558
+ }), /* @__PURE__ */ P("p", {
559
+ className: "text-sm",
560
+ children: e.reason
561
+ })] }),
562
+ e.notes && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
563
+ className: "text-xs text-muted-foreground mb-1",
564
+ children: "Notes"
565
+ }), /* @__PURE__ */ P("p", {
566
+ className: "text-sm",
567
+ children: e.notes
568
+ })] }),
569
+ e.errorMessage && /* @__PURE__ */ F("div", {
570
+ className: `p-3 ${n.error.bg} border ${n.error.border} rounded-md`,
571
+ children: [/* @__PURE__ */ P("p", {
572
+ className: `text-xs ${n.error.text} mb-1`,
573
+ children: "Error Message"
574
+ }), /* @__PURE__ */ P("p", {
575
+ className: `text-sm ${n.error.text}`,
576
+ children: e.errorMessage
577
+ })]
578
+ }),
579
+ /* @__PURE__ */ F("div", {
580
+ className: "grid grid-cols-2 gap-4 pt-2 border-t border-border",
581
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
582
+ className: "text-xs text-muted-foreground mb-1",
583
+ children: "Created At"
584
+ }), /* @__PURE__ */ P("p", {
585
+ className: "text-sm",
586
+ children: o(e.createdAt)
587
+ })] }), e.processedAt && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
588
+ className: "text-xs text-muted-foreground mb-1",
589
+ children: "Processed At"
590
+ }), /* @__PURE__ */ P("p", {
591
+ className: "text-sm",
592
+ children: o(e.processedAt)
593
+ })] })]
594
+ }),
595
+ e.retryCount > 0 && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
596
+ className: "text-xs text-muted-foreground mb-1",
597
+ children: "Retry Count"
598
+ }), /* @__PURE__ */ P("p", {
599
+ className: "text-sm",
600
+ children: e.retryCount
601
+ })] })
602
+ ]
603
+ }),
604
+ /* @__PURE__ */ P("div", {
605
+ className: "p-4 border-t border-border",
606
+ children: /* @__PURE__ */ P("button", {
607
+ onClick: t,
608
+ className: "w-full py-2 px-4 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
609
+ children: "Close"
610
+ })
611
+ })
612
+ ]
613
+ })]
614
+ });
615
+ }, V = {
616
+ PENDING: {
617
+ label: "Pending",
618
+ status: "PENDING"
619
+ },
620
+ COMPLETED: {
621
+ label: "Completed",
622
+ status: "COMPLETED"
623
+ },
624
+ FAILED: {
625
+ label: "Failed",
626
+ status: "FAILED"
627
+ },
628
+ ALL: {
629
+ label: "All",
630
+ status: void 0
631
+ }
632
+ }, H = () => {
633
+ let { t: l } = ne(), d = (e, t) => {
634
+ let n = l(e);
635
+ return n === e ? t : n;
636
+ }, f = c(), [m, g] = h("PENDING"), [_, v] = h(""), [x, C] = h({}), [E, ee] = h(!1), [O, A] = h(null), [M, N] = h(!1), [I, B] = h(!1), [H, U] = h(null), [ce, W] = h(null), { records: G, stats: K, pagination: q, isLoading: le, recordsError: J, unprocessedWebhooks: Y, refetch: X, goToNextPage: ue, goToPreviousPage: de, setFilters: Z, createRefundRecord: fe, processRefund: pe, skipRefund: me, retryRefund: he, createRefundRecordsFromFailedWebhooks: ge, isCreating: _e, isProcessing: ve, isCreatingFromWebhooks: Q } = u({ filters: p(() => ({
637
+ ...x,
638
+ status: V[m].status
639
+ }), [
640
+ m,
641
+ x.source,
642
+ x.provider,
643
+ x.billingAccountId,
644
+ x.fromDate,
645
+ x.toDate
646
+ ]) });
647
+ if (!f.canViewPayments) return /* @__PURE__ */ P(e, { message: "You don't have permission to view refunds." });
648
+ if (J && s(J)) return /* @__PURE__ */ P("div", {
649
+ className: "p-6",
650
+ children: /* @__PURE__ */ P(i, {
651
+ title: "Server Unavailable",
652
+ message: "Unable to load refunds. The server might be down or experiencing issues.",
653
+ onRetry: () => X(),
654
+ showRetry: !0
655
+ })
656
+ });
657
+ let ye = (e) => {
658
+ g(e), C({}), v("");
659
+ }, $ = (e, t) => {
660
+ if (e === "status") return;
661
+ let n = {
662
+ ...x,
663
+ [e]: t || void 0
664
+ };
665
+ C(n), Z({
666
+ ...n,
667
+ status: V[m].status
668
+ });
669
+ }, be = async (e) => {
670
+ try {
671
+ await fe(e), N(!1);
672
+ } catch (e) {
673
+ console.error("Failed to create refund:", e);
674
+ }
675
+ }, xe = async (e) => {
676
+ W(e.id);
677
+ try {
678
+ let t = await pe(e.id);
679
+ !t.success && t.error && console.error("Refund processing failed:", t.error);
680
+ } catch (e) {
681
+ console.error("Failed to process refund:", e);
682
+ } finally {
683
+ W(null);
684
+ }
685
+ }, Se = async (e) => {
686
+ if (H) try {
687
+ await me(H.id, e), B(!1), U(null);
688
+ } catch (e) {
689
+ console.error("Failed to skip refund:", e);
690
+ }
691
+ }, Ce = async (e) => {
692
+ W(e.id);
693
+ try {
694
+ let t = await he(e.id);
695
+ !t.success && t.error && console.error("Refund retry failed:", t.error);
696
+ } catch (e) {
697
+ console.error("Failed to retry refund:", e);
698
+ } finally {
699
+ W(null);
700
+ }
701
+ }, we = async () => {
702
+ try {
703
+ await ge();
704
+ } catch (e) {
705
+ console.error("Failed to create refunds from webhooks:", e);
706
+ }
707
+ }, Te = _ ? G.filter((e) => e.gatewayPaymentId.toLowerCase().includes(_.toLowerCase()) || e.gatewayOrderId?.toLowerCase().includes(_.toLowerCase()) || e.reason?.toLowerCase().includes(_.toLowerCase())) : G;
708
+ return le ? /* @__PURE__ */ F("div", {
709
+ className: "space-y-6 p-6",
710
+ children: [
711
+ /* @__PURE__ */ P("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }),
712
+ /* @__PURE__ */ P("div", {
713
+ className: "grid grid-cols-5 gap-4",
714
+ children: [
715
+ 1,
716
+ 2,
717
+ 3,
718
+ 4,
719
+ 5
720
+ ].map((e) => /* @__PURE__ */ P("div", { className: "h-24 bg-muted animate-pulse rounded-lg" }, e))
721
+ }),
722
+ /* @__PURE__ */ P("div", {
723
+ className: "space-y-2",
724
+ children: [
725
+ 1,
726
+ 2,
727
+ 3,
728
+ 4,
729
+ 5
730
+ ].map((e) => /* @__PURE__ */ P("div", { className: "h-16 bg-muted animate-pulse rounded" }, e))
731
+ })
732
+ ]
733
+ }) : /* @__PURE__ */ F("div", {
734
+ className: "space-y-6 p-6",
735
+ children: [
736
+ /* @__PURE__ */ P(t, {
737
+ title: d("billing.refunds.title", "Refund Management"),
738
+ description: "View and manage refund records",
739
+ actions: /* @__PURE__ */ F("div", {
740
+ className: "flex items-center gap-2",
741
+ children: [
742
+ Y.length > 0 && /* @__PURE__ */ F("button", {
743
+ onClick: we,
744
+ disabled: Q,
745
+ className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border ${n.warning.border} ${n.warning.bg} ${n.warning.text} hover:opacity-90 transition-colors disabled:opacity-50`,
746
+ children: [
747
+ Q ? /* @__PURE__ */ P(T, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ P(S, { className: "w-4 h-4" }),
748
+ "Import ",
749
+ Y.length,
750
+ " Failed Webhooks"
751
+ ]
752
+ }),
753
+ /* @__PURE__ */ F("button", {
754
+ onClick: () => X(),
755
+ className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border border-border bg-background hover:bg-muted/50 transition-colors",
756
+ children: [/* @__PURE__ */ P(D, { className: "w-4 h-4" }), "Refresh"]
757
+ }),
758
+ /* @__PURE__ */ F("button", {
759
+ onClick: () => N(!0),
760
+ className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
761
+ children: [/* @__PURE__ */ P(te, { className: "w-4 h-4" }), "Create Manual Refund"]
762
+ })
763
+ ]
764
+ })
765
+ }),
766
+ /* @__PURE__ */ P("div", {
767
+ className: "border-b border-border",
768
+ children: /* @__PURE__ */ P("div", {
769
+ className: "flex flex-wrap gap-2 sm:gap-0",
770
+ children: Object.keys(V).map((e) => {
771
+ let t = m === e, n = K ? e === "PENDING" ? K.pending : e === "COMPLETED" ? K.completed : e === "FAILED" ? K.failed : K.pending + K.processing + K.completed + K.failed + K.skipped : 0;
772
+ return /* @__PURE__ */ F("button", {
773
+ onClick: () => ye(e),
774
+ className: `flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-colors whitespace-nowrap ${t ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"}`,
775
+ children: [V[e].label, K && /* @__PURE__ */ P("span", {
776
+ className: `px-2 py-0.5 text-xs rounded-full ${t ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"}`,
777
+ children: n
778
+ })]
779
+ }, e);
780
+ })
781
+ })
782
+ }),
783
+ /* @__PURE__ */ F("div", {
784
+ className: "flex flex-col sm:flex-row gap-4",
785
+ children: [
786
+ /* @__PURE__ */ F("div", {
787
+ className: "relative flex-1",
788
+ children: [/* @__PURE__ */ P(k, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ P("input", {
789
+ type: "text",
790
+ placeholder: "Search by payment ID, order ID, or reason...",
791
+ value: _,
792
+ onChange: (e) => v(e.target.value),
793
+ className: "w-full pl-[3.25rem] pr-4 py-2 border border-border rounded-md bg-background"
794
+ })]
795
+ }),
796
+ /* @__PURE__ */ F("button", {
797
+ onClick: () => ee(!E),
798
+ className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${E ? "border-primary bg-primary/10 text-primary" : "border-border bg-background hover:bg-muted/50"}`,
799
+ children: [
800
+ /* @__PURE__ */ P(w, { className: "w-4 h-4" }),
801
+ "Filters",
802
+ Object.values(x).filter(Boolean).length > 0 && /* @__PURE__ */ P("span", {
803
+ className: "px-1.5 py-0.5 text-xs rounded-full bg-primary text-primary-foreground",
804
+ children: Object.values(x).filter(Boolean).length
805
+ })
806
+ ]
807
+ }),
808
+ Object.values(x).filter(Boolean).length > 0 && /* @__PURE__ */ F("button", {
809
+ onClick: () => {
810
+ C({}), Z({});
811
+ },
812
+ className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md text-muted-foreground hover:text-foreground transition-colors",
813
+ children: [/* @__PURE__ */ P(j, { className: "w-4 h-4" }), "Clear"]
814
+ })
815
+ ]
816
+ }),
817
+ E && /* @__PURE__ */ F("div", {
818
+ className: "p-4 border border-border rounded-lg bg-muted/30 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
819
+ children: [
820
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
821
+ className: "block text-sm font-medium mb-1",
822
+ children: "Source"
823
+ }), /* @__PURE__ */ F("select", {
824
+ value: x.source || "",
825
+ onChange: (e) => $("source", e.target.value),
826
+ className: "w-full px-3 py-2 border border-border rounded-md bg-background",
827
+ children: [/* @__PURE__ */ P("option", {
828
+ value: "",
829
+ children: "All Sources"
830
+ }), Object.entries(R).map(([e, t]) => /* @__PURE__ */ P("option", {
831
+ value: e,
832
+ children: t
833
+ }, e))]
834
+ })] }),
835
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
836
+ className: "block text-sm font-medium mb-1",
837
+ children: "Provider"
838
+ }), /* @__PURE__ */ F("select", {
839
+ value: x.provider || "",
840
+ onChange: (e) => $("provider", e.target.value),
841
+ className: "w-full px-3 py-2 border border-border rounded-md bg-background",
842
+ children: [/* @__PURE__ */ P("option", {
843
+ value: "",
844
+ children: "All Providers"
845
+ }), re.map((e) => /* @__PURE__ */ P("option", {
846
+ value: e,
847
+ children: e.charAt(0).toUpperCase() + e.slice(1)
848
+ }, e))]
849
+ })] }),
850
+ /* @__PURE__ */ F("div", {
851
+ className: "sm:col-span-2 lg:col-span-1",
852
+ children: [/* @__PURE__ */ P("label", {
853
+ className: "block text-sm font-medium mb-1",
854
+ children: "Date Range"
855
+ }), /* @__PURE__ */ F("div", {
856
+ className: "flex flex-col sm:flex-row items-start sm:items-center gap-2",
857
+ children: [
858
+ /* @__PURE__ */ P("input", {
859
+ type: "date",
860
+ value: x.fromDate ? x.fromDate.split("T")[0] : "",
861
+ onChange: (e) => $("fromDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
862
+ className: "w-full sm:flex-1 px-2 py-2 border border-border rounded-md bg-background text-sm"
863
+ }),
864
+ /* @__PURE__ */ P("span", {
865
+ className: "text-muted-foreground hidden sm:inline",
866
+ children: "-"
867
+ }),
868
+ /* @__PURE__ */ P("input", {
869
+ type: "date",
870
+ value: x.toDate ? x.toDate.split("T")[0] : "",
871
+ onChange: (e) => $("toDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
872
+ className: "w-full sm:flex-1 px-2 py-2 border border-border rounded-md bg-background text-sm"
873
+ })
874
+ ]
875
+ })]
876
+ })
877
+ ]
878
+ }),
879
+ Te.length === 0 ? /* @__PURE__ */ P(r, {
880
+ icon: /* @__PURE__ */ P(D, { className: "w-6 h-6 text-muted-foreground" }),
881
+ title: "No refund records found",
882
+ description: Object.values(x).filter(Boolean).length > 0 ? "Try adjusting your filters." : m === "PENDING" ? "No pending refunds to process." : "Refund records will appear here when created."
883
+ }) : /* @__PURE__ */ P("div", {
884
+ className: "border border-border rounded-lg overflow-hidden",
885
+ children: /* @__PURE__ */ P("div", {
886
+ className: "overflow-x-auto",
887
+ children: /* @__PURE__ */ F("table", {
888
+ className: "w-full min-w-[640px]",
889
+ children: [/* @__PURE__ */ P("thead", {
890
+ className: "bg-muted/50",
891
+ children: /* @__PURE__ */ F("tr", { children: [
892
+ /* @__PURE__ */ P("th", {
893
+ className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap",
894
+ children: "Date"
895
+ }),
896
+ /* @__PURE__ */ P("th", {
897
+ className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap",
898
+ children: "Status"
899
+ }),
900
+ /* @__PURE__ */ P("th", {
901
+ className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap hidden sm:table-cell",
902
+ children: "Source"
903
+ }),
904
+ /* @__PURE__ */ P("th", {
905
+ className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap hidden md:table-cell",
906
+ children: "Provider"
907
+ }),
908
+ /* @__PURE__ */ P("th", {
909
+ className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap",
910
+ children: "Payment ID"
911
+ }),
912
+ /* @__PURE__ */ P("th", {
913
+ className: "text-right text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap",
914
+ children: "Amount"
915
+ }),
916
+ /* @__PURE__ */ P("th", {
917
+ className: "text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap hidden lg:table-cell",
918
+ children: "Reason"
919
+ }),
920
+ /* @__PURE__ */ P("th", { className: "px-2 py-2 w-10" })
921
+ ] })
922
+ }), /* @__PURE__ */ P("tbody", {
923
+ className: "divide-y divide-border",
924
+ children: Te.map((e) => {
925
+ let t = L[e.status].icon;
926
+ return /* @__PURE__ */ F("tr", {
927
+ className: "hover:bg-muted/30 transition-colors",
928
+ children: [
929
+ /* @__PURE__ */ P("td", {
930
+ className: "px-3 py-2 text-sm text-foreground whitespace-nowrap",
931
+ children: /* @__PURE__ */ F("div", {
932
+ className: "flex flex-col",
933
+ children: [/* @__PURE__ */ P("span", { children: o(e.createdAt).split(" ")[0] }), /* @__PURE__ */ P("span", {
934
+ className: "text-xs text-muted-foreground",
935
+ children: o(e.createdAt).split(" ")[1]
936
+ })]
937
+ })
938
+ }),
939
+ /* @__PURE__ */ P("td", {
940
+ className: "px-3 py-2 whitespace-nowrap",
941
+ children: /* @__PURE__ */ F("span", {
942
+ className: `inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${z(L[e.status].color)}`,
943
+ children: [/* @__PURE__ */ P(t, { className: "w-3 h-3" }), /* @__PURE__ */ P("span", {
944
+ className: "hidden sm:inline",
945
+ children: L[e.status].label
946
+ })]
947
+ })
948
+ }),
949
+ /* @__PURE__ */ P("td", {
950
+ className: "px-3 py-2 text-sm text-muted-foreground whitespace-nowrap hidden sm:table-cell",
951
+ children: R[e.source]
952
+ }),
953
+ /* @__PURE__ */ P("td", {
954
+ className: "px-3 py-2 text-sm text-foreground capitalize whitespace-nowrap hidden md:table-cell",
955
+ children: e.provider
956
+ }),
957
+ /* @__PURE__ */ P("td", {
958
+ className: "px-3 py-2 text-sm font-mono text-muted-foreground whitespace-nowrap max-w-[120px] sm:max-w-[200px] truncate",
959
+ children: e.gatewayPaymentId
960
+ }),
961
+ /* @__PURE__ */ P("td", {
962
+ className: "px-3 py-2 text-sm text-right font-medium whitespace-nowrap",
963
+ children: a(e.amount, e.currency)
964
+ }),
965
+ /* @__PURE__ */ P("td", {
966
+ className: "px-3 py-2 text-sm text-muted-foreground max-w-[200px] truncate hidden lg:table-cell",
967
+ children: e.reason || "-"
968
+ }),
969
+ /* @__PURE__ */ P("td", {
970
+ className: "px-2 py-2 text-center",
971
+ children: /* @__PURE__ */ P(ie, {
972
+ record: e,
973
+ onViewDetails: () => A(e),
974
+ onProcess: () => xe(e),
975
+ onSkip: () => {
976
+ U(e), B(!0);
977
+ },
978
+ onRetry: () => Ce(e),
979
+ isProcessing: ce === e.id
980
+ })
981
+ })
982
+ ]
983
+ }, e.id);
984
+ })
985
+ })]
986
+ })
987
+ })
988
+ }),
989
+ q.totalCount > 0 && /* @__PURE__ */ F("div", {
990
+ className: "flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border pt-4",
991
+ children: [/* @__PURE__ */ F("p", {
992
+ className: "text-sm text-muted-foreground text-center sm:text-left",
993
+ children: [
994
+ "Showing ",
995
+ q.page * q.pageSize + 1,
996
+ " to",
997
+ " ",
998
+ Math.min((q.page + 1) * q.pageSize, q.totalCount),
999
+ " of",
1000
+ " ",
1001
+ q.totalCount,
1002
+ " refunds"
1003
+ ]
1004
+ }), /* @__PURE__ */ F("div", {
1005
+ className: "flex items-center gap-2",
1006
+ children: [
1007
+ /* @__PURE__ */ F("button", {
1008
+ onClick: de,
1009
+ disabled: !q.hasPrevious,
1010
+ className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-muted/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
1011
+ children: [/* @__PURE__ */ P(y, { className: "w-4 h-4" }), /* @__PURE__ */ P("span", {
1012
+ className: "hidden sm:inline",
1013
+ children: "Previous"
1014
+ })]
1015
+ }),
1016
+ /* @__PURE__ */ F("span", {
1017
+ className: "text-sm text-muted-foreground px-2",
1018
+ children: [
1019
+ /* @__PURE__ */ P("span", {
1020
+ className: "hidden sm:inline",
1021
+ children: "Page "
1022
+ }),
1023
+ q.page + 1,
1024
+ " ",
1025
+ /* @__PURE__ */ P("span", {
1026
+ className: "hidden sm:inline",
1027
+ children: "of"
1028
+ }),
1029
+ /* @__PURE__ */ P("span", {
1030
+ className: "sm:hidden",
1031
+ children: "/"
1032
+ }),
1033
+ " ",
1034
+ Math.ceil(q.totalCount / q.pageSize)
1035
+ ]
1036
+ }),
1037
+ /* @__PURE__ */ F("button", {
1038
+ onClick: ue,
1039
+ disabled: !q.hasMore,
1040
+ className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-muted/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
1041
+ children: [/* @__PURE__ */ P("span", {
1042
+ className: "hidden sm:inline",
1043
+ children: "Next"
1044
+ }), /* @__PURE__ */ P(b, { className: "w-4 h-4" })]
1045
+ })
1046
+ ]
1047
+ })]
1048
+ }),
1049
+ /* @__PURE__ */ P(ae, {
1050
+ isOpen: M,
1051
+ onClose: () => N(!1),
1052
+ onSubmit: be,
1053
+ isSubmitting: _e
1054
+ }),
1055
+ /* @__PURE__ */ P(oe, {
1056
+ isOpen: I,
1057
+ record: H,
1058
+ onClose: () => {
1059
+ B(!1), U(null);
1060
+ },
1061
+ onSubmit: Se,
1062
+ isSubmitting: ve
1063
+ }),
1064
+ /* @__PURE__ */ P(se, {
1065
+ record: O,
1066
+ onClose: () => A(null)
1067
+ })
1068
+ ]
1069
+ });
1070
+ };
1071
+ //#endregion
1072
+ export { H as RefundsPage };
1073
+
1074
+ //# sourceMappingURL=RefundsPage.js.map