@burdenoff/microfe-theglobalfuel 2026.705.5 → 2026.709.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/README.md +3 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/generated/global-operations.d.ts +2 -0
  5. package/dist/generated/global-operations.d.ts.map +1 -0
  6. package/dist/generated/global-types.d.ts +18199 -0
  7. package/dist/generated/global-types.d.ts.map +1 -0
  8. package/dist/generated/wspace-operations.d.ts +2 -0
  9. package/dist/generated/wspace-operations.d.ts.map +1 -0
  10. package/dist/generated/wspace-types.d.ts +43046 -0
  11. package/dist/generated/wspace-types.d.ts.map +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +3 -1
  15. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
  16. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
  17. package/dist/theglobalfuel/TheGlobalFuelRoot.js +106 -104
  18. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
  19. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
  20. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
  21. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +60 -38
  22. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
  23. package/dist/theglobalfuel/components/DataTable.d.ts +30 -0
  24. package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
  25. package/dist/theglobalfuel/components/DataTable.js.map +1 -1
  26. package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
  27. package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
  28. package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
  29. package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
  30. package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
  31. package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
  32. package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
  33. package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
  34. package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
  35. package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
  36. package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
  37. package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
  38. package/dist/theglobalfuel/components/PageLayout.d.ts +18 -0
  39. package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
  40. package/dist/theglobalfuel/components/PageLayout.js +2 -1
  41. package/dist/theglobalfuel/components/PageLayout.js.map +1 -1
  42. package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
  43. package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
  44. package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
  45. package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
  46. package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
  47. package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
  48. package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
  49. package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
  50. package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
  51. package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
  52. package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
  53. package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
  54. package/dist/theglobalfuel/components/WorldMap.d.ts +18 -0
  55. package/dist/theglobalfuel/components/WorldMap.d.ts.map +1 -0
  56. package/dist/theglobalfuel/components/WorldMap.js.map +1 -1
  57. package/dist/theglobalfuel/components/index.d.ts +21 -0
  58. package/dist/theglobalfuel/components/index.d.ts.map +1 -0
  59. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts +21 -0
  60. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts.map +1 -0
  61. package/dist/theglobalfuel/components/viz/AreaChart.d.ts +18 -0
  62. package/dist/theglobalfuel/components/viz/AreaChart.d.ts.map +1 -0
  63. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts +13 -0
  64. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts.map +1 -0
  65. package/dist/theglobalfuel/components/viz/BarChart.d.ts +17 -0
  66. package/dist/theglobalfuel/components/viz/BarChart.d.ts.map +1 -0
  67. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts +14 -0
  68. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts.map +1 -0
  69. package/dist/theglobalfuel/components/viz/DonutChart.d.ts +20 -0
  70. package/dist/theglobalfuel/components/viz/DonutChart.d.ts.map +1 -0
  71. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts +17 -0
  72. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts.map +1 -0
  73. package/dist/theglobalfuel/components/viz/Heatmap.d.ts +26 -0
  74. package/dist/theglobalfuel/components/viz/Heatmap.d.ts.map +1 -0
  75. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts +17 -0
  76. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts.map +1 -0
  77. package/dist/theglobalfuel/components/viz/LineChart.d.ts +20 -0
  78. package/dist/theglobalfuel/components/viz/LineChart.d.ts.map +1 -0
  79. package/dist/theglobalfuel/components/viz/OrgTree.d.ts +14 -0
  80. package/dist/theglobalfuel/components/viz/OrgTree.d.ts.map +1 -0
  81. package/dist/theglobalfuel/components/viz/PathSteps.d.ts +17 -0
  82. package/dist/theglobalfuel/components/viz/PathSteps.d.ts.map +1 -0
  83. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts +20 -0
  84. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts.map +1 -0
  85. package/dist/theglobalfuel/components/viz/RatingStars.d.ts +14 -0
  86. package/dist/theglobalfuel/components/viz/RatingStars.d.ts.map +1 -0
  87. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts +26 -0
  88. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts.map +1 -0
  89. package/dist/theglobalfuel/components/viz/SkillBar.d.ts +17 -0
  90. package/dist/theglobalfuel/components/viz/SkillBar.d.ts.map +1 -0
  91. package/dist/theglobalfuel/components/viz/Sparkline.d.ts +16 -0
  92. package/dist/theglobalfuel/components/viz/Sparkline.d.ts.map +1 -0
  93. package/dist/theglobalfuel/components/viz/StatCard.d.ts +22 -0
  94. package/dist/theglobalfuel/components/viz/StatCard.d.ts.map +1 -0
  95. package/dist/theglobalfuel/components/viz/StepProgress.d.ts +17 -0
  96. package/dist/theglobalfuel/components/viz/StepProgress.d.ts.map +1 -0
  97. package/dist/theglobalfuel/components/viz/Timeline.d.ts +21 -0
  98. package/dist/theglobalfuel/components/viz/Timeline.d.ts.map +1 -0
  99. package/dist/theglobalfuel/components/viz/index.d.ts +35 -0
  100. package/dist/theglobalfuel/components/viz/index.d.ts.map +1 -0
  101. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts +15 -0
  102. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts.map +1 -0
  103. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts +44 -0
  104. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts.map +1 -0
  105. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts +27 -0
  106. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts.map +1 -0
  107. package/dist/theglobalfuel/components/viz/lib/format.d.ts +10 -0
  108. package/dist/theglobalfuel/components/viz/lib/format.d.ts.map +1 -0
  109. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts +41 -0
  110. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts.map +1 -0
  111. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts +18 -0
  112. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts.map +1 -0
  113. package/dist/theglobalfuel/components/viz/lib/palette.d.ts +31 -0
  114. package/dist/theglobalfuel/components/viz/lib/palette.d.ts.map +1 -0
  115. package/dist/theglobalfuel/components/viz/lib/types.d.ts +27 -0
  116. package/dist/theglobalfuel/components/viz/lib/types.d.ts.map +1 -0
  117. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
  118. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
  119. package/dist/theglobalfuel/context/index.d.ts +6 -0
  120. package/dist/theglobalfuel/context/index.d.ts.map +1 -0
  121. package/dist/theglobalfuel/hooks/index.d.ts +15 -0
  122. package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
  123. package/dist/theglobalfuel/hooks/index.js +4 -0
  124. package/dist/theglobalfuel/hooks/useCursorPager.d.ts +26 -0
  125. package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
  126. package/dist/theglobalfuel/hooks/useNotify.d.ts +23 -0
  127. package/dist/theglobalfuel/hooks/useNotify.d.ts.map +1 -0
  128. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts +38 -0
  129. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts.map +1 -0
  130. package/dist/theglobalfuel/hooks/useTheAnalytics.js +46 -0
  131. package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -0
  132. package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
  133. package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
  134. package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
  135. package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
  136. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +79 -0
  137. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
  138. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +2 -9
  139. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
  140. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts +20 -0
  141. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts.map +1 -0
  142. package/dist/theglobalfuel/hooks/useTheNativeControls.js +22 -0
  143. package/dist/theglobalfuel/hooks/useTheNativeControls.js.map +1 -0
  144. package/dist/theglobalfuel/hooks/useThePageView.d.ts +10 -0
  145. package/dist/theglobalfuel/hooks/useThePageView.d.ts.map +1 -0
  146. package/dist/theglobalfuel/hooks/useThePageView.js +13 -0
  147. package/dist/theglobalfuel/hooks/useThePageView.js.map +1 -0
  148. package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
  149. package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
  150. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts +4 -0
  151. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts.map +1 -0
  152. package/dist/theglobalfuel/hooks/useTheTranslation.js +12 -0
  153. package/dist/theglobalfuel/hooks/useTheTranslation.js.map +1 -0
  154. package/dist/theglobalfuel/index.d.ts +11 -0
  155. package/dist/theglobalfuel/index.d.ts.map +1 -0
  156. package/dist/theglobalfuel/index.js +2 -0
  157. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
  158. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
  159. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +395 -353
  160. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
  161. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
  162. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
  163. package/dist/theglobalfuel/pages/assets/AssetsPage.js +152 -146
  164. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
  165. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
  166. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
  167. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +233 -229
  168. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
  169. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
  170. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
  171. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +410 -389
  172. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -1
  173. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
  174. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
  175. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +237 -231
  176. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
  177. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +17 -0
  178. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
  179. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +255 -250
  180. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
  181. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +13 -0
  182. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
  183. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +154 -150
  184. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
  185. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
  186. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
  187. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +151 -147
  188. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
  189. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
  190. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
  191. package/dist/theglobalfuel/pages/production/ProductionPage.js +175 -171
  192. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
  193. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts +23 -0
  194. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts.map +1 -0
  195. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +153 -146
  196. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
  197. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
  198. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
  199. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +168 -164
  200. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
  201. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +11 -0
  202. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
  203. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +179 -175
  204. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
  205. package/dist/theglobalfuel/services/assistantApi.d.ts +25 -0
  206. package/dist/theglobalfuel/services/assistantApi.d.ts.map +1 -0
  207. package/dist/theglobalfuel/services/assistantApi.js +225 -0
  208. package/dist/theglobalfuel/services/assistantApi.js.map +1 -0
  209. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts +38 -0
  210. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts.map +1 -0
  211. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js +120 -0
  212. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js.map +1 -0
  213. package/dist/theglobalfuel/services/index.d.ts +7 -0
  214. package/dist/theglobalfuel/services/index.d.ts.map +1 -0
  215. package/dist/theglobalfuel/types/assistant.d.ts +65 -0
  216. package/dist/theglobalfuel/types/assistant.d.ts.map +1 -0
  217. package/dist/theglobalfuel/types/index.d.ts +376 -0
  218. package/dist/theglobalfuel/types/index.d.ts.map +1 -0
  219. package/dist/theglobalfuel/utils/cn.d.ts +4 -0
  220. package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
  221. package/dist/theglobalfuel/utils/formatters.d.ts +44 -0
  222. package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
  223. package/dist/theglobalfuel/utils/i18n.d.ts +5 -0
  224. package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
  225. package/dist/theglobalfuel/utils/i18n.js +15 -0
  226. package/dist/theglobalfuel/utils/i18n.js.map +1 -0
  227. package/dist/theglobalfuel/utils/index.d.ts +10 -0
  228. package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
  229. package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
  230. package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
  231. package/dist/theglobalfuel/utils/pageContext.d.ts +26 -0
  232. package/dist/theglobalfuel/utils/pageContext.d.ts.map +1 -0
  233. package/dist/theglobalfuel/utils/pageContext.js +65 -0
  234. package/dist/theglobalfuel/utils/pageContext.js.map +1 -0
  235. package/dist/theglobalfuel/utils/transitions.d.ts +17 -0
  236. package/dist/theglobalfuel/utils/transitions.d.ts.map +1 -0
  237. package/package.json +5 -1
  238. package/dist/node_modules/clsx/dist/clsx.js +0 -18
  239. package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
  240. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1716
  241. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
@@ -1,30 +1,32 @@
1
1
  import { useTheGlobalFuel as e } from "../../context/TheGlobalFuelContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { MetricsCard as n } from "../../components/MetricsCard.js";
4
- import { formatDate as r, formatEnumLabel as i, isExpired as ee, toBackendDate as te } from "../../utils/formatters.js";
5
- import { StatusBadge as a } from "../../components/StatusBadge.js";
6
- import { DataTable as ne } from "../../components/DataTable.js";
7
- import { ErrorView as re, LoadingView as ie } from "../../components/StateViews.js";
8
- import { EmptyState as ae } from "../../components/EmptyState.js";
4
+ import { formatDate as r, formatEnumLabel as i, isExpired as a, toBackendDate as o } from "../../utils/formatters.js";
5
+ import { StatusBadge as s } from "../../components/StatusBadge.js";
6
+ import { DataTable as ee } from "../../components/DataTable.js";
7
+ import { ErrorView as te, LoadingView as ne } from "../../components/StateViews.js";
8
+ import { EmptyState as re } from "../../components/EmptyState.js";
9
9
  import "../../context/index.js";
10
- import { useTheAssets as oe, useTheComplianceCerts as o, useTheCreateComplianceCert as se, useTheTransitionComplianceCert as ce } from "../../hooks/useTheGlobalFuelApi.js";
11
- import { useCursorPager as le } from "../../hooks/useCursorPager.js";
12
- import { useNotify as ue } from "../../hooks/useNotify.js";
10
+ import { useTheAssets as ie, useTheComplianceCerts as c, useTheCreateComplianceCert as ae, useTheTransitionComplianceCert as oe } from "../../hooks/useTheGlobalFuelApi.js";
11
+ import { useCursorPager as se } from "../../hooks/useCursorPager.js";
12
+ import { useNotify as ce } from "../../hooks/useNotify.js";
13
+ import { useThePageView as le } from "../../hooks/useThePageView.js";
14
+ import { useTheTranslation as ue } from "../../hooks/useTheTranslation.js";
13
15
  import "../../hooks/index.js";
14
16
  import { COMPLIANCE_TRANSITIONS as de, nextStatuses as fe } from "../../utils/transitions.js";
15
17
  import { FilterTabs as pe } from "../../components/FilterTabs.js";
16
18
  import { Pagination as me } from "../../components/Pagination.js";
17
19
  import { EvidenceUpload as he } from "../../components/EvidenceUpload.js";
18
- import { FileLink as s } from "../../components/FileLink.js";
20
+ import { FileLink as l } from "../../components/FileLink.js";
19
21
  import { TheDiscussion as ge } from "../../components/TheDiscussion.js";
20
22
  import { TheTags as _e } from "../../components/TheTags.js";
21
23
  import "../../components/index.js";
22
- import { useMemo as c, useState as l } from "react";
23
- import { AlertTriangle as ve, BadgeCheck as ye, Clock as u, Info as be, Plus as d, ScrollText as xe } from "lucide-react";
24
- import { Fragment as Se, jsx as f, jsxs as p } from "react/jsx-runtime";
25
- import { Button as m, Input as h, Label as g, ResponsiveDialog as _, ResponsiveDialogContent as v, ResponsiveDialogDescription as y, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as Ce } from "@burdenoff/fe-libs/ui";
24
+ import { useMemo as u, useState as d } from "react";
25
+ import { AlertTriangle as f, BadgeCheck as ve, Clock as ye, Info as be, Plus as xe, ScrollText as p } from "lucide-react";
26
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
27
+ import { Button as _, Input as v, Label as y, ResponsiveDialog as b, ResponsiveDialogContent as x, ResponsiveDialogDescription as S, ResponsiveDialogFooter as Se, ResponsiveDialogHeader as Ce, ResponsiveDialogTitle as we, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as Te } from "@burdenoff/fe-libs/ui";
26
28
  //#region src/theglobalfuel/pages/compliance/CompliancePage.tsx
27
- var we = [
29
+ var Ee = [
28
30
  {
29
31
  value: "ALL",
30
32
  label: "All"
@@ -80,150 +82,152 @@ var M = {
80
82
  notes: ""
81
83
  };
82
84
  function N() {
83
- let { currentUser: k } = e(), N = ue(), [P, Te] = l("ALL"), [F, Ee] = l("ALL"), [I, De] = l("ALL"), L = le(), [Oe, R] = l(!1), [z, B] = l(M), [V, H] = l(null), [U, W] = l(null), [ke, G] = l(null), [K, q] = l(null), [Ae, J] = l(!1), Y = oe({ pagination: { limit: 100 } }).data?.items ?? [], je = o(void 0, void 0, void 0, { limit: 200 }), { data: X, isLoading: Me, isError: Ne, refetch: Pe } = o(I === "ALL" ? void 0 : I, F === "ALL" ? void 0 : F, P === "ALL" ? void 0 : P, {
85
+ le("compliance");
86
+ let k = ue(), { currentUser: N } = e(), P = ce(), [F, De] = d("ALL"), [I, Oe] = d("ALL"), [L, ke] = d("ALL"), R = se(), [Ae, z] = d(!1), [B, V] = d(M), [H, U] = d(null), [W, G] = d(null), [je, Me] = d(null), [K, Ne] = d(null), [Pe, q] = d(!1), J = ie({ pagination: { limit: 100 } }).data?.items ?? [], Y = c(void 0, void 0, void 0, { limit: 200 }), { data: X, isLoading: Fe, isError: Ie, refetch: Le } = c(L === "ALL" ? void 0 : L, I === "ALL" ? void 0 : I, F === "ALL" ? void 0 : F, {
84
87
  limit: A,
85
- offset: L.page * A
86
- }), Z = se(), Fe = ce(), Q = c(() => X?.items ?? [], [X]), Ie = P !== "ALL" || F !== "ALL" || I !== "ALL", $ = c(() => je.data?.items ?? [], [je.data]), Le = $.length, Re = $.filter((e) => e.status === "APPROVED").length, ze = $.filter((e) => e.status === "PENDING").length, Be = $.filter((e) => e.status === "EXPIRED" || ee(e.expiresAt) || j(e.expiresAt)).length, Ve = c(() => {
88
+ offset: R.page * A
89
+ }), Z = ae(), Re = oe(), Q = u(() => X?.items ?? [], [X]), ze = F !== "ALL" || I !== "ALL" || L !== "ALL", $ = u(() => Y.data?.items ?? [], [Y.data]), Be = $.length, Ve = $.filter((e) => e.status === "APPROVED").length, He = $.filter((e) => e.status === "PENDING").length, Ue = $.filter((e) => e.status === "EXPIRED" || a(e.expiresAt) || j(e.expiresAt)).length, We = u(() => {
87
90
  let e = {};
88
91
  for (let t of $) e[t.status] = (e[t.status] ?? 0) + 1;
89
92
  return e;
90
- }, [$]), He = we.map((e) => ({
93
+ }, [$]), Ge = Ee.map((e) => ({
91
94
  ...e,
92
- count: e.value === "ALL" ? Le : Ve[e.value] ?? 0
93
- })), Ue = () => {
94
- B(M), H(null), W(null);
95
- }, We = async () => {
96
- if (!z.title.trim()) {
97
- W("A certification title is required.");
95
+ count: e.value === "ALL" ? Be : We[e.value] ?? 0
96
+ })), Ke = () => {
97
+ V(M), U(null), G(null);
98
+ }, qe = async () => {
99
+ if (!B.title.trim()) {
100
+ G("A certification title is required.");
98
101
  return;
99
102
  }
100
- W(null);
103
+ G(null);
101
104
  try {
102
105
  await Z.mutateAsync({
103
- title: z.title.trim(),
104
- category: z.category,
105
- assetId: z.assetId || null,
106
- authority: z.authority.trim() || null,
107
- certNumber: z.certNumber.trim() || null,
108
- ownerId: k?.id || null,
109
- issuedAt: te(z.issuedAt) ?? null,
110
- expiresAt: te(z.expiresAt) ?? null,
111
- evidenceFileId: V?.fileId ?? null,
112
- notes: z.notes.trim() || null
113
- }), N.success("Certification created"), R(!1), Ue();
106
+ title: B.title.trim(),
107
+ category: B.category,
108
+ assetId: B.assetId || null,
109
+ authority: B.authority.trim() || null,
110
+ certNumber: B.certNumber.trim() || null,
111
+ ownerId: N?.id || null,
112
+ issuedAt: o(B.issuedAt) ?? null,
113
+ expiresAt: o(B.expiresAt) ?? null,
114
+ evidenceFileId: H?.fileId ?? null,
115
+ notes: B.notes.trim() || null
116
+ }), P.success("Certification created"), z(!1), Ke();
114
117
  } catch (e) {
115
- N.fromError(e), W(e instanceof Error ? e.message : "Failed to create certification.");
118
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to create certification.");
116
119
  }
117
120
  };
118
- return /* @__PURE__ */ p(t, {
119
- title: "Compliance",
120
- description: "Licenses, permits & certifications — issuance, expiry & audit evidence across the resource portfolio.",
121
- actions: /* @__PURE__ */ p(m, {
122
- onClick: () => R(!0),
123
- children: [/* @__PURE__ */ f(d, { className: "mr-1.5 h-4 w-4" }), " New certification"]
121
+ return /* @__PURE__ */ g(t, {
122
+ title: k("theglobalfuel.pages.compliance.title", "Compliance"),
123
+ description: k("theglobalfuel.pages.compliance.description", "Licenses, permits & certifications — issuance, expiry & audit evidence across the resource portfolio."),
124
+ dataTour: "theglobalfuel-compliance-page",
125
+ actions: /* @__PURE__ */ g(_, {
126
+ onClick: () => z(!0),
127
+ children: [/* @__PURE__ */ h(xe, { className: "mr-1.5 h-4 w-4" }), " New certification"]
124
128
  }),
125
129
  children: [
126
- /* @__PURE__ */ p("div", {
130
+ /* @__PURE__ */ g("div", {
127
131
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
128
132
  children: [
129
- /* @__PURE__ */ f(n, {
130
- icon: /* @__PURE__ */ f(xe, { className: "h-5 w-5" }),
131
- value: Le,
133
+ /* @__PURE__ */ h(n, {
134
+ icon: /* @__PURE__ */ h(p, { className: "h-5 w-5" }),
135
+ value: Be,
132
136
  label: "Total certifications",
133
137
  featured: !0
134
138
  }),
135
- /* @__PURE__ */ f(n, {
136
- icon: /* @__PURE__ */ f(ye, { className: "h-5 w-5" }),
137
- value: Re,
139
+ /* @__PURE__ */ h(n, {
140
+ icon: /* @__PURE__ */ h(ve, { className: "h-5 w-5" }),
141
+ value: Ve,
138
142
  label: "Approved",
139
143
  accent: "success"
140
144
  }),
141
- /* @__PURE__ */ f(n, {
142
- icon: /* @__PURE__ */ f(u, { className: "h-5 w-5" }),
143
- value: ze,
145
+ /* @__PURE__ */ h(n, {
146
+ icon: /* @__PURE__ */ h(ye, { className: "h-5 w-5" }),
147
+ value: He,
144
148
  label: "Pending"
145
149
  }),
146
- /* @__PURE__ */ f(n, {
147
- icon: /* @__PURE__ */ f(ve, { className: "h-5 w-5" }),
148
- value: Be,
150
+ /* @__PURE__ */ h(n, {
151
+ icon: /* @__PURE__ */ h(f, { className: "h-5 w-5" }),
152
+ value: Ue,
149
153
  label: "Expired / expiring",
150
154
  accent: "warning",
151
- pill: Be > 0 ? /* @__PURE__ */ f("span", {
155
+ pill: Ue > 0 ? /* @__PURE__ */ h("span", {
152
156
  className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
153
157
  children: "Action needed"
154
158
  }) : void 0
155
159
  })
156
160
  ]
157
161
  }),
158
- /* @__PURE__ */ p("div", {
162
+ /* @__PURE__ */ g("div", {
159
163
  className: "mb-5 mt-6 flex flex-wrap items-center gap-3",
160
164
  children: [
161
- /* @__PURE__ */ f(pe, {
162
- options: He,
163
- value: P,
165
+ /* @__PURE__ */ h(pe, {
166
+ options: Ge,
167
+ value: F,
164
168
  onChange: (e) => {
165
- Te(e), L.reset();
169
+ De(e), R.reset();
166
170
  }
167
171
  }),
168
- /* @__PURE__ */ p(C, {
169
- value: F,
172
+ /* @__PURE__ */ g(C, {
173
+ value: I,
170
174
  onValueChange: (e) => {
171
- Ee(e), L.reset();
175
+ Oe(e), R.reset();
172
176
  },
173
- children: [/* @__PURE__ */ f(E, {
177
+ children: [/* @__PURE__ */ h(E, {
174
178
  className: "w-52",
175
179
  "aria-label": "Filter by category",
176
- children: /* @__PURE__ */ f(D, { placeholder: "All categories" })
177
- }), /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ f(T, {
180
+ children: /* @__PURE__ */ h(D, { placeholder: "All categories" })
181
+ }), /* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(T, {
178
182
  value: "ALL",
179
183
  children: "All categories"
180
- }), O.map((e) => /* @__PURE__ */ f(T, {
184
+ }), O.map((e) => /* @__PURE__ */ h(T, {
181
185
  value: e,
182
186
  children: i(e)
183
187
  }, e))] })]
184
188
  }),
185
- /* @__PURE__ */ p(C, {
186
- value: I,
189
+ /* @__PURE__ */ g(C, {
190
+ value: L,
187
191
  onValueChange: (e) => {
188
- De(e), L.reset();
192
+ ke(e), R.reset();
189
193
  },
190
- children: [/* @__PURE__ */ f(E, {
194
+ children: [/* @__PURE__ */ h(E, {
191
195
  className: "w-52",
192
196
  "aria-label": "Filter by asset",
193
- children: /* @__PURE__ */ f(D, { placeholder: "All assets" })
194
- }), /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ f(T, {
197
+ children: /* @__PURE__ */ h(D, { placeholder: "All assets" })
198
+ }), /* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(T, {
195
199
  value: "ALL",
196
200
  children: "All assets"
197
- }), Y.map((e) => /* @__PURE__ */ f(T, {
201
+ }), J.map((e) => /* @__PURE__ */ h(T, {
198
202
  value: e.id,
199
203
  children: e.name
200
204
  }, e.id))] })]
201
205
  })
202
206
  ]
203
207
  }),
204
- Me ? /* @__PURE__ */ f(ie, { label: "Loading certifications…" }) : Ne ? /* @__PURE__ */ f(re, {
208
+ Fe ? /* @__PURE__ */ h(ne, { label: "Loading certifications…" }) : Ie ? /* @__PURE__ */ h(te, {
205
209
  message: "Couldn't load certifications.",
206
- onRetry: () => Pe()
207
- }) : Q.length === 0 ? /* @__PURE__ */ f(ae, {
210
+ onRetry: () => Le()
211
+ }) : Q.length === 0 ? /* @__PURE__ */ h(re, {
208
212
  illustration: "empty-data",
209
- icon: /* @__PURE__ */ f(xe, { className: "h-10 w-10" }),
213
+ icon: /* @__PURE__ */ h(p, { className: "h-10 w-10" }),
210
214
  title: "No certifications yet",
211
- description: Ie ? "No certifications match these filters." : "Register your first license, permit or certification to track issuance, expiry and audit evidence.",
212
- action: Ie ? void 0 : /* @__PURE__ */ p(m, {
213
- onClick: () => R(!0),
214
- children: [/* @__PURE__ */ f(d, { className: "mr-1.5 h-4 w-4" }), " New certification"]
215
+ description: ze ? "No certifications match these filters." : "Register your first license, permit or certification to track issuance, expiry and audit evidence.",
216
+ action: ze ? void 0 : /* @__PURE__ */ g(_, {
217
+ onClick: () => z(!0),
218
+ children: [/* @__PURE__ */ h(xe, { className: "mr-1.5 h-4 w-4" }), " New certification"]
215
219
  })
216
- }) : /* @__PURE__ */ p(Se, { children: [/* @__PURE__ */ f(ne, {
220
+ }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(ee, {
217
221
  columns: [
218
222
  {
219
223
  key: "title",
220
224
  header: "Certification",
221
- render: (e) => /* @__PURE__ */ p("div", {
225
+ render: (e) => /* @__PURE__ */ g("div", {
222
226
  className: "min-w-0",
223
- children: [/* @__PURE__ */ f("p", {
227
+ children: [/* @__PURE__ */ h("p", {
224
228
  className: "truncate font-semibold text-text-primary",
225
229
  children: e.title
226
- }), /* @__PURE__ */ f("p", {
230
+ }), /* @__PURE__ */ h("p", {
227
231
  className: "truncate text-xs text-text-tertiary",
228
232
  children: i(e.category)
229
233
  })]
@@ -233,7 +237,7 @@ function N() {
233
237
  key: "category",
234
238
  header: "Category",
235
239
  hideOnMobile: !0,
236
- render: (e) => /* @__PURE__ */ f("span", {
240
+ render: (e) => /* @__PURE__ */ h("span", {
237
241
  className: "text-text-secondary",
238
242
  children: i(e.category)
239
243
  })
@@ -241,16 +245,16 @@ function N() {
241
245
  {
242
246
  key: "status",
243
247
  header: "Status",
244
- render: (e) => /* @__PURE__ */ f(a, { status: e.status })
248
+ render: (e) => /* @__PURE__ */ h(s, { status: e.status })
245
249
  },
246
250
  {
247
251
  key: "authority",
248
252
  header: "Authority",
249
253
  hideOnMobile: !0,
250
- render: (e) => e.authority ? /* @__PURE__ */ f("span", {
254
+ render: (e) => e.authority ? /* @__PURE__ */ h("span", {
251
255
  className: "text-text-secondary",
252
256
  children: e.authority
253
- }) : /* @__PURE__ */ f("span", {
257
+ }) : /* @__PURE__ */ h("span", {
254
258
  className: "text-text-tertiary",
255
259
  children: "—"
256
260
  })
@@ -259,10 +263,10 @@ function N() {
259
263
  key: "certNumber",
260
264
  header: "Cert. no.",
261
265
  hideOnMobile: !0,
262
- render: (e) => e.certNumber ? /* @__PURE__ */ f("span", {
266
+ render: (e) => e.certNumber ? /* @__PURE__ */ h("span", {
263
267
  className: "tabular-nums text-text-secondary",
264
268
  children: e.certNumber
265
- }) : /* @__PURE__ */ f("span", {
269
+ }) : /* @__PURE__ */ h("span", {
266
270
  className: "text-text-tertiary",
267
271
  children: "—"
268
272
  })
@@ -272,7 +276,7 @@ function N() {
272
276
  header: "Issued",
273
277
  align: "right",
274
278
  hideOnMobile: !0,
275
- render: (e) => /* @__PURE__ */ f("span", {
279
+ render: (e) => /* @__PURE__ */ h("span", {
276
280
  className: "text-text-tertiary",
277
281
  children: r(e.issuedAt)
278
282
  })
@@ -282,25 +286,25 @@ function N() {
282
286
  header: "Expires",
283
287
  align: "right",
284
288
  render: (e) => {
285
- if (!e.expiresAt) return /* @__PURE__ */ f("span", {
289
+ if (!e.expiresAt) return /* @__PURE__ */ h("span", {
286
290
  className: "text-text-tertiary",
287
291
  children: "—"
288
292
  });
289
- let t = ee(e.expiresAt), n = !t && j(e.expiresAt);
290
- return /* @__PURE__ */ p("div", {
293
+ let t = a(e.expiresAt), n = !t && j(e.expiresAt);
294
+ return /* @__PURE__ */ g("div", {
291
295
  className: "flex items-center justify-end gap-2",
292
- children: [/* @__PURE__ */ f("span", {
296
+ children: [/* @__PURE__ */ h("span", {
293
297
  className: "tabular-nums text-text-secondary",
294
298
  children: r(e.expiresAt)
295
- }), t ? /* @__PURE__ */ p("span", {
299
+ }), t ? /* @__PURE__ */ g("span", {
296
300
  className: "inline-flex items-center gap-1 rounded-full bg-status-error-bg-subtle px-2 py-0.5 text-xs font-medium text-status-error-text",
297
- children: [/* @__PURE__ */ f(ve, {
301
+ children: [/* @__PURE__ */ h(f, {
298
302
  className: "h-3 w-3",
299
303
  "aria-hidden": "true"
300
304
  }), " Expired"]
301
- }) : n ? /* @__PURE__ */ p("span", {
305
+ }) : n ? /* @__PURE__ */ g("span", {
302
306
  className: "inline-flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
303
- children: [/* @__PURE__ */ f(u, {
307
+ children: [/* @__PURE__ */ h(ye, {
304
308
  className: "h-3 w-3",
305
309
  "aria-hidden": "true"
306
310
  }), " Expiring soon"]
@@ -312,7 +316,7 @@ function N() {
312
316
  key: "evidence",
313
317
  header: "Evidence",
314
318
  hideOnMobile: !0,
315
- render: (e) => e.evidence?.id ? /* @__PURE__ */ f(s, { fileId: e.evidence.id }) : /* @__PURE__ */ f("span", {
319
+ render: (e) => e.evidence?.id ? /* @__PURE__ */ h(l, { fileId: e.evidence.id }) : /* @__PURE__ */ h("span", {
316
320
  className: "text-text-tertiary",
317
321
  children: "—"
318
322
  })
@@ -321,14 +325,14 @@ function N() {
321
325
  key: "details",
322
326
  header: "",
323
327
  align: "right",
324
- render: (e) => /* @__PURE__ */ p(m, {
328
+ render: (e) => /* @__PURE__ */ g(_, {
325
329
  size: "sm",
326
330
  variant: "ghost",
327
331
  onClick: () => {
328
- q(e), J(!0);
332
+ Ne(e), q(!0);
329
333
  },
330
334
  "aria-label": `View details for ${e.title}`,
331
- children: [/* @__PURE__ */ f(be, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
335
+ children: [/* @__PURE__ */ h(be, { className: "h-4 w-4" }), /* @__PURE__ */ h("span", {
332
336
  className: "ml-1.5 hidden sm:inline",
333
337
  children: "Details"
334
338
  })]
@@ -340,24 +344,24 @@ function N() {
340
344
  align: "right",
341
345
  render: (e) => {
342
346
  let t = fe(de, e.status), n = t.length === 0;
343
- return /* @__PURE__ */ p(C, {
347
+ return /* @__PURE__ */ g(C, {
344
348
  value: e.status,
345
- disabled: n || ke === e.id,
349
+ disabled: n || je === e.id,
346
350
  onValueChange: (t) => {
347
- t !== e.status && (G(e.id), Fe.mutate({
351
+ t !== e.status && (Me(e.id), Re.mutate({
348
352
  id: e.id,
349
353
  status: t
350
354
  }, {
351
- onSuccess: () => N.success(`Status updated to ${i(t)}`),
352
- onError: (e) => N.fromError(e),
353
- onSettled: () => G(null)
355
+ onSuccess: () => P.success(`Status updated to ${i(t)}`),
356
+ onError: (e) => P.fromError(e),
357
+ onSettled: () => Me(null)
354
358
  }));
355
359
  },
356
- children: [/* @__PURE__ */ f(E, {
360
+ children: [/* @__PURE__ */ h(E, {
357
361
  className: "h-8 w-36",
358
362
  "aria-label": n ? `Status for ${e.title}` : `Change status for ${e.title}`,
359
- children: /* @__PURE__ */ f(D, { placeholder: i(e.status) })
360
- }), /* @__PURE__ */ f(w, { children: t.map((e) => /* @__PURE__ */ f(T, {
363
+ children: /* @__PURE__ */ h(D, { placeholder: i(e.status) })
364
+ }), /* @__PURE__ */ h(w, { children: t.map((e) => /* @__PURE__ */ h(T, {
361
365
  value: e,
362
366
  children: i(e)
363
367
  }, e)) })]
@@ -367,288 +371,288 @@ function N() {
367
371
  ],
368
372
  rows: Q,
369
373
  rowKey: (e) => e.id
370
- }), /* @__PURE__ */ f(me, {
371
- page: L.page,
374
+ }), /* @__PURE__ */ h(me, {
375
+ page: R.page,
372
376
  pageSize: A,
373
377
  itemCount: Q.length,
374
378
  hasMore: X?.pageInfo?.hasMore ?? !1,
375
- onPageChange: L.onPageChange
379
+ onPageChange: R.onPageChange
376
380
  })] }),
377
- /* @__PURE__ */ f(_, {
378
- open: Oe,
381
+ /* @__PURE__ */ h(b, {
382
+ open: Ae,
379
383
  onOpenChange: (e) => {
380
- R(e), e || Ue();
384
+ z(e), e || Ke();
381
385
  },
382
- children: /* @__PURE__ */ p(v, { children: [/* @__PURE__ */ p(x, { children: [/* @__PURE__ */ f(S, { children: "New certification" }), /* @__PURE__ */ f(y, { children: "Register a license, permit or certification and attach its supporting evidence." })] }), /* @__PURE__ */ p("form", {
386
+ children: /* @__PURE__ */ g(x, { children: [/* @__PURE__ */ g(Ce, { children: [/* @__PURE__ */ h(we, { children: "New certification" }), /* @__PURE__ */ h(S, { children: "Register a license, permit or certification and attach its supporting evidence." })] }), /* @__PURE__ */ g("form", {
383
387
  onSubmit: (e) => {
384
- e.preventDefault(), We();
388
+ e.preventDefault(), qe();
385
389
  },
386
- children: [/* @__PURE__ */ p("div", {
390
+ children: [/* @__PURE__ */ g("div", {
387
391
  className: "grid gap-4 py-2",
388
392
  children: [
389
- /* @__PURE__ */ p("div", {
393
+ /* @__PURE__ */ g("div", {
390
394
  className: "grid gap-1.5",
391
- children: [/* @__PURE__ */ f(g, {
395
+ children: [/* @__PURE__ */ h(y, {
392
396
  htmlFor: "ccTitle",
393
397
  children: "Title *"
394
- }), /* @__PURE__ */ f(h, {
398
+ }), /* @__PURE__ */ h(v, {
395
399
  id: "ccTitle",
396
- value: z.title,
397
- onChange: (e) => B({
398
- ...z,
400
+ value: B.title,
401
+ onChange: (e) => V({
402
+ ...B,
399
403
  title: e.target.value
400
404
  }),
401
405
  placeholder: "Block 7 extraction license"
402
406
  })]
403
407
  }),
404
- /* @__PURE__ */ p("div", {
408
+ /* @__PURE__ */ g("div", {
405
409
  className: "grid gap-2 sm:grid-cols-2",
406
- children: [/* @__PURE__ */ p("div", {
410
+ children: [/* @__PURE__ */ g("div", {
407
411
  className: "grid gap-1.5",
408
- children: [/* @__PURE__ */ f(g, {
412
+ children: [/* @__PURE__ */ h(y, {
409
413
  htmlFor: "ccCategory",
410
414
  children: "Category"
411
- }), /* @__PURE__ */ p(C, {
412
- value: z.category,
413
- onValueChange: (e) => B({
414
- ...z,
415
+ }), /* @__PURE__ */ g(C, {
416
+ value: B.category,
417
+ onValueChange: (e) => V({
418
+ ...B,
415
419
  category: e
416
420
  }),
417
- children: [/* @__PURE__ */ f(E, {
421
+ children: [/* @__PURE__ */ h(E, {
418
422
  id: "ccCategory",
419
- children: /* @__PURE__ */ f(D, {})
420
- }), /* @__PURE__ */ f(w, { children: O.map((e) => /* @__PURE__ */ f(T, {
423
+ children: /* @__PURE__ */ h(D, {})
424
+ }), /* @__PURE__ */ h(w, { children: O.map((e) => /* @__PURE__ */ h(T, {
421
425
  value: e,
422
426
  children: i(e)
423
427
  }, e)) })]
424
428
  })]
425
- }), /* @__PURE__ */ p("div", {
429
+ }), /* @__PURE__ */ g("div", {
426
430
  className: "grid gap-1.5",
427
- children: [/* @__PURE__ */ f(g, {
431
+ children: [/* @__PURE__ */ h(y, {
428
432
  htmlFor: "ccAsset",
429
433
  children: "Asset"
430
- }), /* @__PURE__ */ p(C, {
431
- value: z.assetId,
432
- onValueChange: (e) => B({
433
- ...z,
434
+ }), /* @__PURE__ */ g(C, {
435
+ value: B.assetId,
436
+ onValueChange: (e) => V({
437
+ ...B,
434
438
  assetId: e
435
439
  }),
436
- children: [/* @__PURE__ */ f(E, {
440
+ children: [/* @__PURE__ */ h(E, {
437
441
  id: "ccAsset",
438
- children: /* @__PURE__ */ f(D, { placeholder: "Optional" })
439
- }), /* @__PURE__ */ f(w, { children: Y.map((e) => /* @__PURE__ */ f(T, {
442
+ children: /* @__PURE__ */ h(D, { placeholder: "Optional" })
443
+ }), /* @__PURE__ */ h(w, { children: J.map((e) => /* @__PURE__ */ h(T, {
440
444
  value: e.id,
441
445
  children: e.name
442
446
  }, e.id)) })]
443
447
  })]
444
448
  })]
445
449
  }),
446
- /* @__PURE__ */ p("div", {
450
+ /* @__PURE__ */ g("div", {
447
451
  className: "grid gap-2 sm:grid-cols-2",
448
- children: [/* @__PURE__ */ p("div", {
452
+ children: [/* @__PURE__ */ g("div", {
449
453
  className: "grid gap-1.5",
450
- children: [/* @__PURE__ */ f(g, {
454
+ children: [/* @__PURE__ */ h(y, {
451
455
  htmlFor: "ccAuthority",
452
456
  children: "Issuing authority"
453
- }), /* @__PURE__ */ f(h, {
457
+ }), /* @__PURE__ */ h(v, {
454
458
  id: "ccAuthority",
455
- value: z.authority,
456
- onChange: (e) => B({
457
- ...z,
459
+ value: B.authority,
460
+ onChange: (e) => V({
461
+ ...B,
458
462
  authority: e.target.value
459
463
  }),
460
464
  placeholder: "Ministry of Petroleum & Natural Gas"
461
465
  })]
462
- }), /* @__PURE__ */ p("div", {
466
+ }), /* @__PURE__ */ g("div", {
463
467
  className: "grid gap-1.5",
464
- children: [/* @__PURE__ */ f(g, {
468
+ children: [/* @__PURE__ */ h(y, {
465
469
  htmlFor: "ccNumber",
466
470
  children: "Certificate number"
467
- }), /* @__PURE__ */ f(h, {
471
+ }), /* @__PURE__ */ h(v, {
468
472
  id: "ccNumber",
469
- value: z.certNumber,
470
- onChange: (e) => B({
471
- ...z,
473
+ value: B.certNumber,
474
+ onChange: (e) => V({
475
+ ...B,
472
476
  certNumber: e.target.value
473
477
  }),
474
478
  placeholder: "EXT-2026-00471"
475
479
  })]
476
480
  })]
477
481
  }),
478
- /* @__PURE__ */ p("div", {
482
+ /* @__PURE__ */ g("div", {
479
483
  className: "grid gap-2 sm:grid-cols-2",
480
- children: [/* @__PURE__ */ p("div", {
484
+ children: [/* @__PURE__ */ g("div", {
481
485
  className: "grid gap-1.5",
482
- children: [/* @__PURE__ */ f(g, {
486
+ children: [/* @__PURE__ */ h(y, {
483
487
  htmlFor: "ccIssued",
484
488
  children: "Issued"
485
- }), /* @__PURE__ */ f(h, {
489
+ }), /* @__PURE__ */ h(v, {
486
490
  id: "ccIssued",
487
491
  type: "date",
488
- value: z.issuedAt,
489
- onChange: (e) => B({
490
- ...z,
492
+ value: B.issuedAt,
493
+ onChange: (e) => V({
494
+ ...B,
491
495
  issuedAt: e.target.value
492
496
  })
493
497
  })]
494
- }), /* @__PURE__ */ p("div", {
498
+ }), /* @__PURE__ */ g("div", {
495
499
  className: "grid gap-1.5",
496
- children: [/* @__PURE__ */ f(g, {
500
+ children: [/* @__PURE__ */ h(y, {
497
501
  htmlFor: "ccExpires",
498
502
  children: "Expires"
499
- }), /* @__PURE__ */ f(h, {
503
+ }), /* @__PURE__ */ h(v, {
500
504
  id: "ccExpires",
501
505
  type: "date",
502
- value: z.expiresAt,
503
- onChange: (e) => B({
504
- ...z,
506
+ value: B.expiresAt,
507
+ onChange: (e) => V({
508
+ ...B,
505
509
  expiresAt: e.target.value
506
510
  })
507
511
  })]
508
512
  })]
509
513
  }),
510
- /* @__PURE__ */ f(he, {
514
+ /* @__PURE__ */ h(he, {
511
515
  id: "evidence",
512
516
  label: "Evidence document",
513
517
  accept: "image/*,application/pdf",
514
- value: V,
515
- onChange: H,
518
+ value: H,
519
+ onChange: U,
516
520
  hint: "Attach the signed certificate, permit or audit report (PDF or image)."
517
521
  }),
518
- /* @__PURE__ */ p("div", {
522
+ /* @__PURE__ */ g("div", {
519
523
  className: "grid gap-1.5",
520
- children: [/* @__PURE__ */ f(g, {
524
+ children: [/* @__PURE__ */ h(y, {
521
525
  htmlFor: "ccNotes",
522
526
  children: "Notes"
523
- }), /* @__PURE__ */ f(Ce, {
527
+ }), /* @__PURE__ */ h(Te, {
524
528
  id: "ccNotes",
525
529
  rows: 2,
526
- value: z.notes,
527
- onChange: (e) => B({
528
- ...z,
530
+ value: B.notes,
531
+ onChange: (e) => V({
532
+ ...B,
529
533
  notes: e.target.value
530
534
  }),
531
535
  placeholder: "Optional context about scope, conditions or renewal."
532
536
  })]
533
537
  }),
534
- U && /* @__PURE__ */ f("p", {
538
+ W && /* @__PURE__ */ h("p", {
535
539
  className: "text-sm text-status-error-text",
536
- children: U
540
+ children: W
537
541
  })
538
542
  ]
539
- }), /* @__PURE__ */ p(b, { children: [/* @__PURE__ */ f(m, {
543
+ }), /* @__PURE__ */ g(Se, { children: [/* @__PURE__ */ h(_, {
540
544
  type: "button",
541
545
  variant: "outline",
542
- onClick: () => R(!1),
546
+ onClick: () => z(!1),
543
547
  children: "Cancel"
544
- }), /* @__PURE__ */ f(m, {
548
+ }), /* @__PURE__ */ h(_, {
545
549
  type: "submit",
546
550
  disabled: Z.isPending,
547
551
  children: Z.isPending ? "Creating…" : "Create certification"
548
552
  })] })]
549
553
  })] })
550
554
  }),
551
- /* @__PURE__ */ f(_, {
552
- open: Ae,
555
+ /* @__PURE__ */ h(b, {
556
+ open: Pe,
553
557
  onOpenChange: (e) => {
554
- J(e), e || q(null);
558
+ q(e), e || Ne(null);
555
559
  },
556
- children: /* @__PURE__ */ f(v, {
560
+ children: /* @__PURE__ */ h(x, {
557
561
  className: "sm:max-w-xl",
558
- children: K && /* @__PURE__ */ p(Se, { children: [
559
- /* @__PURE__ */ p(x, { children: [/* @__PURE__ */ f(S, { children: K.title }), /* @__PURE__ */ f(y, { children: i(K.category) })] }),
560
- /* @__PURE__ */ p("div", {
562
+ children: K && /* @__PURE__ */ g(m, { children: [
563
+ /* @__PURE__ */ g(Ce, { children: [/* @__PURE__ */ h(we, { children: K.title }), /* @__PURE__ */ h(S, { children: i(K.category) })] }),
564
+ /* @__PURE__ */ g("div", {
561
565
  className: "max-h-[70vh] space-y-6 overflow-y-auto py-2",
562
566
  children: [
563
- /* @__PURE__ */ p("dl", {
567
+ /* @__PURE__ */ g("dl", {
564
568
  className: "grid grid-cols-2 gap-x-4 gap-y-3 text-sm",
565
569
  children: [
566
- /* @__PURE__ */ p("div", {
570
+ /* @__PURE__ */ g("div", {
567
571
  className: "space-y-1",
568
- children: [/* @__PURE__ */ f("dt", {
572
+ children: [/* @__PURE__ */ h("dt", {
569
573
  className: "text-xs text-text-tertiary",
570
574
  children: "Status"
571
- }), /* @__PURE__ */ f("dd", { children: /* @__PURE__ */ f(a, { status: K.status }) })]
575
+ }), /* @__PURE__ */ h("dd", { children: /* @__PURE__ */ h(s, { status: K.status }) })]
572
576
  }),
573
- /* @__PURE__ */ p("div", {
577
+ /* @__PURE__ */ g("div", {
574
578
  className: "space-y-1",
575
- children: [/* @__PURE__ */ f("dt", {
579
+ children: [/* @__PURE__ */ h("dt", {
576
580
  className: "text-xs text-text-tertiary",
577
581
  children: "Asset"
578
- }), /* @__PURE__ */ f("dd", {
582
+ }), /* @__PURE__ */ h("dd", {
579
583
  className: "text-text-secondary",
580
- children: K.assetId ? Y.find((e) => e.id === K.assetId)?.name ?? "—" : "—"
584
+ children: K.assetId ? J.find((e) => e.id === K.assetId)?.name ?? "—" : "—"
581
585
  })]
582
586
  }),
583
- /* @__PURE__ */ p("div", {
587
+ /* @__PURE__ */ g("div", {
584
588
  className: "space-y-1",
585
- children: [/* @__PURE__ */ f("dt", {
589
+ children: [/* @__PURE__ */ h("dt", {
586
590
  className: "text-xs text-text-tertiary",
587
591
  children: "Authority"
588
- }), /* @__PURE__ */ f("dd", {
592
+ }), /* @__PURE__ */ h("dd", {
589
593
  className: "text-text-secondary",
590
594
  children: K.authority || "—"
591
595
  })]
592
596
  }),
593
- /* @__PURE__ */ p("div", {
597
+ /* @__PURE__ */ g("div", {
594
598
  className: "space-y-1",
595
- children: [/* @__PURE__ */ f("dt", {
599
+ children: [/* @__PURE__ */ h("dt", {
596
600
  className: "text-xs text-text-tertiary",
597
601
  children: "Certificate no."
598
- }), /* @__PURE__ */ f("dd", {
602
+ }), /* @__PURE__ */ h("dd", {
599
603
  className: "tabular-nums text-text-secondary",
600
604
  children: K.certNumber || "—"
601
605
  })]
602
606
  }),
603
- /* @__PURE__ */ p("div", {
607
+ /* @__PURE__ */ g("div", {
604
608
  className: "space-y-1",
605
- children: [/* @__PURE__ */ f("dt", {
609
+ children: [/* @__PURE__ */ h("dt", {
606
610
  className: "text-xs text-text-tertiary",
607
611
  children: "Issued"
608
- }), /* @__PURE__ */ f("dd", {
612
+ }), /* @__PURE__ */ h("dd", {
609
613
  className: "text-text-secondary",
610
614
  children: r(K.issuedAt)
611
615
  })]
612
616
  }),
613
- /* @__PURE__ */ p("div", {
617
+ /* @__PURE__ */ g("div", {
614
618
  className: "space-y-1",
615
- children: [/* @__PURE__ */ f("dt", {
619
+ children: [/* @__PURE__ */ h("dt", {
616
620
  className: "text-xs text-text-tertiary",
617
621
  children: "Expires"
618
- }), /* @__PURE__ */ f("dd", {
622
+ }), /* @__PURE__ */ h("dd", {
619
623
  className: "text-text-secondary",
620
624
  children: r(K.expiresAt)
621
625
  })]
622
626
  }),
623
- K.evidence?.id && /* @__PURE__ */ p("div", {
627
+ K.evidence?.id && /* @__PURE__ */ g("div", {
624
628
  className: "col-span-2 space-y-1",
625
- children: [/* @__PURE__ */ f("dt", {
629
+ children: [/* @__PURE__ */ h("dt", {
626
630
  className: "text-xs text-text-tertiary",
627
631
  children: "Evidence"
628
- }), /* @__PURE__ */ f("dd", { children: /* @__PURE__ */ f(s, { fileId: K.evidence.id }) })]
632
+ }), /* @__PURE__ */ h("dd", { children: /* @__PURE__ */ h(l, { fileId: K.evidence.id }) })]
629
633
  }),
630
- K.notes && /* @__PURE__ */ p("div", {
634
+ K.notes && /* @__PURE__ */ g("div", {
631
635
  className: "col-span-2 space-y-1",
632
- children: [/* @__PURE__ */ f("dt", {
636
+ children: [/* @__PURE__ */ h("dt", {
633
637
  className: "text-xs text-text-tertiary",
634
638
  children: "Notes"
635
- }), /* @__PURE__ */ f("dd", {
639
+ }), /* @__PURE__ */ h("dd", {
636
640
  className: "whitespace-pre-wrap text-text-secondary",
637
641
  children: K.notes
638
642
  })]
639
643
  })
640
644
  ]
641
645
  }),
642
- /* @__PURE__ */ f("div", {
646
+ /* @__PURE__ */ h("div", {
643
647
  className: "border-t border-border-seam pt-4",
644
- children: /* @__PURE__ */ f(_e, {
648
+ children: /* @__PURE__ */ h(_e, {
645
649
  entityType: "theglobalfuel-compliance",
646
650
  entityId: K.id
647
651
  })
648
652
  }),
649
- /* @__PURE__ */ f("div", {
653
+ /* @__PURE__ */ h("div", {
650
654
  className: "border-t border-border-seam pt-4",
651
- children: /* @__PURE__ */ f(ge, {
655
+ children: /* @__PURE__ */ h(ge, {
652
656
  entityType: "theglobalfuel-compliance",
653
657
  entityId: K.id,
654
658
  title: "Discussion",
@@ -657,10 +661,10 @@ function N() {
657
661
  })
658
662
  ]
659
663
  }),
660
- /* @__PURE__ */ f(b, { children: /* @__PURE__ */ f(m, {
664
+ /* @__PURE__ */ h(Se, { children: /* @__PURE__ */ h(_, {
661
665
  type: "button",
662
666
  variant: "outline",
663
- onClick: () => J(!1),
667
+ onClick: () => q(!1),
664
668
  children: "Close"
665
669
  }) })
666
670
  ] })