@djangocfg/ext-payments 1.0.7 → 1.0.9

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.
package/dist/index.cjs CHANGED
@@ -5,13 +5,14 @@ var pRetry = require('p-retry');
5
5
  var zod = require('zod');
6
6
  var api = require('@djangocfg/ext-base/api');
7
7
  var lucideReact = require('lucide-react');
8
- var uiNextjs = require('@djangocfg/ui-nextjs');
8
+ var uiCore = require('@djangocfg/ui-core');
9
9
  var react = require('react');
10
10
  var useSWR = require('swr');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var reactHookForm = require('react-hook-form');
13
13
  var zod$1 = require('@hookform/resolvers/zod');
14
14
  var moment = require('moment');
15
+ var components = require('@djangocfg/ui-nextjs/components');
15
16
  var extBase = require('@djangocfg/ext-base');
16
17
 
17
18
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -1696,21 +1697,21 @@ var CreatePaymentDialog = () => {
1696
1697
  setIsSubmitting(false);
1697
1698
  }
1698
1699
  };
1699
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-md", children: [
1700
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
1701
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogTitle, { children: "Create Payment" }),
1702
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Create a new payment to add funds to your account." })
1700
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-md", children: [
1701
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
1702
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Create Payment" }),
1703
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Create a new payment to add funds to your account." })
1703
1704
  ] }),
1704
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-4", children: [
1705
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-4", children: [
1705
1706
  /* @__PURE__ */ jsxRuntime.jsx(
1706
- uiNextjs.FormField,
1707
+ uiCore.FormField,
1707
1708
  {
1708
1709
  control: form.control,
1709
1710
  name: "amount_usd",
1710
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.FormItem, { children: [
1711
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormLabel, { children: "Amount (USD)" }),
1712
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
1713
- uiNextjs.Input,
1711
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
1712
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Amount (USD)" }),
1713
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
1714
+ uiCore.Input,
1714
1715
  {
1715
1716
  type: "number",
1716
1717
  step: "0.01",
@@ -1720,28 +1721,28 @@ var CreatePaymentDialog = () => {
1720
1721
  onChange: (e) => field.onChange(parseFloat(e.target.value) || 0)
1721
1722
  }
1722
1723
  ) }),
1723
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormDescription, { children: "The amount you want to pay in USD." }),
1724
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormMessage, {})
1724
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormDescription, { children: "The amount you want to pay in USD." }),
1725
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
1725
1726
  ] })
1726
1727
  }
1727
1728
  ),
1728
1729
  /* @__PURE__ */ jsxRuntime.jsx(
1729
- uiNextjs.FormField,
1730
+ uiCore.FormField,
1730
1731
  {
1731
1732
  control: form.control,
1732
1733
  name: "currency_code",
1733
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.FormItem, { children: [
1734
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormLabel, { children: "Currency" }),
1734
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
1735
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Currency" }),
1735
1736
  /* @__PURE__ */ jsxRuntime.jsxs(
1736
- uiNextjs.Select,
1737
+ uiCore.Select,
1737
1738
  {
1738
1739
  onValueChange: field.onChange,
1739
1740
  defaultValue: field.value,
1740
1741
  disabled: isLoadingCurrencies,
1741
1742
  children: [
1742
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectValue, { placeholder: "Select currency..." }) }) }),
1743
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectContent, { children: currencyOptions.map((curr) => /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: curr.code, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1744
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TokenIcon, { symbol: curr.code, size: 16 }),
1743
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Select currency..." }) }) }),
1744
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectContent, { children: currencyOptions.map((curr) => /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: curr.code, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1745
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: curr.code, size: 16 }),
1745
1746
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: curr.code }),
1746
1747
  curr.network && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground", children: [
1747
1748
  "(",
@@ -1752,8 +1753,8 @@ var CreatePaymentDialog = () => {
1752
1753
  ]
1753
1754
  }
1754
1755
  ),
1755
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormDescription, { children: "The cryptocurrency to use for payment." }),
1756
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormMessage, {})
1756
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormDescription, { children: "The cryptocurrency to use for payment." }),
1757
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
1757
1758
  ] })
1758
1759
  }
1759
1760
  ),
@@ -1761,7 +1762,7 @@ var CreatePaymentDialog = () => {
1761
1762
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
1762
1763
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "You will send" }),
1763
1764
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1764
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TokenIcon, { symbol: calculateCryptoAmount.currency, size: 16 }),
1765
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: calculateCryptoAmount.currency, size: 16 }),
1765
1766
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono font-semibold", children: [
1766
1767
  calculateCryptoAmount.amount.toFixed(8),
1767
1768
  " ",
@@ -1791,9 +1792,9 @@ var CreatePaymentDialog = () => {
1791
1792
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: calculateCryptoAmount.network })
1792
1793
  ] }) })
1793
1794
  ] }),
1794
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogFooter, { children: [
1795
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { type: "button", variant: "outline", onClick: handleClose, disabled: isSubmitting, children: "Cancel" }),
1796
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { type: "submit", disabled: isSubmitting || currencyOptions.length === 0, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1795
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogFooter, { children: [
1796
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { type: "button", variant: "outline", onClick: handleClose, disabled: isSubmitting, children: "Cancel" }),
1797
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { type: "submit", disabled: isSubmitting || currencyOptions.length === 0, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1797
1798
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4 mr-2 animate-spin" }),
1798
1799
  "Creating..."
1799
1800
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -1874,34 +1875,34 @@ var PaymentDetailsDialog = () => {
1874
1875
  };
1875
1876
  if (!open) return null;
1876
1877
  if (isLoading) {
1877
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-lg", children: [
1878
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
1879
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogTitle, { children: "Payment Details" }),
1880
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Loading payment information..." })
1878
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
1879
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
1880
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
1881
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Loading payment information..." })
1881
1882
  ] }),
1882
1883
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-8 w-8 animate-spin text-muted-foreground" }) })
1883
1884
  ] }) });
1884
1885
  }
1885
1886
  if (shouldFetch && !isLoading && (error || !payment)) {
1886
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-lg", children: [
1887
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
1888
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogTitle, { children: "Payment Details" }),
1889
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Failed to load payment information" })
1887
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
1888
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
1889
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
1890
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Failed to load payment information" })
1890
1891
  ] }),
1891
1892
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
1892
1893
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-12 w-12 text-destructive" }),
1893
1894
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: error ? `Error: ${error}` : "Payment not found" }),
1894
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { onClick: () => mutate(), children: "Try Again" })
1895
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { onClick: () => mutate(), children: "Try Again" })
1895
1896
  ] })
1896
1897
  ] }) });
1897
1898
  }
1898
1899
  const statusInfo = getStatusInfo();
1899
1900
  const StatusIcon = statusInfo.icon;
1900
1901
  const qrCodeUrl = payment.pay_address ? `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(payment.pay_address)}` : null;
1901
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-lg", children: [
1902
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
1903
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogTitle, { children: "Payment Details" }),
1904
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Send cryptocurrency to complete your payment" })
1902
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
1903
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
1904
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
1905
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Send cryptocurrency to complete your payment" })
1905
1906
  ] }),
1906
1907
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1907
1908
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-3 p-4 rounded-sm ${statusInfo.bg}`, children: [
@@ -1918,7 +1919,7 @@ var PaymentDetailsDialog = () => {
1918
1919
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 bg-muted rounded-sm", children: [
1919
1920
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Amount to send" }),
1920
1921
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1921
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TokenIcon, { symbol: String(payment.currency_code || "BTC"), size: 20 }),
1922
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: String(payment.currency_code || "BTC"), size: 20 }),
1922
1923
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono font-bold text-lg", children: [
1923
1924
  payment.pay_amount || "0.00000000",
1924
1925
  " ",
@@ -1948,7 +1949,7 @@ var PaymentDetailsDialog = () => {
1948
1949
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Payment Address" }),
1949
1950
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1950
1951
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-3 bg-muted rounded-sm font-mono text-sm break-all", children: payment.pay_address }),
1951
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CopyButton, { value: payment.pay_address, variant: "outline" })
1952
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CopyButton, { value: payment.pay_address, variant: "outline" })
1952
1953
  ] })
1953
1954
  ] }),
1954
1955
  payment.transaction_hash && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
@@ -1956,7 +1957,7 @@ var PaymentDetailsDialog = () => {
1956
1957
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3 bg-muted rounded-sm font-mono text-sm break-all", children: payment.transaction_hash })
1957
1958
  ] }),
1958
1959
  payment.payment_url && payment.status === "pending" && /* @__PURE__ */ jsxRuntime.jsxs(
1959
- uiNextjs.Button,
1960
+ uiCore.Button,
1960
1961
  {
1961
1962
  variant: "outline",
1962
1963
  className: "w-full",
@@ -1982,9 +1983,9 @@ var PaymentDetailsDialog = () => {
1982
1983
  ] })
1983
1984
  ] })
1984
1985
  ] }),
1985
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogFooter, { children: [
1986
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { variant: "outline", onClick: handleClose, children: "Close" }),
1987
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { onClick: () => mutate(), variant: "ghost", size: "sm", children: [
1986
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogFooter, { children: [
1987
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { variant: "outline", onClick: handleClose, children: "Close" }),
1988
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: () => mutate(), variant: "ghost", size: "sm", children: [
1988
1989
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4 mr-2" }),
1989
1990
  "Refresh"
1990
1991
  ] })
@@ -2014,17 +2015,17 @@ var BalanceCard = () => {
2014
2015
  }
2015
2016
  };
2016
2017
  if (isLoadingBalance) {
2017
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2018
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2018
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2019
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2019
2020
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2020
2021
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5" }),
2021
2022
  "Account Balance"
2022
2023
  ] }),
2023
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-8 w-20" })
2024
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-8 w-20" })
2024
2025
  ] }) }),
2025
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "space-y-4", children: [
2026
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-10 w-32" }),
2027
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-4 w-48" })
2026
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
2027
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-10 w-32" }),
2028
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-48" })
2028
2029
  ] })
2029
2030
  ] });
2030
2031
  }
@@ -2034,21 +2035,21 @@ var BalanceCard = () => {
2034
2035
  const totalWithdrawn = balanceData?.total_withdrawn ?? 0;
2035
2036
  const lastTransactionAt = balanceData?.last_transaction_at;
2036
2037
  const isEmpty = amountUsd === 0 && totalDeposited === 0;
2037
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2038
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2038
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2039
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2039
2040
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2040
2041
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5" }),
2041
2042
  "Account Balance"
2042
2043
  ] }),
2043
2044
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2044
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { variant: "ghost", size: "sm", onClick: refreshBalance, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4" }) }),
2045
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
2045
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { variant: "ghost", size: "sm", onClick: refreshBalance, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4" }) }),
2046
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
2046
2047
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2047
2048
  "Add Funds"
2048
2049
  ] })
2049
2050
  ] })
2050
2051
  ] }) }),
2051
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "space-y-4", children: [
2052
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
2052
2053
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2053
2054
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl font-bold", children: formatCurrency(amountUsd) }),
2054
2055
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-1", children: [
@@ -2067,8 +2068,8 @@ var BalanceCard = () => {
2067
2068
  ] })
2068
2069
  ] }),
2069
2070
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2070
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: !isEmpty ? "default" : "secondary", children: !isEmpty ? "Active" : "New Account" }),
2071
- isEmpty && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: "outline", children: "Empty Balance" })
2071
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: !isEmpty ? "default" : "secondary", children: !isEmpty ? "Active" : "New Account" }),
2072
+ isEmpty && /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: "outline", children: "Empty Balance" })
2072
2073
  ] })
2073
2074
  ] })
2074
2075
  ] });
@@ -2111,33 +2112,33 @@ var RecentPayments = () => {
2111
2112
  }
2112
2113
  };
2113
2114
  if (isLoadingPayments) {
2114
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2115
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center gap-2", children: [
2115
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2116
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center gap-2", children: [
2116
2117
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
2117
2118
  "Recent Payments"
2118
2119
  ] }) }),
2119
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3 border rounded-sm", children: [
2120
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3 border rounded-sm", children: [
2120
2121
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2121
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-4 w-32" }),
2122
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-3 w-24" })
2122
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
2123
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
2123
2124
  ] }),
2124
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-6 w-16" })
2125
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
2125
2126
  ] }, i)) })
2126
2127
  ] });
2127
2128
  }
2128
2129
  const recentPaymentsList = payments?.results?.slice(0, 5) || [];
2129
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2130
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2130
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2131
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2131
2132
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2132
2133
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
2133
2134
  "Recent Payments"
2134
2135
  ] }),
2135
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { variant: "ghost", size: "sm", children: [
2136
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "ghost", size: "sm", children: [
2136
2137
  "View All",
2137
2138
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "h-4 w-4 ml-2" })
2138
2139
  ] })
2139
2140
  ] }) }),
2140
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardContent, { children: recentPaymentsList.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8 text-muted-foreground", children: [
2141
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { children: recentPaymentsList.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8 text-muted-foreground", children: [
2141
2142
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-12 w-12 mx-auto mb-4 opacity-50" }),
2142
2143
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: "No recent payments" }),
2143
2144
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm mt-2", children: "Create your first payment to get started" })
@@ -2150,7 +2151,7 @@ var RecentPayments = () => {
2150
2151
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
2151
2152
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2152
2153
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatCurrency(payment.amount_usd) }),
2153
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getStatusVariant(payment.status), className: "text-xs", children: payment.status })
2154
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getStatusVariant(payment.status), className: "text-xs", children: payment.status })
2154
2155
  ] }),
2155
2156
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
2156
2157
  getRelativeTime(payment.created_at),
@@ -2172,7 +2173,7 @@ var OverviewView = () => {
2172
2173
  ] }) });
2173
2174
  };
2174
2175
  var PaymentsList = () => {
2175
- const pagination = uiNextjs.useDRFPagination(1, 20);
2176
+ const pagination = components.useDRFPagination(1, 20);
2176
2177
  const {
2177
2178
  data: payments,
2178
2179
  error,
@@ -2243,26 +2244,26 @@ var PaymentsList = () => {
2243
2244
  relativeTime: getRelativeTime(payment.created_at),
2244
2245
  truncatedId: truncateId(payment.id)
2245
2246
  }));
2246
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2247
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2247
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2248
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2248
2249
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Payment History" }),
2249
2250
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2250
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { variant: "outline", size: "sm", onClick: () => refreshPayments(), disabled: isLoadingPayments, children: [
2251
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "outline", size: "sm", onClick: () => refreshPayments(), disabled: isLoadingPayments, children: [
2251
2252
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: `h-4 w-4 mr-2 ${isLoadingPayments ? "animate-spin" : ""}` }),
2252
2253
  "Refresh"
2253
2254
  ] }),
2254
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
2255
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
2255
2256
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2256
2257
  "New Payment"
2257
2258
  ] })
2258
2259
  ] })
2259
2260
  ] }) }),
2260
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "space-y-4", children: [
2261
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
2261
2262
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-4", children: [
2262
2263
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
2263
2264
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
2264
2265
  /* @__PURE__ */ jsxRuntime.jsx(
2265
- uiNextjs.Input,
2266
+ uiCore.Input,
2266
2267
  {
2267
2268
  placeholder: "Search by ID, status, or currency...",
2268
2269
  value: searchTerm,
@@ -2271,63 +2272,63 @@ var PaymentsList = () => {
2271
2272
  }
2272
2273
  )
2273
2274
  ] }),
2274
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Select, { value: statusFilter, onValueChange: handleStatusFilter, children: [
2275
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.SelectTrigger, { className: "w-full sm:w-48", children: [
2275
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Select, { value: statusFilter, onValueChange: handleStatusFilter, children: [
2276
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectTrigger, { className: "w-full sm:w-48", children: [
2276
2277
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4 mr-2" }),
2277
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectValue, { placeholder: "Filter by status" })
2278
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Filter by status" })
2278
2279
  ] }),
2279
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.SelectContent, { children: [
2280
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "all", children: "All Statuses" }),
2281
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "completed", children: "Completed" }),
2282
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "pending", children: "Pending" }),
2283
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "confirming", children: "Confirming" }),
2284
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "failed", children: "Failed" }),
2285
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "expired", children: "Expired" })
2280
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectContent, { children: [
2281
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "all", children: "All Statuses" }),
2282
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "completed", children: "Completed" }),
2283
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "pending", children: "Pending" }),
2284
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "confirming", children: "Confirming" }),
2285
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "failed", children: "Failed" }),
2286
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "expired", children: "Expired" })
2286
2287
  ] })
2287
2288
  ] })
2288
2289
  ] }),
2289
2290
  isLoadingPayments ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border rounded-sm", children: [
2290
2291
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2291
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-4 w-32" }),
2292
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-3 w-24" })
2292
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
2293
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
2293
2294
  ] }),
2294
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-6 w-16" })
2295
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
2295
2296
  ] }, i)) }) : filteredPayments.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-12", children: [
2296
2297
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto mb-4 bg-muted rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-8 h-8 text-muted-foreground" }) }),
2297
2298
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold mb-2", children: "No Payments Found" }),
2298
2299
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: searchTerm || statusFilter !== "all" ? "No payments match your current filters" : "You haven't made any payments yet" }),
2299
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { onClick: () => openCreatePaymentDialog(), children: [
2300
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: () => openCreatePaymentDialog(), children: [
2300
2301
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2301
2302
  "Create Payment"
2302
2303
  ] })
2303
2304
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2304
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Table, { children: [
2305
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TableRow, { children: [
2306
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Date" }),
2307
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Amount" }),
2308
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Currency" }),
2309
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Status" }),
2310
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Provider" }),
2311
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Payment ID" }),
2312
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { className: "text-right", children: "Actions" })
2305
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Table, { children: [
2306
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
2307
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Date" }),
2308
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Amount" }),
2309
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Currency" }),
2310
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Status" }),
2311
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Provider" }),
2312
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Payment ID" }),
2313
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { className: "text-right", children: "Actions" })
2313
2314
  ] }) }),
2314
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableBody, { children: filteredPayments.map((payment) => /* @__PURE__ */ jsxRuntime.jsxs(
2315
- uiNextjs.TableRow,
2315
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableBody, { children: filteredPayments.map((payment) => /* @__PURE__ */ jsxRuntime.jsxs(
2316
+ uiCore.TableRow,
2316
2317
  {
2317
2318
  className: "cursor-pointer hover:bg-accent",
2318
2319
  onClick: () => openPaymentDetailsDialog(String(payment.id)),
2319
2320
  children: [
2320
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2321
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2321
2322
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: payment.formattedDate }),
2322
2323
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: payment.relativeTime })
2323
2324
  ] }) }),
2324
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono font-semibold", children: formatCurrency(payment.amount_usd) }),
2325
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: "outline", children: payment.currency_code || "USD" }) }),
2326
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getStatusVariant(payment.status), children: payment.status }) }),
2327
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "text-sm text-muted-foreground", children: "NowPayments" }),
2328
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono text-sm text-muted-foreground", children: payment.truncatedId }),
2329
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "text-right", children: /* @__PURE__ */ jsxRuntime.jsx(
2330
- uiNextjs.Button,
2325
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono font-semibold", children: formatCurrency(payment.amount_usd) }),
2326
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: "outline", children: payment.currency_code || "USD" }) }),
2327
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getStatusVariant(payment.status), children: payment.status }) }),
2328
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-sm text-muted-foreground", children: "NowPayments" }),
2329
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono text-sm text-muted-foreground", children: payment.truncatedId }),
2330
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-right", children: /* @__PURE__ */ jsxRuntime.jsx(
2331
+ uiCore.Button,
2331
2332
  {
2332
2333
  variant: "ghost",
2333
2334
  size: "sm",
@@ -2344,7 +2345,7 @@ var PaymentsList = () => {
2344
2345
  )) })
2345
2346
  ] }) }),
2346
2347
  /* @__PURE__ */ jsxRuntime.jsx(
2347
- uiNextjs.StaticPagination,
2348
+ components.StaticPagination,
2348
2349
  {
2349
2350
  data: payments,
2350
2351
  onPageChange: pagination.setPage,
@@ -2434,37 +2435,37 @@ var TransactionsList = () => {
2434
2435
  truncatedRef: truncateId(transaction.reference || transaction.payment_id)
2435
2436
  }));
2436
2437
  if (isLoadingTransactions) {
2437
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2438
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center gap-2", children: [
2438
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2439
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center gap-2", children: [
2439
2440
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
2440
2441
  "Transaction History"
2441
2442
  ] }) }),
2442
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border rounded-sm", children: [
2443
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border rounded-sm", children: [
2443
2444
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2444
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-4 w-32" }),
2445
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-3 w-24" })
2445
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
2446
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
2446
2447
  ] }),
2447
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-6 w-16" })
2448
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
2448
2449
  ] }, i)) })
2449
2450
  ] });
2450
2451
  }
2451
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2452
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2452
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2453
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2453
2454
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2454
2455
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
2455
2456
  "Transaction History"
2456
2457
  ] }),
2457
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { variant: "outline", size: "sm", onClick: refreshTransactions, disabled: isLoadingTransactions, children: [
2458
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "outline", size: "sm", onClick: refreshTransactions, disabled: isLoadingTransactions, children: [
2458
2459
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: `h-4 w-4 mr-2 ${isLoadingTransactions ? "animate-spin" : ""}` }),
2459
2460
  "Refresh"
2460
2461
  ] })
2461
2462
  ] }) }),
2462
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "space-y-4", children: [
2463
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
2463
2464
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-4", children: [
2464
2465
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
2465
2466
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
2466
2467
  /* @__PURE__ */ jsxRuntime.jsx(
2467
- uiNextjs.Input,
2468
+ uiCore.Input,
2468
2469
  {
2469
2470
  placeholder: "Search by ID, description, or type...",
2470
2471
  value: searchTerm,
@@ -2473,15 +2474,15 @@ var TransactionsList = () => {
2473
2474
  }
2474
2475
  )
2475
2476
  ] }),
2476
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Select, { value: typeFilter, onValueChange: handleTypeFilter, children: [
2477
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.SelectTrigger, { className: "w-full sm:w-48", children: [
2477
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Select, { value: typeFilter, onValueChange: handleTypeFilter, children: [
2478
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectTrigger, { className: "w-full sm:w-48", children: [
2478
2479
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4 mr-2" }),
2479
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectValue, { placeholder: "Filter by type" })
2480
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Filter by type" })
2480
2481
  ] }),
2481
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.SelectContent, { children: [
2482
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "all", children: "All Types" }),
2483
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "deposit", children: "Deposits" }),
2484
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "withdrawal", children: "Withdrawals" })
2482
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectContent, { children: [
2483
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "all", children: "All Types" }),
2484
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "deposit", children: "Deposits" }),
2485
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "withdrawal", children: "Withdrawals" })
2485
2486
  ] })
2486
2487
  ] })
2487
2488
  ] }),
@@ -2489,31 +2490,31 @@ var TransactionsList = () => {
2489
2490
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto mb-4 bg-muted rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "w-8 h-8 text-muted-foreground" }) }),
2490
2491
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold mb-2", children: "No Transactions Found" }),
2491
2492
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: searchTerm || typeFilter !== "all" ? "No transactions match your current filters" : "You don't have any transactions yet" })
2492
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Table, { children: [
2493
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TableRow, { children: [
2494
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Date & Time" }),
2495
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Type" }),
2496
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Amount" }),
2497
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Balance After" }),
2498
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Description" }),
2499
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Reference" })
2493
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Table, { children: [
2494
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
2495
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Date & Time" }),
2496
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Type" }),
2497
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Amount" }),
2498
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Balance After" }),
2499
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Description" }),
2500
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Reference" })
2500
2501
  ] }) }),
2501
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableBody, { children: filteredTransactions.map((transaction, index) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TableRow, { children: [
2502
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2502
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableBody, { children: filteredTransactions.map((transaction, index) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
2503
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2503
2504
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: transaction.formattedDate }),
2504
2505
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: transaction.relativeTime })
2505
2506
  ] }) }),
2506
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2507
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2507
2508
  getTypeIcon(transaction.type),
2508
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getTypeVariant(transaction.type), children: transaction.type || "Unknown" })
2509
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getTypeVariant(transaction.type), children: transaction.type || "Unknown" })
2509
2510
  ] }) }),
2510
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono font-semibold", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: transaction.isDeposit ? "text-green-600" : "text-red-600", children: [
2511
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono font-semibold", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: transaction.isDeposit ? "text-green-600" : "text-red-600", children: [
2511
2512
  transaction.isDeposit ? "+" : "-",
2512
2513
  formatCurrency(Math.abs(transaction.amount || transaction.amount_usd || 0))
2513
2514
  ] }) }),
2514
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono", children: formatCurrency(transaction.balance_after || 0) }),
2515
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "text-sm", children: transaction.description || transaction.note || "No description" }),
2516
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono text-sm text-muted-foreground", children: transaction.truncatedRef })
2515
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono", children: formatCurrency(transaction.balance_after || 0) }),
2516
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-sm", children: transaction.description || transaction.note || "No description" }),
2517
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono text-sm text-muted-foreground", children: transaction.truncatedRef })
2517
2518
  ] }, transaction.id || index)) })
2518
2519
  ] }) })
2519
2520
  ] })
@@ -2528,30 +2529,30 @@ var PaymentsLayout = () => {
2528
2529
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Payments" }),
2529
2530
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "Manage your payments, balance, and transaction history" })
2530
2531
  ] }),
2531
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Tabs, { defaultValue: "overview", className: "space-y-6", children: [
2532
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TabsList, { className: "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", children: [
2533
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TabsTrigger, { value: "overview", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2532
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Tabs, { defaultValue: "overview", className: "space-y-6", children: [
2533
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsList, { className: "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", children: [
2534
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "overview", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2534
2535
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-4 w-4" }),
2535
2536
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Overview" })
2536
2537
  ] }),
2537
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TabsTrigger, { value: "payments", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2538
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "payments", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2538
2539
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: "h-4 w-4" }),
2539
2540
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Payments" })
2540
2541
  ] }),
2541
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TabsTrigger, { value: "transactions", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2542
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "transactions", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2542
2543
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-4 w-4" }),
2543
2544
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Transactions" })
2544
2545
  ] })
2545
2546
  ] }),
2546
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TabsContent, { value: "overview", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
2547
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "overview", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
2547
2548
  /* @__PURE__ */ jsxRuntime.jsx(OverviewView, {}),
2548
2549
  /* @__PURE__ */ jsxRuntime.jsx(CreatePaymentDialog, {})
2549
2550
  ] }) }) }),
2550
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TabsContent, { value: "payments", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
2551
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "payments", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
2551
2552
  /* @__PURE__ */ jsxRuntime.jsx(PaymentsView, {}),
2552
2553
  /* @__PURE__ */ jsxRuntime.jsx(CreatePaymentDialog, {})
2553
2554
  ] }) }),
2554
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TabsContent, { value: "transactions", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TransactionsView, {}) }) })
2555
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "transactions", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TransactionsView, {}) }) })
2555
2556
  ] }),
2556
2557
  /* @__PURE__ */ jsxRuntime.jsx(PaymentDetailsDialog, {})
2557
2558
  ] }) });
@@ -2560,7 +2561,7 @@ var PaymentsLayout = () => {
2560
2561
  // package.json
2561
2562
  var package_default = {
2562
2563
  name: "@djangocfg/ext-payments",
2563
- version: "1.0.6",
2564
+ version: "1.0.9",
2564
2565
  description: "Payments system extension for DjangoCFG",
2565
2566
  keywords: [
2566
2567
  "django",
@@ -2621,6 +2622,7 @@ var package_default = {
2621
2622
  peerDependencies: {
2622
2623
  "@djangocfg/api": "workspace:*",
2623
2624
  "@djangocfg/ext-base": "workspace:*",
2625
+ "@djangocfg/ui-core": "workspace:*",
2624
2626
  "@djangocfg/ui-nextjs": "workspace:*",
2625
2627
  consola: "^3.4.2",
2626
2628
  "lucide-react": "^0.545.0",
@@ -2635,6 +2637,7 @@ var package_default = {
2635
2637
  "@djangocfg/api": "workspace:*",
2636
2638
  "@djangocfg/ext-base": "workspace:*",
2637
2639
  "@djangocfg/typescript-config": "workspace:*",
2640
+ "@djangocfg/ui-nextjs": "workspace:*",
2638
2641
  "@types/node": "^24.7.2",
2639
2642
  "@types/react": "^19.0.0",
2640
2643
  consola: "^3.4.2",