warqadui 0.0.89 → 0.0.90

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.js CHANGED
@@ -413,6 +413,18 @@ var useTheme = () => {
413
413
  return context;
414
414
  };
415
415
 
416
+ // src/utils/Enums.ts
417
+ var Enums = {
418
+ roles: ["admin", "staff"],
419
+ sex: ["male", "female"],
420
+ accountTypes: ["employee", "supplier", "customer", "amaanah"],
421
+ verificationTypes: ["email_verification", "password_reset"],
422
+ auditActions: ["create", "update", "delete", "login", "logout"],
423
+ walletTypes: ["bank", "cash", "mobile"],
424
+ currencies: ["USD", "TZS", "KES", "CNY"]
425
+ };
426
+ var Enums_default = Enums;
427
+
416
428
  // src/providers/WarqadProvider.tsx
417
429
  var import_jsx_runtime5 = require("react/jsx-runtime");
418
430
  var WarqadConfigContext = (0, import_react3.createContext)(
@@ -448,6 +460,10 @@ var WarqadProvider = ({ children, config }) => {
448
460
  store: {
449
461
  ...DEFAULT_STORE,
450
462
  ...config?.store
463
+ },
464
+ enums: {
465
+ ...Enums_default,
466
+ ...config?.enums
451
467
  }
452
468
  }),
453
469
  [config]
@@ -1924,7 +1940,28 @@ var useSelectContext = () => {
1924
1940
  return context;
1925
1941
  };
1926
1942
  var Select = (0, import_react14.forwardRef)((props, ref) => {
1927
- const { form, name, onChange, value, children, options = [] } = props;
1943
+ const { enums } = useWarqadConfig();
1944
+ const {
1945
+ form,
1946
+ name,
1947
+ onChange,
1948
+ value,
1949
+ children,
1950
+ options: initialOptions = [],
1951
+ enum: enumData,
1952
+ enumName
1953
+ } = props;
1954
+ const options = (0, import_react14.useMemo)(() => {
1955
+ if (initialOptions.length > 0) return initialOptions;
1956
+ const targetEnum = enumData || (enumName ? enums[enumName] : void 0);
1957
+ if (targetEnum) {
1958
+ return targetEnum.map((val) => ({
1959
+ value: val,
1960
+ label: String(val).charAt(0).toUpperCase() + String(val).slice(1)
1961
+ }));
1962
+ }
1963
+ return [];
1964
+ }, [initialOptions, enumData, enumName, enums]);
1928
1965
  (0, import_react14.useEffect)(() => {
1929
1966
  if (form && name && value !== void 0 && value !== null && value !== "") {
1930
1967
  const currentFormValue = form.getValues(name);
@@ -8086,10 +8123,123 @@ var import_react_router_dom6 = require("react-router-dom");
8086
8123
  var import_lucide_react20 = require("lucide-react");
8087
8124
  var import_react34 = require("react");
8088
8125
  var import_antd6 = require("antd");
8126
+
8127
+ // src/components/ErrorPage/ErrorPage.tsx
8089
8128
  var import_jsx_runtime43 = require("react/jsx-runtime");
8129
+ var ErrorPageBase = ({
8130
+ title,
8131
+ message: message16,
8132
+ statusCode,
8133
+ action,
8134
+ className = ""
8135
+ }) => {
8136
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8137
+ "div",
8138
+ {
8139
+ className: `flex-1 m-auto h-full w-full min-h-[50vh] flex flex-col items-center justify-center p-6 text-zinc-900 dark:text-zinc-100 ${className}`,
8140
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative flex flex-col items-center justify-center w-full max-w-2xl text-center", children: [
8141
+ statusCode && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "absolute inset-0 flex items-center justify-center z-0 select-none pointer-events-none opacity-[0.03] dark:opacity-5", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-[12rem] sm:text-[16rem] md:text-[20rem] font-bold leading-none tracking-tighter", children: statusCode }) }),
8142
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative z-10 space-y-6", children: [
8143
+ statusCode && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("h2", { className: "text-xl md:text-2xl font-semibold text-zinc-500 dark:text-zinc-400", children: [
8144
+ "Error ",
8145
+ statusCode
8146
+ ] }),
8147
+ title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight drop-shadow-sm", children: title }),
8148
+ message16 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-lg md:text-xl text-zinc-600 dark:text-zinc-400 max-w-md mx-auto", children: message16 }),
8149
+ action && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "pt-8", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8150
+ "button",
8151
+ {
8152
+ onClick: action.onClick,
8153
+ className: "px-8 py-3.5 rounded-full text-white font-semibold shadow-[0_4px_14px_0_rgba(0,0,0,0.1)] hover:shadow-[0_6px_20px_rgba(0,0,0,0.15)] transition-all hover:-translate-y-0.5 active:translate-y-0 focus:outline-none focus:ring-2 focus:ring-offset-2",
8154
+ style: { backgroundColor: "var(--primary-color, #3b82f6)" },
8155
+ children: action.label
8156
+ }
8157
+ ) })
8158
+ ] })
8159
+ ] })
8160
+ }
8161
+ );
8162
+ };
8163
+
8164
+ // src/components/ErrorPage/ErrorPage.500.tsx
8165
+ var import_jsx_runtime44 = require("react/jsx-runtime");
8166
+ var ErrorPage500 = (props) => {
8167
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8168
+ ErrorPageBase,
8169
+ {
8170
+ statusCode: 500,
8171
+ title: "Internal Server Error",
8172
+ message: "Oops, something went wrong on our end. Please try again later.",
8173
+ action: { label: "Go Home", onClick: () => window.location.href = "/" },
8174
+ ...props
8175
+ }
8176
+ );
8177
+ };
8178
+
8179
+ // src/components/ErrorPage/ErrorPage.404.tsx
8180
+ var import_jsx_runtime45 = require("react/jsx-runtime");
8181
+ var ErrorPage404 = (props) => {
8182
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8183
+ ErrorPageBase,
8184
+ {
8185
+ statusCode: 404,
8186
+ title: "Page Not Found",
8187
+ message: "The page you are looking for doesn't exist or has been moved.",
8188
+ action: { label: "Go Home", onClick: () => window.location.href = "/" },
8189
+ ...props
8190
+ }
8191
+ );
8192
+ };
8193
+
8194
+ // src/components/ErrorPage/ErrorPage.401.tsx
8195
+ var import_jsx_runtime46 = require("react/jsx-runtime");
8196
+ var ErrorPage401 = (props) => {
8197
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8198
+ ErrorPageBase,
8199
+ {
8200
+ statusCode: 401,
8201
+ title: "Unauthorized",
8202
+ message: "You don't have permission to access this page.",
8203
+ action: { label: "Go Home", onClick: () => window.location.href = "/" },
8204
+ ...props
8205
+ }
8206
+ );
8207
+ };
8208
+
8209
+ // src/components/ErrorPage/ErrorPage.400.tsx
8210
+ var import_jsx_runtime47 = require("react/jsx-runtime");
8211
+ var ErrorPage400 = (props) => {
8212
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
8213
+ ErrorPageBase,
8214
+ {
8215
+ statusCode: 400,
8216
+ title: "Bad Request",
8217
+ message: "Your request could not be processed. Please try again.",
8218
+ action: { label: "Go Home", onClick: () => window.location.href = "/" },
8219
+ ...props
8220
+ }
8221
+ );
8222
+ };
8223
+
8224
+ // src/components/ErrorPage/index.ts
8225
+ var ErrorPage = Object.assign(ErrorPageBase, {
8226
+ 500: ErrorPage500,
8227
+ 404: ErrorPage404,
8228
+ 401: ErrorPage401,
8229
+ 400: ErrorPage400
8230
+ });
8231
+
8232
+ // src/components/accounts/Accounts.tsx
8233
+ var import_jsx_runtime48 = require("react/jsx-runtime");
8234
+ var ErrorPage5002 = ErrorPage[500];
8090
8235
  function Accounts({ v, url }) {
8236
+ const { enums } = useWarqadConfig();
8091
8237
  const { branchId } = (0, import_react_router_dom6.useParams)();
8238
+ const navigate = (0, import_react_router_dom6.useNavigate)();
8092
8239
  const { type } = (0, import_react_router_dom6.useParams)();
8240
+ if (!enums.accountTypes.includes(type)) {
8241
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ErrorPage5002, { title: `${type} page not found` });
8242
+ }
8093
8243
  const [deleteAccount, setDeleteAccount] = (0, import_react34.useState)(null);
8094
8244
  const { isLoading, remove } = useApis_default();
8095
8245
  const isEmployee = type === "employee";
@@ -8099,21 +8249,20 @@ function Accounts({ v, url }) {
8099
8249
  dateFilter: false
8100
8250
  });
8101
8251
  const { Modal: Modal2 } = useModal();
8102
- const navigate = (0, import_react_router_dom6.useNavigate)();
8103
8252
  const items = (data2) => [
8104
8253
  {
8105
8254
  label: `Edit ${type}`,
8106
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react20.FilePenLine, { size: 16 }),
8255
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react20.FilePenLine, { size: 16 }),
8107
8256
  onClick: () => navigate(`update?id=${data2?._id}`)
8108
8257
  },
8109
8258
  {
8110
8259
  label: `Delete ${type}`,
8111
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react20.Trash2, { className: "text-red-500", size: 16 }),
8260
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react20.Trash2, { className: "text-red-500", size: 16 }),
8112
8261
  onClick: () => setDeleteAccount(data2)
8113
8262
  },
8114
8263
  isEmployee && !data2?.user && {
8115
8264
  label: `Link User`,
8116
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react20.Cable, { size: 16 }),
8265
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react20.Cable, { size: 16 }),
8117
8266
  onClick: () => navigate(`link-user?id=${data2?._id}`)
8118
8267
  }
8119
8268
  ].filter(Boolean);
@@ -8123,7 +8272,7 @@ function Accounts({ v, url }) {
8123
8272
  header: "Name",
8124
8273
  cell: ({ row }) => {
8125
8274
  const account = row.original;
8126
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: account?.name });
8275
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: account?.name });
8127
8276
  }
8128
8277
  },
8129
8278
  {
@@ -8131,7 +8280,7 @@ function Accounts({ v, url }) {
8131
8280
  header: "Sex",
8132
8281
  cell: ({ row }) => {
8133
8282
  const account = row.original;
8134
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: account?.sex });
8283
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: account?.sex });
8135
8284
  }
8136
8285
  },
8137
8286
  {
@@ -8139,7 +8288,7 @@ function Accounts({ v, url }) {
8139
8288
  header: "Email",
8140
8289
  cell: ({ row }) => {
8141
8290
  const account = row.original;
8142
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: account?.email || "N/A" });
8291
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: account?.email || "N/A" });
8143
8292
  }
8144
8293
  },
8145
8294
  {
@@ -8147,7 +8296,7 @@ function Accounts({ v, url }) {
8147
8296
  header: "Phone",
8148
8297
  cell: ({ row }) => {
8149
8298
  const account = row.original;
8150
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: account?.phoneNumber || "N/A" });
8299
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: account?.phoneNumber || "N/A" });
8151
8300
  }
8152
8301
  },
8153
8302
  isEmployee && {
@@ -8155,7 +8304,7 @@ function Accounts({ v, url }) {
8155
8304
  header: "User",
8156
8305
  cell: ({ row }) => {
8157
8306
  const account = row.original;
8158
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Badge, { variant: account?.user ? "success" : "danger", size: "sm", children: account?.user ? "Linked" : "Not Linked" });
8307
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Badge, { variant: account?.user ? "success" : "danger", size: "sm", children: account?.user ? "Linked" : "Not Linked" });
8159
8308
  }
8160
8309
  },
8161
8310
  {
@@ -8163,13 +8312,13 @@ function Accounts({ v, url }) {
8163
8312
  header: "Actions",
8164
8313
  cell: ({ row }) => {
8165
8314
  const data2 = row.original;
8166
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8315
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8167
8316
  Dropdown,
8168
8317
  {
8169
8318
  className: "cursor-pointer w-[150px]",
8170
8319
  items: items(data2),
8171
8320
  triggerMode: "hover",
8172
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react20.EllipsisVertical, {})
8321
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react20.EllipsisVertical, {})
8173
8322
  }
8174
8323
  );
8175
8324
  }
@@ -8187,9 +8336,9 @@ function Accounts({ v, url }) {
8187
8336
  return error;
8188
8337
  }
8189
8338
  };
8190
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
8191
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Modal2, {}),
8192
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8339
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
8340
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Modal2, {}),
8341
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8193
8342
  ConfirmModal,
8194
8343
  {
8195
8344
  isOpen: !!deleteAccount,
@@ -8202,7 +8351,7 @@ function Accounts({ v, url }) {
8202
8351
  children: null
8203
8352
  }
8204
8353
  ),
8205
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8354
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8206
8355
  TransactionViewComponent,
8207
8356
  {
8208
8357
  columns,
@@ -8242,18 +8391,6 @@ var useApp = () => {
8242
8391
  };
8243
8392
  var useApp_default = useApp;
8244
8393
 
8245
- // src/utils/Enums.ts
8246
- var Enums = {
8247
- roles: ["admin", "staff"],
8248
- sex: ["male", "female"],
8249
- accountTypes: ["employee", "supplier", "customer", "investor"],
8250
- verificationTypes: ["email_verification", "password_reset"],
8251
- auditActions: ["create", "update", "delete", "login", "logout"],
8252
- walletTypes: ["bank", "cash", "mobile"],
8253
- currencies: ["USD", "TZS", "KES", "CNY"]
8254
- };
8255
- var Enums_default = Enums;
8256
-
8257
8394
  // src/components/accounts/schema.tsx
8258
8395
  var import_zod2 = require("zod");
8259
8396
  var createAccountSchema = import_zod2.z.object({
@@ -8307,7 +8444,7 @@ var Formats_default = Formats;
8307
8444
 
8308
8445
  // src/hooks/useAccountBalance.tsx
8309
8446
  var import_react35 = require("react");
8310
- var import_jsx_runtime44 = require("react/jsx-runtime");
8447
+ var import_jsx_runtime49 = require("react/jsx-runtime");
8311
8448
  var useAccountbalance = ({
8312
8449
  url,
8313
8450
  showBalance,
@@ -8341,15 +8478,15 @@ var useAccountbalance = ({
8341
8478
  return null;
8342
8479
  }
8343
8480
  if (isLoading) {
8344
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("h2", { className: "text-gray-500", children: "Getting Balance..." });
8481
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { className: "text-gray-500", children: "Getting Balance..." });
8345
8482
  }
8346
8483
  if (error) {
8347
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("h2", { className: "text-red-500", children: [
8484
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("h2", { className: "text-red-500", children: [
8348
8485
  "Error: ",
8349
8486
  error
8350
8487
  ] });
8351
8488
  }
8352
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
8489
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
8353
8490
  "h2",
8354
8491
  {
8355
8492
  className: `${balance.startsWith("-") ? "text-red-500" : "text-green-500"}`,
@@ -8366,7 +8503,7 @@ var useAccountBalance_default = useAccountbalance;
8366
8503
 
8367
8504
  // src/components/accounts/Feilds/Account.tsx
8368
8505
  var import_react_router_dom8 = require("react-router-dom");
8369
- var import_jsx_runtime45 = require("react/jsx-runtime");
8506
+ var import_jsx_runtime50 = require("react/jsx-runtime");
8370
8507
  function Account({
8371
8508
  name,
8372
8509
  label,
@@ -8386,8 +8523,8 @@ function Account({
8386
8523
  showBalance,
8387
8524
  accountId
8388
8525
  });
8389
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col gap-2", children: [
8390
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8526
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-2", children: [
8527
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
8391
8528
  Fields_default.SearchApi,
8392
8529
  {
8393
8530
  name,
@@ -8404,13 +8541,13 @@ function Account({
8404
8541
  disabled
8405
8542
  }
8406
8543
  ),
8407
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BalanceView, {})
8544
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(BalanceView, {})
8408
8545
  ] });
8409
8546
  }
8410
8547
  var Account_default = Account;
8411
8548
 
8412
8549
  // src/components/accounts/Feilds/Customers.tsx
8413
- var import_jsx_runtime46 = require("react/jsx-runtime");
8550
+ var import_jsx_runtime51 = require("react/jsx-runtime");
8414
8551
  function Customer({
8415
8552
  name = "customer",
8416
8553
  label = "Customer",
@@ -8423,7 +8560,7 @@ function Customer({
8423
8560
  disabled,
8424
8561
  v
8425
8562
  }) {
8426
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8563
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
8427
8564
  Account_default,
8428
8565
  {
8429
8566
  name,
@@ -8442,7 +8579,7 @@ function Customer({
8442
8579
  var Customers_default = Customer;
8443
8580
 
8444
8581
  // src/components/accounts/Feilds/Employee.tsx
8445
- var import_jsx_runtime47 = require("react/jsx-runtime");
8582
+ var import_jsx_runtime52 = require("react/jsx-runtime");
8446
8583
  function Employee({
8447
8584
  name = "employee",
8448
8585
  label = "Employee",
@@ -8455,7 +8592,7 @@ function Employee({
8455
8592
  disabled,
8456
8593
  v
8457
8594
  }) {
8458
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
8595
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
8459
8596
  Account_default,
8460
8597
  {
8461
8598
  name,
@@ -8474,7 +8611,7 @@ function Employee({
8474
8611
  var Employee_default = Employee;
8475
8612
 
8476
8613
  // src/components/accounts/Feilds/Branches.tsx
8477
- var import_jsx_runtime48 = require("react/jsx-runtime");
8614
+ var import_jsx_runtime53 = require("react/jsx-runtime");
8478
8615
  function Branches({
8479
8616
  name = "branch",
8480
8617
  label = "Branch",
@@ -8487,7 +8624,7 @@ function Branches({
8487
8624
  v,
8488
8625
  disabled
8489
8626
  }) {
8490
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8627
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
8491
8628
  Account_default,
8492
8629
  {
8493
8630
  name,
@@ -8516,13 +8653,18 @@ var Feilds_default = AccountFields;
8516
8653
 
8517
8654
  // src/components/accounts/AccountForm.tsx
8518
8655
  var import_react_router_dom9 = require("react-router-dom");
8519
- var import_jsx_runtime49 = require("react/jsx-runtime");
8656
+ var import_jsx_runtime54 = require("react/jsx-runtime");
8657
+ var ErrorPage5003 = ErrorPage[500];
8520
8658
  function AccountForm() {
8659
+ const { enums } = useWarqadConfig();
8521
8660
  const { branchId } = (0, import_react_router_dom9.useParams)();
8522
8661
  const { getQuery, getParams, navigate } = useApp_default();
8523
8662
  const id = getQuery("id");
8524
8663
  const type = getParams("type");
8525
8664
  const isEdit = !!id;
8665
+ if (!enums.accountTypes.includes(type)) {
8666
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ErrorPage5003, { title: `${type} page not found` });
8667
+ }
8526
8668
  const { post, put, isLoading } = useApis_default();
8527
8669
  const { isLoading: isLoadingGet, get } = useApis_default();
8528
8670
  const methods = (0, import_react_hook_form8.useForm)({
@@ -8576,24 +8718,24 @@ function AccountForm() {
8576
8718
  fetches();
8577
8719
  }
8578
8720
  }, [id]);
8579
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
8721
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
8580
8722
  Card,
8581
8723
  {
8582
8724
  className: "max-w-4xl mx-auto mt-10 relative",
8583
8725
  isLoading: isLoadingGet,
8584
8726
  loadingText: "Processing...",
8585
8727
  children: [
8586
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Card.Header, { children: [
8587
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Card.Title, { children: `${isEdit ? "Edit" : "Add"} ${type}` }),
8588
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Card.Description, { children: isEdit ? `Update the details for this ${type}` : `Create a new ${type} and add it to your list` })
8728
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Card.Header, { children: [
8729
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Card.Title, { children: `${isEdit ? "Edit" : "Add"} ${type}` }),
8730
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Card.Description, { children: isEdit ? `Update the details for this ${type}` : `Create a new ${type} and add it to your list` })
8589
8731
  ] }),
8590
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Card.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
8732
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Card.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
8591
8733
  "form",
8592
8734
  {
8593
8735
  onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)),
8594
8736
  children: [
8595
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
8596
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8737
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
8738
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8597
8739
  Fields_default.Input,
8598
8740
  {
8599
8741
  label: "Name",
@@ -8604,19 +8746,16 @@ function AccountForm() {
8604
8746
  required: true
8605
8747
  }
8606
8748
  ),
8607
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8749
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8608
8750
  Fields_default.Select,
8609
8751
  {
8610
8752
  label: "Sex",
8611
8753
  form: methods,
8612
8754
  name: "sex",
8613
- options: Enums_default.sex.map((sex) => ({
8614
- value: sex,
8615
- label: sex
8616
- }))
8755
+ enumName: "sex"
8617
8756
  }
8618
8757
  ),
8619
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8758
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8620
8759
  Fields_default.Input,
8621
8760
  {
8622
8761
  label: "Email",
@@ -8626,7 +8765,7 @@ function AccountForm() {
8626
8765
  placeholder: "e.g maoo@exapmle.com"
8627
8766
  }
8628
8767
  ),
8629
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8768
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8630
8769
  Fields_default.PhoneInput,
8631
8770
  {
8632
8771
  label: "Phone Number",
@@ -8635,7 +8774,7 @@ function AccountForm() {
8635
8774
  placeholder: "Enter phone number"
8636
8775
  }
8637
8776
  ),
8638
- !branchId && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8777
+ !branchId && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8639
8778
  Feilds_default.Branches,
8640
8779
  {
8641
8780
  label: "Branch",
@@ -8646,7 +8785,7 @@ function AccountForm() {
8646
8785
  }
8647
8786
  )
8648
8787
  ] }),
8649
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8788
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8650
8789
  Button,
8651
8790
  {
8652
8791
  isLoading,
@@ -8705,7 +8844,7 @@ var import_react_hook_form9 = require("react-hook-form");
8705
8844
  var import_zod5 = require("@hookform/resolvers/zod");
8706
8845
  var import_antd8 = require("antd");
8707
8846
  var import_react37 = require("react");
8708
- var import_jsx_runtime50 = require("react/jsx-runtime");
8847
+ var import_jsx_runtime55 = require("react/jsx-runtime");
8709
8848
  function LinkUser({ type: initialType = "employee" }) {
8710
8849
  const { getQuery, navigate, getParams } = useApp_default();
8711
8850
  const id = getQuery("id");
@@ -8761,26 +8900,26 @@ function LinkUser({ type: initialType = "employee" }) {
8761
8900
  navigate(-1);
8762
8901
  }
8763
8902
  }, [id]);
8764
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
8903
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
8765
8904
  Card,
8766
8905
  {
8767
8906
  className: "max-w-4xl mx-auto mt-10 relative",
8768
8907
  isLoading: isLoadingGet,
8769
8908
  loadingText: "Processing...",
8770
8909
  children: [
8771
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Card.Header, { children: [
8772
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Card.Title, { children: `Link User ` }),
8773
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Card.Description, { children: "Link User Employee and add it to your list" })
8910
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Card.Header, { children: [
8911
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Card.Title, { children: `Link User ` }),
8912
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Card.Description, { children: "Link User Employee and add it to your list" })
8774
8913
  ] }),
8775
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Card.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
8914
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Card.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
8776
8915
  "form",
8777
8916
  {
8778
8917
  onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)),
8779
8918
  className: "space-y-4",
8780
8919
  children: [
8781
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
8920
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
8782
8921
  " ",
8783
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
8922
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
8784
8923
  Fields_default.Input,
8785
8924
  {
8786
8925
  label: "Name",
@@ -8791,7 +8930,7 @@ function LinkUser({ type: initialType = "employee" }) {
8791
8930
  disabled: true
8792
8931
  }
8793
8932
  ),
8794
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
8933
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
8795
8934
  Fields_default.Input,
8796
8935
  {
8797
8936
  label: "Email",
@@ -8802,7 +8941,7 @@ function LinkUser({ type: initialType = "employee" }) {
8802
8941
  required: true
8803
8942
  }
8804
8943
  ),
8805
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
8944
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
8806
8945
  Fields_default.Select,
8807
8946
  {
8808
8947
  label: "Role",
@@ -8813,7 +8952,7 @@ function LinkUser({ type: initialType = "employee" }) {
8813
8952
  }
8814
8953
  )
8815
8954
  ] }),
8816
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
8955
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
8817
8956
  Button,
8818
8957
  {
8819
8958
  isLoading,
@@ -8842,7 +8981,7 @@ var import_react_hook_form10 = require("react-hook-form");
8842
8981
  var import_zod6 = require("@hookform/resolvers/zod");
8843
8982
  var import_antd9 = require("antd");
8844
8983
  var import_react38 = require("react");
8845
- var import_jsx_runtime51 = require("react/jsx-runtime");
8984
+ var import_jsx_runtime56 = require("react/jsx-runtime");
8846
8985
  var { Countdown } = import_antd9.Statistic;
8847
8986
  function VerifyEmailForm({
8848
8987
  data,
@@ -8910,9 +9049,9 @@ function VerifyEmailForm({
8910
9049
  import_antd9.message.error(error?.message || "Something went wrong");
8911
9050
  }
8912
9051
  };
8913
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("form", { onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)), children: [
8914
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-2", children: [
8915
- oldEmail && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "border-b-2 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9052
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("form", { onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)), children: [
9053
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-2", children: [
9054
+ oldEmail && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "border-b-2 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8916
9055
  Fields_default.Input,
8917
9056
  {
8918
9057
  label: "Current Email",
@@ -8922,7 +9061,7 @@ function VerifyEmailForm({
8922
9061
  disabled: true
8923
9062
  }
8924
9063
  ) }),
8925
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9064
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8926
9065
  Fields_default.Input,
8927
9066
  {
8928
9067
  label: "New Email",
@@ -8933,7 +9072,7 @@ function VerifyEmailForm({
8933
9072
  disabled: true
8934
9073
  }
8935
9074
  ),
8936
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9075
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8937
9076
  Fields_default.Input,
8938
9077
  {
8939
9078
  label: "Token",
@@ -8944,19 +9083,19 @@ function VerifyEmailForm({
8944
9083
  }
8945
9084
  )
8946
9085
  ] }),
8947
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 mt-2", children: [
8948
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("h1", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
9086
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center gap-2 mt-2", children: [
9087
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("h1", { className: "text-sm text-gray-600 dark:text-gray-400", children: [
8949
9088
  "Didn't receive a verification token or expired?",
8950
9089
  " "
8951
9090
  ] }),
8952
- hasPassed || !threeMinutesLater ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9091
+ hasPassed || !threeMinutesLater ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8953
9092
  "span",
8954
9093
  {
8955
9094
  onClick: resend,
8956
9095
  className: "text-blue-600 cursor-pointer underline text-sm",
8957
9096
  children: "Resend"
8958
9097
  }
8959
- ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-blue-600 cursor-pointer underline text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9098
+ ) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-blue-600 cursor-pointer underline text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8960
9099
  Countdown,
8961
9100
  {
8962
9101
  styles: { content: { fontSize: 14, color: "#3b82f6" } },
@@ -8966,7 +9105,7 @@ function VerifyEmailForm({
8966
9105
  threeMinutesLater
8967
9106
  ) })
8968
9107
  ] }),
8969
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
9108
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8970
9109
  Button,
8971
9110
  {
8972
9111
  isLoading,
@@ -8984,7 +9123,7 @@ var VerifyEmailForm_default = VerifyEmailForm;
8984
9123
  var import_react_hook_form11 = require("react-hook-form");
8985
9124
  var import_zod7 = require("@hookform/resolvers/zod");
8986
9125
  var import_antd10 = require("antd");
8987
- var import_jsx_runtime52 = require("react/jsx-runtime");
9126
+ var import_jsx_runtime57 = require("react/jsx-runtime");
8988
9127
  function UpdateEmailForm({
8989
9128
  data,
8990
9129
  close,
@@ -9017,9 +9156,9 @@ function UpdateEmailForm({
9017
9156
  import_antd10.message.error(error?.message || "Something went wrong");
9018
9157
  }
9019
9158
  };
9020
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("form", { onSubmit: handleSubmit(onSubmit), children: [
9021
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-4", children: [
9022
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9159
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("form", { onSubmit: handleSubmit(onSubmit), children: [
9160
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-4", children: [
9161
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9023
9162
  Fields_default.Input,
9024
9163
  {
9025
9164
  label: "Current Email",
@@ -9028,7 +9167,7 @@ function UpdateEmailForm({
9028
9167
  disabled: true
9029
9168
  }
9030
9169
  ),
9031
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9170
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9032
9171
  Fields_default.Input,
9033
9172
  {
9034
9173
  label: "New Email Address",
@@ -9039,10 +9178,10 @@ function UpdateEmailForm({
9039
9178
  required: true
9040
9179
  }
9041
9180
  ),
9042
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "bg-blue-50 dark:bg-blue-900/10 border-l-4 border-blue-400 p-3 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-xs text-blue-700 dark:text-blue-400", children: "Note: You will need to verify the new email address before it becomes primary." }) })
9181
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-blue-50 dark:bg-blue-900/10 border-l-4 border-blue-400 p-3 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-xs text-blue-700 dark:text-blue-400", children: "Note: You will need to verify the new email address before it becomes primary." }) })
9043
9182
  ] }),
9044
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("footer", { className: "flex justify-end mt-6 gap-3", children: [
9045
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9183
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("footer", { className: "flex justify-end mt-6 gap-3", children: [
9184
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9046
9185
  Button,
9047
9186
  {
9048
9187
  type: "button",
@@ -9052,7 +9191,7 @@ function UpdateEmailForm({
9052
9191
  children: "Cancel"
9053
9192
  }
9054
9193
  ),
9055
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
9194
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9056
9195
  Button,
9057
9196
  {
9058
9197
  isLoading,
@@ -9071,7 +9210,7 @@ var UpdateEmailForm_default = UpdateEmailForm;
9071
9210
  var import_react_hook_form12 = require("react-hook-form");
9072
9211
  var import_antd11 = require("antd");
9073
9212
  var import_react39 = require("react");
9074
- var import_jsx_runtime53 = require("react/jsx-runtime");
9213
+ var import_jsx_runtime58 = require("react/jsx-runtime");
9075
9214
  var { Countdown: Countdown2 } = import_antd11.Statistic;
9076
9215
  function ResetPasswordForm({
9077
9216
  data,
@@ -9126,9 +9265,9 @@ function ResetPasswordForm({
9126
9265
  import_antd11.message.error(error?.message || "Something went wrong");
9127
9266
  }
9128
9267
  };
9129
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("form", { onSubmit: handleSubmit(onSubmit), children: [
9130
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "space-y-4", children: [
9131
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "border-b-2 pb-4 dark:border-zinc-800", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9268
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("form", { onSubmit: handleSubmit(onSubmit), children: [
9269
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "space-y-4", children: [
9270
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "border-b-2 pb-4 dark:border-zinc-800", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
9132
9271
  Fields_default.Input,
9133
9272
  {
9134
9273
  label: "Target Email",
@@ -9137,10 +9276,10 @@ function ResetPasswordForm({
9137
9276
  disabled: true
9138
9277
  }
9139
9278
  ) }),
9140
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "bg-orange-50 dark:bg-orange-900/10 border-l-4 border-orange-400 p-4 rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm text-orange-700 dark:text-orange-300", children: "Click context below to send a secure password reset link to this user." }) }),
9141
- !hasPassed && threeMinutesLater && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2 mt-2 bg-blue-50 dark:bg-blue-900/10 p-2 rounded-lg", children: [
9142
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-xs text-blue-600 dark:text-blue-400 font-medium", children: "You can request another link in:" }),
9143
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-blue-600 font-bold text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9279
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "bg-orange-50 dark:bg-orange-900/10 border-l-4 border-orange-400 p-4 rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-sm text-orange-700 dark:text-orange-300", children: "Click context below to send a secure password reset link to this user." }) }),
9280
+ !hasPassed && threeMinutesLater && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2 mt-2 bg-blue-50 dark:bg-blue-900/10 p-2 rounded-lg", children: [
9281
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs text-blue-600 dark:text-blue-400 font-medium", children: "You can request another link in:" }),
9282
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-blue-600 font-bold text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
9144
9283
  Countdown2,
9145
9284
  {
9146
9285
  styles: { content: { fontSize: 12, color: "#3b82f6" } },
@@ -9151,8 +9290,8 @@ function ResetPasswordForm({
9151
9290
  ) })
9152
9291
  ] })
9153
9292
  ] }),
9154
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("footer", { className: "flex justify-end mt-8 gap-3", children: [
9155
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9293
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("footer", { className: "flex justify-end mt-8 gap-3", children: [
9294
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
9156
9295
  Button,
9157
9296
  {
9158
9297
  type: "button",
@@ -9162,7 +9301,7 @@ function ResetPasswordForm({
9162
9301
  children: "Cancel"
9163
9302
  }
9164
9303
  ),
9165
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
9304
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
9166
9305
  Button,
9167
9306
  {
9168
9307
  isLoading,
@@ -9180,11 +9319,11 @@ var ResetPasswordForm_default = ResetPasswordForm;
9180
9319
  // src/components/users/Activate.tsx
9181
9320
  var import_antd12 = require("antd");
9182
9321
  var import_react40 = require("react");
9183
- var import_jsx_runtime54 = require("react/jsx-runtime");
9322
+ var import_jsx_runtime59 = require("react/jsx-runtime");
9184
9323
  var ActivateUser = ({ data }) => {
9185
9324
  const [checked, setChecked] = (0, import_react40.useState)(data?.isActive);
9186
9325
  const { put, isLoading } = useApis_default();
9187
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
9326
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9188
9327
  import_antd12.Switch,
9189
9328
  {
9190
9329
  onChange: async (e) => {
@@ -9212,7 +9351,7 @@ var Activate_default = ActivateUser;
9212
9351
 
9213
9352
  // src/components/users/users.tsx
9214
9353
  var import_react_router_dom10 = require("react-router-dom");
9215
- var import_jsx_runtime55 = require("react/jsx-runtime");
9354
+ var import_jsx_runtime60 = require("react/jsx-runtime");
9216
9355
  function Users() {
9217
9356
  const navigate = (0, import_react_router_dom10.useNavigate)();
9218
9357
  const { data, TransactionViewComponent, reload } = useTransaction_default({
@@ -9224,11 +9363,11 @@ function Users() {
9224
9363
  const items = (data2) => [
9225
9364
  {
9226
9365
  label: `Reset Password`,
9227
- icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react21.Key, { size: 16 }),
9366
+ icon: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react21.Key, { size: 16 }),
9228
9367
  onClick: () => openState({
9229
9368
  title: "Request Password Reset",
9230
9369
  type: "form",
9231
- content: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9370
+ content: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9232
9371
  ResetPasswordForm_default,
9233
9372
  {
9234
9373
  data: data2,
@@ -9241,11 +9380,11 @@ function Users() {
9241
9380
  },
9242
9381
  {
9243
9382
  label: `Update Email`,
9244
- icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react21.Mail, { size: 16 }),
9383
+ icon: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react21.Mail, { size: 16 }),
9245
9384
  onClick: () => openState({
9246
9385
  title: "Update Email Address",
9247
9386
  type: "form",
9248
- content: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9387
+ content: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9249
9388
  UpdateEmailForm_default,
9250
9389
  {
9251
9390
  data: data2,
@@ -9258,11 +9397,11 @@ function Users() {
9258
9397
  },
9259
9398
  data2?.emailVerification && {
9260
9399
  label: `Verify Email`,
9261
- icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react21.ShieldCheck, {}),
9400
+ icon: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react21.ShieldCheck, {}),
9262
9401
  onClick: () => openState({
9263
9402
  title: "Verify Email",
9264
9403
  type: "form",
9265
- content: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9404
+ content: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9266
9405
  VerifyEmailForm_default,
9267
9406
  {
9268
9407
  data: data2,
@@ -9283,16 +9422,16 @@ function Users() {
9283
9422
  const data2 = row.original;
9284
9423
  const emailVerification = data2?.emailVerification;
9285
9424
  const newEmail = emailVerification?.email !== data2?.email ? emailVerification?.email : null;
9286
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "space-y-1", children: [
9287
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { className: "flex items-center gap-2", children: [
9425
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "space-y-1", children: [
9426
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("section", { className: "flex items-center gap-2", children: [
9288
9427
  " ",
9289
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: data2?.email }),
9290
- data2?.isEmailVerified && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Badge, { variant: "success", size: "sm", children: "Verified" }),
9291
- !data2?.isEmailVerified && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Badge, { variant: "warning", size: "sm", children: "Not Verified" })
9428
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { children: data2?.email }),
9429
+ data2?.isEmailVerified && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Badge, { variant: "success", size: "sm", children: "Verified" }),
9430
+ !data2?.isEmailVerified && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Badge, { variant: "warning", size: "sm", children: "Not Verified" })
9292
9431
  ] }),
9293
- newEmail && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { className: "flex items-center gap-2", children: [
9294
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react21.Info, { size: 16, className: "text-orange-600" }),
9295
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: newEmail })
9432
+ newEmail && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("section", { className: "flex items-center gap-2", children: [
9433
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react21.Info, { size: 16, className: "text-orange-600" }),
9434
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { children: newEmail })
9296
9435
  ] })
9297
9436
  ] });
9298
9437
  }
@@ -9302,7 +9441,7 @@ function Users() {
9302
9441
  header: "Role",
9303
9442
  cell: ({ row }) => {
9304
9443
  const data2 = row.original;
9305
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9444
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9306
9445
  Badge,
9307
9446
  {
9308
9447
  variant: data2?.role === "admin" ? "primary" : "warning",
@@ -9317,7 +9456,7 @@ function Users() {
9317
9456
  header: "Employee Name",
9318
9457
  cell: ({ row }) => {
9319
9458
  const account = row.original?.account;
9320
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: account?.name || "N/A" });
9459
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: account?.name || "N/A" });
9321
9460
  }
9322
9461
  },
9323
9462
  {
@@ -9325,7 +9464,7 @@ function Users() {
9325
9464
  header: "Status",
9326
9465
  cell: ({ row }) => {
9327
9466
  const data2 = row.original;
9328
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Activate_default, { data: data2 });
9467
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Activate_default, { data: data2 });
9329
9468
  }
9330
9469
  },
9331
9470
  {
@@ -9333,13 +9472,13 @@ function Users() {
9333
9472
  header: "Actions",
9334
9473
  cell: ({ row }) => {
9335
9474
  const data2 = row.original;
9336
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9475
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9337
9476
  Dropdown,
9338
9477
  {
9339
9478
  className: "w-fit! cursor-pointer",
9340
9479
  items: items(data2),
9341
9480
  triggerMode: "hover",
9342
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react21.EllipsisVertical, {})
9481
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react21.EllipsisVertical, {})
9343
9482
  }
9344
9483
  );
9345
9484
  }
@@ -9348,9 +9487,9 @@ function Users() {
9348
9487
  [items]
9349
9488
  );
9350
9489
  const users = data?.data || [];
9351
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
9352
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Modal2, {}),
9353
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
9490
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
9491
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Modal2, {}),
9492
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9354
9493
  TransactionViewComponent,
9355
9494
  {
9356
9495
  columns,
@@ -9371,7 +9510,7 @@ var users_default = Users;
9371
9510
  var import_react_hook_form13 = require("react-hook-form");
9372
9511
  var import_zod8 = require("@hookform/resolvers/zod");
9373
9512
  var import_antd13 = require("antd");
9374
- var import_jsx_runtime56 = require("react/jsx-runtime");
9513
+ var import_jsx_runtime61 = require("react/jsx-runtime");
9375
9514
  function UserForm() {
9376
9515
  const { navigate } = useApp_default();
9377
9516
  const { post, isLoading } = useApis_default();
@@ -9396,14 +9535,14 @@ function UserForm() {
9396
9535
  import_antd13.message.error(error?.message || "Something went wrong");
9397
9536
  }
9398
9537
  };
9399
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Card, { className: "max-w-xl mx-auto mt-10 relative", children: [
9400
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Card.Header, { children: [
9401
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card.Title, { children: "Add User" }),
9402
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card.Description, { children: "Create a new user by providing their email and phone number." })
9538
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Card, { className: "max-w-xl mx-auto mt-10 relative", children: [
9539
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Card.Header, { children: [
9540
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Card.Title, { children: "Add User" }),
9541
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Card.Description, { children: "Create a new user by providing their email and phone number." })
9403
9542
  ] }),
9404
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Card.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("form", { onSubmit: handleSubmit(onSubmit), children: [
9405
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-4", children: [
9406
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
9543
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Card.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("form", { onSubmit: handleSubmit(onSubmit), children: [
9544
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "space-y-4", children: [
9545
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
9407
9546
  Fields_default.Input,
9408
9547
  {
9409
9548
  label: "Email",
@@ -9414,7 +9553,7 @@ function UserForm() {
9414
9553
  required: true
9415
9554
  }
9416
9555
  ),
9417
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
9556
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
9418
9557
  Fields_default.PhoneInput,
9419
9558
  {
9420
9559
  label: "Phone Number",
@@ -9423,7 +9562,7 @@ function UserForm() {
9423
9562
  placeholder: "Enter phone number"
9424
9563
  }
9425
9564
  ),
9426
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
9565
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
9427
9566
  Fields_default.Select,
9428
9567
  {
9429
9568
  label: "Role",
@@ -9434,7 +9573,7 @@ function UserForm() {
9434
9573
  }
9435
9574
  )
9436
9575
  ] }),
9437
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("footer", { className: "flex justify-end mt-6", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
9576
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("footer", { className: "flex justify-end mt-6", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
9438
9577
  Button,
9439
9578
  {
9440
9579
  isLoading,
@@ -9457,7 +9596,7 @@ var import_react_hook_form14 = require("react-hook-form");
9457
9596
  var import_zod9 = require("@hookform/resolvers/zod");
9458
9597
  var z4 = __toESM(require("zod"));
9459
9598
  var import_antd14 = require("antd");
9460
- var import_jsx_runtime57 = require("react/jsx-runtime");
9599
+ var import_jsx_runtime62 = require("react/jsx-runtime");
9461
9600
  var resetPageSchema = z4.object({
9462
9601
  password: z4.string().min(6, "Password must be at least 6 characters"),
9463
9602
  confirmPassword: z4.string().min(6, "Password must be at least 6 characters")
@@ -9523,14 +9662,14 @@ function ResetPasswordPage() {
9523
9662
  }
9524
9663
  };
9525
9664
  if (verifying) {
9526
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "h-screen w-full flex items-center justify-center bg-slate-50 dark:bg-[#0A0B10]", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "text-center space-y-4", children: [
9527
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_antd14.Spin, { size: "large" }),
9528
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-slate-500 animate-pulse", children: "Verifying reset link..." })
9665
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "h-screen w-full flex items-center justify-center bg-slate-50 dark:bg-[#0A0B10]", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "text-center space-y-4", children: [
9666
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_antd14.Spin, { size: "large" }),
9667
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-slate-500 animate-pulse", children: "Verifying reset link..." })
9529
9668
  ] }) });
9530
9669
  }
9531
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex h-screen w-full overflow-hidden bg-white dark:bg-[#0A0B10]", children: [
9532
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "hidden lg:flex lg:w-1/2 relative overflow-hidden bg-slate-900 border-r border-slate-800", children: [
9533
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9670
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex h-screen w-full overflow-hidden bg-white dark:bg-[#0A0B10]", children: [
9671
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "hidden lg:flex lg:w-1/2 relative overflow-hidden bg-slate-900 border-r border-slate-800", children: [
9672
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
9534
9673
  "div",
9535
9674
  {
9536
9675
  className: "absolute inset-0 z-0 opacity-40 bg-cover bg-center",
@@ -9539,35 +9678,35 @@ function ResetPasswordPage() {
9539
9678
  }
9540
9679
  }
9541
9680
  ),
9542
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "absolute inset-0 bg-linear-to-tr from-[#0A0B10] via-transparent to-indigo-500/10 z-10" }),
9543
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "relative z-20 p-12 flex flex-col justify-between w-full h-full", children: [
9544
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-3", children: [
9545
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "h-10 w-10 bg-indigo-600 rounded-lg flex items-center justify-center shadow-indigo-500/20 shadow-xl", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react22.Terminal, { className: "text-white w-6 h-6" }) }),
9546
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-2xl font-bold text-white tracking-widest uppercase", children: "Warqad UI" })
9681
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "absolute inset-0 bg-linear-to-tr from-[#0A0B10] via-transparent to-indigo-500/10 z-10" }),
9682
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "relative z-20 p-12 flex flex-col justify-between w-full h-full", children: [
9683
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-center gap-3", children: [
9684
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "h-10 w-10 bg-indigo-600 rounded-lg flex items-center justify-center shadow-indigo-500/20 shadow-xl", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.Terminal, { className: "text-white w-6 h-6" }) }),
9685
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-2xl font-bold text-white tracking-widest uppercase", children: "Warqad UI" })
9547
9686
  ] }),
9548
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "max-w-md", children: [
9549
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("h1", { className: "text-5xl font-extrabold text-white mb-6 leading-tight", children: [
9687
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "max-w-md", children: [
9688
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("h1", { className: "text-5xl font-extrabold text-white mb-6 leading-tight", children: [
9550
9689
  "Secure ",
9551
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-indigo-400", children: "Access" }),
9690
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-indigo-400", children: "Access" }),
9552
9691
  " ",
9553
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("br", {}),
9692
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("br", {}),
9554
9693
  " ",
9555
9694
  "Simplified."
9556
9695
  ] }),
9557
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-slate-400 text-lg leading-relaxed", children: "Reset your credentials securely and regain access to your dashboard in minutes." })
9696
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-slate-400 text-lg leading-relaxed", children: "Reset your credentials securely and regain access to your dashboard in minutes." })
9558
9697
  ] }),
9559
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "text-slate-500 text-sm italic", children: "Trusted by developers worldwide." })
9698
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-slate-500 text-sm italic", children: "Trusted by developers worldwide." })
9560
9699
  ] })
9561
9700
  ] }),
9562
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "w-full lg:w-1/2 p-8 lg:p-16 flex flex-col justify-center bg-white dark:bg-[#0A0B10] relative", children: [
9563
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ThemeToggle, {}) }),
9564
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "max-w-md w-full mx-auto", children: !isVerified || error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "text-center space-y-6", children: [
9565
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "mx-auto w-16 h-16 bg-red-100 dark:bg-red-900/20 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react22.ShieldCheck, { className: "text-red-600 dark:text-red-400 w-8 h-8" }) }),
9566
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { children: [
9567
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-2", children: "Link Invalid" }),
9568
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-slate-500 dark:text-slate-400", children: error || "The reset link is invalid or has already been used." })
9701
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "w-full lg:w-1/2 p-8 lg:p-16 flex flex-col justify-center bg-white dark:bg-[#0A0B10] relative", children: [
9702
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "absolute top-4 right-4 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ThemeToggle, {}) }),
9703
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "max-w-md w-full mx-auto", children: !isVerified || error ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "text-center space-y-6", children: [
9704
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mx-auto w-16 h-16 bg-red-100 dark:bg-red-900/20 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.ShieldCheck, { className: "text-red-600 dark:text-red-400 w-8 h-8" }) }),
9705
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { children: [
9706
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-2", children: "Link Invalid" }),
9707
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-slate-500 dark:text-slate-400", children: error || "The reset link is invalid or has already been used." })
9569
9708
  ] }),
9570
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9709
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
9571
9710
  Button,
9572
9711
  {
9573
9712
  onClick: () => navigate("/login"),
@@ -9575,22 +9714,22 @@ function ResetPasswordPage() {
9575
9714
  children: "Back to Login"
9576
9715
  }
9577
9716
  )
9578
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
9579
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mb-10", children: [
9580
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-3 tracking-tight", children: "Reset Password" }),
9581
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "text-slate-500 dark:text-slate-400", children: [
9717
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
9718
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "mb-10", children: [
9719
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("h2", { className: "text-3xl font-bold text-slate-900 dark:text-white mb-3 tracking-tight", children: "Reset Password" }),
9720
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("p", { className: "text-slate-500 dark:text-slate-400", children: [
9582
9721
  "Set a new, strong password for",
9583
9722
  " ",
9584
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-indigo-600 font-medium", children: email })
9723
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-indigo-600 font-medium", children: email })
9585
9724
  ] })
9586
9725
  ] }),
9587
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
9726
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
9588
9727
  "form",
9589
9728
  {
9590
9729
  onSubmit: methods.handleSubmit(onSubmit),
9591
9730
  className: "space-y-6",
9592
9731
  children: [
9593
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9732
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
9594
9733
  Fields_default.Input,
9595
9734
  {
9596
9735
  form: methods,
@@ -9599,11 +9738,11 @@ function ResetPasswordPage() {
9599
9738
  type: "password",
9600
9739
  placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
9601
9740
  required: true,
9602
- icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react22.Lock, { size: 18, className: "text-slate-400" }),
9741
+ icon: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.Lock, { size: 18, className: "text-slate-400" }),
9603
9742
  className: "bg-slate-50 dark:bg-slate-900/50 h-12"
9604
9743
  }
9605
9744
  ),
9606
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9745
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
9607
9746
  Fields_default.Input,
9608
9747
  {
9609
9748
  form: methods,
@@ -9612,11 +9751,11 @@ function ResetPasswordPage() {
9612
9751
  type: "password",
9613
9752
  placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
9614
9753
  required: true,
9615
- icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react22.ShieldCheck, { size: 18, className: "text-slate-400" }),
9754
+ icon: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.ShieldCheck, { size: 18, className: "text-slate-400" }),
9616
9755
  className: "bg-slate-50 dark:bg-slate-900/50 h-12"
9617
9756
  }
9618
9757
  ),
9619
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
9758
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
9620
9759
  Button,
9621
9760
  {
9622
9761
  type: "submit",
@@ -9624,7 +9763,7 @@ function ResetPasswordPage() {
9624
9763
  className: "w-full h-12 bg-indigo-600 hover:bg-indigo-500 text-white font-semibold flex items-center justify-center gap-2",
9625
9764
  children: [
9626
9765
  "Update Password",
9627
- !isLoading && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react22.ArrowRight, { size: 18 })
9766
+ !isLoading && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.ArrowRight, { size: 18 })
9628
9767
  ]
9629
9768
  }
9630
9769
  )
@@ -9641,7 +9780,7 @@ var ResetPasswordPage_default = ResetPasswordPage;
9641
9780
  var import_lucide_react23 = require("lucide-react");
9642
9781
  var import_react_router_dom12 = require("react-router-dom");
9643
9782
  var import_antd15 = require("antd");
9644
- var import_jsx_runtime58 = require("react/jsx-runtime");
9783
+ var import_jsx_runtime63 = require("react/jsx-runtime");
9645
9784
  var UserProfile = ({
9646
9785
  items,
9647
9786
  name,
@@ -9674,21 +9813,21 @@ var UserProfile = ({
9674
9813
  const defaultItems = [
9675
9814
  {
9676
9815
  label: "My Profile",
9677
- icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react23.User, { size: 18 }),
9816
+ icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_lucide_react23.User, { size: 18 }),
9678
9817
  onClick: () => navigate("profile"),
9679
9818
  className: "min-w-[150px]"
9680
9819
  },
9681
9820
  {
9682
9821
  label: "Logout",
9683
- icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react23.LogOut, { size: 18 }),
9822
+ icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_lucide_react23.LogOut, { size: 18 }),
9684
9823
  onClick: logout,
9685
9824
  className: "text-red-500 hover:bg-red-50 dark:hover:bg-red-950/20"
9686
9825
  }
9687
9826
  ];
9688
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-3", children: [
9689
- showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ThemeToggle, {}),
9690
- showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "w-px h-6 mx-2 bg-gray-200 dark:bg-gray-800" }),
9691
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
9827
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-center gap-3", children: [
9828
+ showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ThemeToggle, {}),
9829
+ showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "w-px h-6 mx-2 bg-gray-200 dark:bg-gray-800" }),
9830
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9692
9831
  ProfileDropdown,
9693
9832
  {
9694
9833
  name: name || account?.name || "User",
@@ -9706,12 +9845,12 @@ var UserProfile_default = UserProfile;
9706
9845
  // src/components/users/ProfilePage.tsx
9707
9846
  var import_react_router_dom13 = require("react-router-dom");
9708
9847
  var import_lucide_react24 = require("lucide-react");
9709
- var import_jsx_runtime59 = require("react/jsx-runtime");
9848
+ var import_jsx_runtime64 = require("react/jsx-runtime");
9710
9849
  var ProfilePage = () => {
9711
9850
  const navigate = (0, import_react_router_dom13.useNavigate)();
9712
9851
  const { user, account } = useAuth();
9713
9852
  if (!user) {
9714
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h1", { children: "Please login to view your profile" }) });
9853
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("h1", { children: "Please login to view your profile" }) });
9715
9854
  }
9716
9855
  const extraInfo = [
9717
9856
  {
@@ -9730,19 +9869,19 @@ var ProfilePage = () => {
9730
9869
  copiable: false
9731
9870
  }
9732
9871
  ];
9733
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "p-4 sm:p-8 space-y-6", children: [
9734
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "max-w-5xl mx-auto", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9872
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "p-4 sm:p-8 space-y-6", children: [
9873
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "max-w-5xl mx-auto", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
9735
9874
  Button,
9736
9875
  {
9737
9876
  variant: "outline",
9738
9877
  size: "sm",
9739
9878
  onClick: () => navigate(-1),
9740
- icon: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react24.ArrowLeft, { size: 16 }),
9879
+ icon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react24.ArrowLeft, { size: 16 }),
9741
9880
  className: "rounded-full font-bold px-5",
9742
9881
  children: "Back"
9743
9882
  }
9744
9883
  ) }),
9745
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9884
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
9746
9885
  ProfileView,
9747
9886
  {
9748
9887
  name: account?.name || "User Account",
@@ -9762,7 +9901,7 @@ var import_react_router_dom14 = require("react-router-dom");
9762
9901
  var import_lucide_react25 = require("lucide-react");
9763
9902
  var import_react43 = require("react");
9764
9903
  var import_antd16 = require("antd");
9765
- var import_jsx_runtime60 = require("react/jsx-runtime");
9904
+ var import_jsx_runtime65 = require("react/jsx-runtime");
9766
9905
  function Wallets({ v, url }) {
9767
9906
  const { branchId } = (0, import_react_router_dom14.useParams)();
9768
9907
  const [deleteWallet, setDeleteWallet] = (0, import_react43.useState)(null);
@@ -9777,12 +9916,12 @@ function Wallets({ v, url }) {
9777
9916
  const items = (data2) => [
9778
9917
  {
9779
9918
  label: `Edit Wallet`,
9780
- icon: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react25.FilePenLine, { size: 16 }),
9919
+ icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react25.FilePenLine, { size: 16 }),
9781
9920
  onClick: () => navigate(`update?id=${data2?._id}`)
9782
9921
  },
9783
9922
  {
9784
9923
  label: `Delete Wallet`,
9785
- icon: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react25.Trash2, { className: "text-red-500", size: 16 }),
9924
+ icon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react25.Trash2, { className: "text-red-500", size: 16 }),
9786
9925
  onClick: () => setDeleteWallet(data2)
9787
9926
  }
9788
9927
  ].filter(Boolean);
@@ -9792,7 +9931,7 @@ function Wallets({ v, url }) {
9792
9931
  header: "Name",
9793
9932
  cell: ({ row }) => {
9794
9933
  const wallet = row.original;
9795
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: wallet?.name });
9934
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: wallet?.name });
9796
9935
  }
9797
9936
  },
9798
9937
  {
@@ -9800,7 +9939,7 @@ function Wallets({ v, url }) {
9800
9939
  header: "Type",
9801
9940
  cell: ({ row }) => {
9802
9941
  const wallet = row.original;
9803
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "capitalize", children: wallet?.type });
9942
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "capitalize", children: wallet?.type });
9804
9943
  }
9805
9944
  },
9806
9945
  {
@@ -9808,7 +9947,7 @@ function Wallets({ v, url }) {
9808
9947
  header: "Currency",
9809
9948
  cell: ({ row }) => {
9810
9949
  const wallet = row.original;
9811
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: wallet?.currency });
9950
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: wallet?.currency });
9812
9951
  }
9813
9952
  },
9814
9953
  {
@@ -9816,7 +9955,7 @@ function Wallets({ v, url }) {
9816
9955
  header: "Account No",
9817
9956
  cell: ({ row }) => {
9818
9957
  const wallet = row.original;
9819
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: wallet?.accountNo || "N/A" });
9958
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: wallet?.accountNo || "N/A" });
9820
9959
  }
9821
9960
  },
9822
9961
  {
@@ -9824,13 +9963,13 @@ function Wallets({ v, url }) {
9824
9963
  header: "Actions",
9825
9964
  cell: ({ row }) => {
9826
9965
  const data2 = row.original;
9827
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9966
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
9828
9967
  Dropdown,
9829
9968
  {
9830
9969
  className: "cursor-pointer w-[150px]",
9831
9970
  items: items(data2),
9832
9971
  triggerMode: "hover",
9833
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react25.EllipsisVertical, {})
9972
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react25.EllipsisVertical, {})
9834
9973
  }
9835
9974
  );
9836
9975
  }
@@ -9848,9 +9987,9 @@ function Wallets({ v, url }) {
9848
9987
  return error;
9849
9988
  }
9850
9989
  };
9851
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
9852
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Modal2, {}),
9853
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9990
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
9991
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Modal2, {}),
9992
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
9854
9993
  ConfirmModal,
9855
9994
  {
9856
9995
  isOpen: !!deleteWallet,
@@ -9863,7 +10002,7 @@ function Wallets({ v, url }) {
9863
10002
  children: null
9864
10003
  }
9865
10004
  ),
9866
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
10005
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
9867
10006
  TransactionViewComponent,
9868
10007
  {
9869
10008
  columns,
@@ -9897,8 +10036,9 @@ var import_zod11 = require("@hookform/resolvers/zod");
9897
10036
  var import_antd17 = require("antd");
9898
10037
  var import_react44 = require("react");
9899
10038
  var import_react_router_dom15 = require("react-router-dom");
9900
- var import_jsx_runtime61 = require("react/jsx-runtime");
10039
+ var import_jsx_runtime66 = require("react/jsx-runtime");
9901
10040
  function WalletForm() {
10041
+ const { enums } = useWarqadConfig();
9902
10042
  const { branchId } = (0, import_react_router_dom15.useParams)();
9903
10043
  const { getQuery, navigate } = useApp_default();
9904
10044
  const id = getQuery("id");
@@ -9958,24 +10098,24 @@ function WalletForm() {
9958
10098
  fetches();
9959
10099
  }
9960
10100
  }, [id]);
9961
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
10101
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
9962
10102
  Card,
9963
10103
  {
9964
10104
  className: "max-w-4xl mx-auto mt-10 relative",
9965
10105
  isLoading: isLoadingGet,
9966
10106
  loadingText: "Processing...",
9967
10107
  children: [
9968
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Card.Header, { children: [
9969
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Card.Title, { children: `${isEdit ? "Edit" : "Add"} Wallet` }),
9970
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Card.Description, { children: isEdit ? `Update the details for this wallet` : `Create a new wallet and add it to your list` })
10108
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Card.Header, { children: [
10109
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Card.Title, { children: `${isEdit ? "Edit" : "Add"} Wallet` }),
10110
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Card.Description, { children: isEdit ? `Update the details for this wallet` : `Create a new wallet and add it to your list` })
9971
10111
  ] }),
9972
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Card.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
10112
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Card.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
9973
10113
  "form",
9974
10114
  {
9975
10115
  onSubmit: handleSubmit(onSubmit, (errors) => console.log(errors)),
9976
10116
  children: [
9977
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
9978
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
10117
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
10118
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
9979
10119
  Fields_default.Input,
9980
10120
  {
9981
10121
  label: "Name",
@@ -9986,33 +10126,27 @@ function WalletForm() {
9986
10126
  required: true
9987
10127
  }
9988
10128
  ),
9989
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
10129
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
9990
10130
  Fields_default.Select,
9991
10131
  {
9992
10132
  label: "Wallet Type",
9993
10133
  form: methods,
9994
10134
  required: true,
9995
10135
  name: "type",
9996
- options: Enums_default.walletTypes.map((type) => ({
9997
- value: type,
9998
- label: type
9999
- }))
10136
+ enumName: "walletTypes"
10000
10137
  }
10001
10138
  ),
10002
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
10139
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
10003
10140
  Fields_default.Select,
10004
10141
  {
10005
10142
  label: "Currency",
10006
10143
  form: methods,
10007
10144
  name: "currency",
10008
10145
  required: true,
10009
- options: Enums_default.currencies.map((currency) => ({
10010
- value: currency,
10011
- label: currency
10012
- }))
10146
+ enumName: "currencies"
10013
10147
  }
10014
10148
  ),
10015
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
10149
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
10016
10150
  Fields_default.Input,
10017
10151
  {
10018
10152
  label: "Account Number",
@@ -10022,7 +10156,7 @@ function WalletForm() {
10022
10156
  placeholder: "Enter account number (optional)"
10023
10157
  }
10024
10158
  ),
10025
- !branchId && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
10159
+ !branchId && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
10026
10160
  Feilds_default.Branches,
10027
10161
  {
10028
10162
  label: "Branch",
@@ -10033,7 +10167,7 @@ function WalletForm() {
10033
10167
  }
10034
10168
  )
10035
10169
  ] }),
10036
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
10170
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("footer", { className: "flex justify-end mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
10037
10171
  Button,
10038
10172
  {
10039
10173
  isLoading,
@@ -10055,7 +10189,7 @@ var WalletForm_default = WalletForm;
10055
10189
 
10056
10190
  // src/components/wallets/Feilds/Wallet.tsx
10057
10191
  var import_react_router_dom16 = require("react-router-dom");
10058
- var import_jsx_runtime62 = require("react/jsx-runtime");
10192
+ var import_jsx_runtime67 = require("react/jsx-runtime");
10059
10193
  function Wallet({
10060
10194
  name,
10061
10195
  label,
@@ -10075,8 +10209,8 @@ function Wallet({
10075
10209
  showBalance,
10076
10210
  accountId: walletId
10077
10211
  });
10078
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col gap-2", children: [
10079
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
10212
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-2", children: [
10213
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
10080
10214
  Fields_default.SearchApi,
10081
10215
  {
10082
10216
  name,
@@ -10093,7 +10227,7 @@ function Wallet({
10093
10227
  disabled
10094
10228
  }
10095
10229
  ),
10096
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(BalanceView, {})
10230
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BalanceView, {})
10097
10231
  ] });
10098
10232
  }
10099
10233
  var Wallet_default = Wallet;
@@ -10103,111 +10237,6 @@ var WalletField = {
10103
10237
  Wallet: Wallet_default
10104
10238
  };
10105
10239
  var Feilds_default2 = WalletField;
10106
-
10107
- // src/components/ErrorPage/ErrorPage.tsx
10108
- var import_jsx_runtime63 = require("react/jsx-runtime");
10109
- var ErrorPageBase = ({
10110
- title,
10111
- message: message16,
10112
- statusCode,
10113
- action,
10114
- className = ""
10115
- }) => {
10116
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
10117
- "div",
10118
- {
10119
- className: `flex-1 m-auto h-full w-full min-h-[50vh] flex flex-col items-center justify-center p-6 text-zinc-900 dark:text-zinc-100 ${className}`,
10120
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative flex flex-col items-center justify-center w-full max-w-2xl text-center", children: [
10121
- statusCode && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "absolute inset-0 flex items-center justify-center z-0 select-none pointer-events-none opacity-[0.03] dark:opacity-5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-[12rem] sm:text-[16rem] md:text-[20rem] font-bold leading-none tracking-tighter", children: statusCode }) }),
10122
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative z-10 space-y-6", children: [
10123
- statusCode && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("h2", { className: "text-xl md:text-2xl font-semibold text-zinc-500 dark:text-zinc-400", children: [
10124
- "Error ",
10125
- statusCode
10126
- ] }),
10127
- title && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("h1", { className: "text-4xl md:text-5xl font-extrabold tracking-tight drop-shadow-sm", children: title }),
10128
- message16 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "text-lg md:text-xl text-zinc-600 dark:text-zinc-400 max-w-md mx-auto", children: message16 }),
10129
- action && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "pt-8", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
10130
- "button",
10131
- {
10132
- onClick: action.onClick,
10133
- className: "px-8 py-3.5 rounded-full text-white font-semibold shadow-[0_4px_14px_0_rgba(0,0,0,0.1)] hover:shadow-[0_6px_20px_rgba(0,0,0,0.15)] transition-all hover:-translate-y-0.5 active:translate-y-0 focus:outline-none focus:ring-2 focus:ring-offset-2",
10134
- style: { backgroundColor: "var(--primary-color, #3b82f6)" },
10135
- children: action.label
10136
- }
10137
- ) })
10138
- ] })
10139
- ] })
10140
- }
10141
- );
10142
- };
10143
-
10144
- // src/components/ErrorPage/ErrorPage.500.tsx
10145
- var import_jsx_runtime64 = require("react/jsx-runtime");
10146
- var ErrorPage500 = (props) => {
10147
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
10148
- ErrorPageBase,
10149
- {
10150
- statusCode: 500,
10151
- title: "Internal Server Error",
10152
- message: "Oops, something went wrong on our end. Please try again later.",
10153
- action: { label: "Go Home", onClick: () => window.location.href = "/" },
10154
- ...props
10155
- }
10156
- );
10157
- };
10158
-
10159
- // src/components/ErrorPage/ErrorPage.404.tsx
10160
- var import_jsx_runtime65 = require("react/jsx-runtime");
10161
- var ErrorPage404 = (props) => {
10162
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
10163
- ErrorPageBase,
10164
- {
10165
- statusCode: 404,
10166
- title: "Page Not Found",
10167
- message: "The page you are looking for doesn't exist or has been moved.",
10168
- action: { label: "Go Home", onClick: () => window.location.href = "/" },
10169
- ...props
10170
- }
10171
- );
10172
- };
10173
-
10174
- // src/components/ErrorPage/ErrorPage.401.tsx
10175
- var import_jsx_runtime66 = require("react/jsx-runtime");
10176
- var ErrorPage401 = (props) => {
10177
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
10178
- ErrorPageBase,
10179
- {
10180
- statusCode: 401,
10181
- title: "Unauthorized",
10182
- message: "You don't have permission to access this page.",
10183
- action: { label: "Go Home", onClick: () => window.location.href = "/" },
10184
- ...props
10185
- }
10186
- );
10187
- };
10188
-
10189
- // src/components/ErrorPage/ErrorPage.400.tsx
10190
- var import_jsx_runtime67 = require("react/jsx-runtime");
10191
- var ErrorPage400 = (props) => {
10192
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
10193
- ErrorPageBase,
10194
- {
10195
- statusCode: 400,
10196
- title: "Bad Request",
10197
- message: "Your request could not be processed. Please try again.",
10198
- action: { label: "Go Home", onClick: () => window.location.href = "/" },
10199
- ...props
10200
- }
10201
- );
10202
- };
10203
-
10204
- // src/components/ErrorPage/index.ts
10205
- var ErrorPage = Object.assign(ErrorPageBase, {
10206
- 500: ErrorPage500,
10207
- 404: ErrorPage404,
10208
- 401: ErrorPage401,
10209
- 400: ErrorPage400
10210
- });
10211
10240
  // Annotate the CommonJS export names for ESM import in node:
10212
10241
  0 && (module.exports = {
10213
10242
  AccountFields,