@burdenoff/microfe-product 2026.624.2 → 2026.625.1

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 (65) hide show
  1. package/dist/product/pages/ContentPageViewPage.js +25 -24
  2. package/dist/product/pages/ContentPageViewPage.js.map +1 -1
  3. package/dist/product/pages/ProductCatalogPage.js +69 -64
  4. package/dist/product/pages/ProductCatalogPage.js.map +1 -1
  5. package/dist/product/pages/ProductViewPage.js +91 -86
  6. package/dist/product/pages/ProductViewPage.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/components/ContentPageForm.js +7 -7
  8. package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
  9. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +2 -2
  10. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
  11. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +243 -230
  12. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  13. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +2 -2
  14. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
  15. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +293 -277
  16. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
  17. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +1 -1
  18. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
  19. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +2 -2
  20. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
  21. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +158 -148
  22. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
  23. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +2 -2
  24. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
  25. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +98 -81
  26. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  27. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +4 -4
  28. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  29. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +2 -2
  30. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
  31. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +109 -99
  32. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  33. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +2 -2
  34. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
  35. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +252 -236
  36. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
  37. package/dist/product-management/modules/products/components/ProductForm.js +8 -8
  38. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  39. package/dist/product-management/modules/products/components/ProductPlans.js +4 -4
  40. package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
  41. package/dist/product-management/modules/products/pages/ProductCreatePage.js +2 -2
  42. package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
  43. package/dist/product-management/modules/products/pages/ProductDetailPage.js +408 -395
  44. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  45. package/dist/product-management/modules/products/pages/ProductEditPage.js +2 -2
  46. package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
  47. package/dist/product-management/modules/products/pages/ProductsListPage.js +301 -281
  48. package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
  49. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +3 -3
  50. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  51. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +2 -2
  52. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
  53. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +221 -218
  54. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  55. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +2 -2
  56. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
  57. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +260 -241
  58. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
  59. package/dist/product-management/shared/components/AuditHistoryTab.js +1 -1
  60. package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
  61. package/dist/product-management/shared/components/feedback/EmptyState.js +2 -20
  62. package/dist/product-management/shared/hooks/useConfirmDialog.js +44 -0
  63. package/dist/product-management/shared/hooks/useConfirmDialog.js.map +1 -0
  64. package/package.json +2 -2
  65. package/dist/product-management/shared/components/feedback/EmptyState.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PressKitListPage.js","names":[],"sources":["../../../../../src/product-management/modules/press-kit/pages/PressKitListPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Download, FileText, Plus, Eye, SquarePen, Trash2, RefreshCw } from 'lucide-react';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useDebounced } from '../../../shared/hooks/useDebounced';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { usePressKitAssets, useDeletePressKitAsset } from '../hooks/usePressKitAssets';\nimport { SearchInput } from '../../../shared/components/input/SearchInput';\nimport { exportToCsv } from '../../../shared/utils/exportUtils';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { PressKitAssetFilterInput, PressKitAssetCategory } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\n\n/** Category tabs — each filters the list server-side by category ('' = All). */\nconst CATEGORY_TABS: { label: string; category: PressKitAssetCategory | '' }[] = [\n { label: 'All', category: '' },\n { label: 'Logos', category: 'LOGO' },\n { label: 'Banners', category: 'BANNER' },\n { label: 'Screenshots', category: 'SCREENSHOT' },\n { label: 'Brochures', category: 'BROCHURE' },\n { label: 'Documents', category: 'DOCUMENT' },\n { label: 'Press Releases', category: 'PRESS_RELEASE' },\n { label: 'Brand Guides', category: 'BRAND_GUIDE' },\n { label: 'Contracts', category: 'CONTRACT' },\n];\n\nfunction formatBytes(bytes: number | null): string {\n if (!bytes) return '—';\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;\n return `${(bytes / 1024 / 1024).toFixed(1)} MB`;\n}\n\nexport function PressKitListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const pressKitBasePath = `${basePath}/press-kit`;\n const [searchQuery, setSearchQuery] = useState('');\n // Debounce so typing doesn't fire a query (and flip `loading`) on every keystroke.\n const debouncedSearchQuery = useDebounced(searchQuery, 300);\n const tr = useTr();\n const [filter, setFilter] = useState<PressKitAssetFilterInput>({});\n\n const { assets, loading, error, refetch } = usePressKitAssets(\n undefined,\n { ...filter, search: debouncedSearchQuery || undefined },\n { limit: 50 }\n );\n\n const { deletePressKitAsset, loading: deleteLoading } = useDeletePressKitAsset();\n\n const handleDelete = async (id: string) => {\n void nativeImpact('medium');\n const message = tr('pressKit.confirmDelete', 'Delete this press kit asset?');\n const native = await nativeConfirm({\n title: 'Delete press kit asset',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok = native === null ? window.confirm(message) : native;\n if (!ok) return;\n\n try {\n // `deletePressKitAsset` returns `Boolean!`. A throw covers hard failures\n // (network, auth, validation); the explicit `false` branch covers\n // soft-failure cases where the resolver resolved but the asset wasn't\n // actually removed — so we don't show a misleading success toast.\n const result = await deletePressKitAsset(id);\n if (!result.data?.deletePressKitAsset) {\n void nativeNotify('error');\n console.error('Press kit asset delete returned false:', id);\n return;\n }\n void nativeNotify('success');\n refetch();\n } catch (err) {\n void nativeNotify('error');\n console.error('Failed to delete press kit asset:', err);\n }\n };\n\n const formatDate = (dateString: string | null) => {\n if (!dateString) return '—';\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n };\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n <div className=\"mb-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <div>\n <h1 className=\"text-3xl font-bold text-text-primary mb-2\">\n {tr('pressKit.title', 'Press Kit')}\n </h1>\n <p className=\"text-text-secondary\">\n {tr('pressKit.subtitle', 'Manage downloadable press & media assets')}\n </p>\n </div>\n\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${pressKitBasePath}/new`)}\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)] rounded-lg hover:opacity-90 transition-all duration-200 font-medium\"\n >\n <Plus size={20} />\n {tr('pressKit.newAsset', 'New Asset')}\n </button>\n </PermissionGate>\n </div>\n\n {/* Category tabs */}\n <div className=\"flex flex-wrap gap-1 border-b border-default pb-px\">\n {CATEGORY_TABS.map((t) => {\n const active = (filter.category ?? '') === t.category;\n return (\n <button\n key={t.label}\n type=\"button\"\n onClick={() =>\n setFilter({\n ...filter,\n category: (t.category || undefined) as PressKitAssetCategory | undefined,\n })\n }\n className={`px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${\n active\n ? 'border-[var(--color-action-primary-bg)] text-text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n {t.label}\n </button>\n );\n })}\n </div>\n\n <div className=\"flex gap-4\">\n <SearchInput\n value={searchQuery}\n onChange={setSearchQuery}\n placeholder={tr('pressKit.searchPlaceholder', 'Search press kit assets...')}\n className=\"flex-1\"\n />\n\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-surface text-text-primary border border-default rounded-lg hover:bg-bg-sunken transition-all duration-200\"\n >\n <RefreshCw size={18} />\n </button>\n\n {assets.length > 0 && (\n <button\n type=\"button\"\n onClick={() =>\n exportToCsv(\n 'press-kit-assets',\n assets.map((a) => ({\n id: a.id,\n slug: a.slug,\n title: a.title,\n category: a.category,\n fileUrl: a.fileUrl,\n mimeType: a.mimeType ?? '',\n visibility: a.visibility,\n sortOrder: a.sortOrder,\n productId: a.productId,\n updatedAt: a.updatedAt,\n }))\n )\n }\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-surface text-text-primary border border-default rounded-lg hover:bg-bg-sunken transition-all duration-200\"\n title={tr('pressKit.exportCsv', 'Export as CSV')}\n >\n <Download size={18} />\n </button>\n )}\n </div>\n </div>\n\n {/* Body — header above stays mounted across refetches so the search keeps focus. */}\n {error ? (\n <ErrorState\n message={error.message}\n action={{ label: tr('productCommon.retry', 'Retry'), onClick: () => refetch() }}\n />\n ) : loading && assets.length === 0 ? (\n <LoadingState message={tr('pressKit.loadingAssets', 'Loading press kit assets...')} />\n ) : assets.length === 0 ? (\n <div className=\"bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-200\">\n <p className=\"text-text-secondary mb-4\">\n {tr('pressKit.noAssetsFound', 'No press kit assets found')}\n </p>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${pressKitBasePath}/new`)}\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)] rounded-lg hover:opacity-90 transition-all duration-200 font-medium\"\n >\n <Plus size={20} />\n {tr('pressKit.newAsset', 'New Asset')}\n </button>\n </PermissionGate>\n </div>\n ) : (\n <div className=\"bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden\">\n <table className=\"w-full\">\n <thead className=\"bg-bg-sunken border-b border-default\">\n <tr>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnAsset', 'Asset')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnCategory', 'Category')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnFile', 'File')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnVisibility', 'Visibility')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnUpdated', 'Updated')}\n </th>\n <th className=\"text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnActions', 'Actions')}\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-[var(--color-border-default)]\">\n {assets.map((asset) => (\n <tr\n key={asset.id}\n className=\"hover:bg-bg-sunken transition-all duration-200 cursor-pointer\"\n onClick={() => navigate(`${pressKitBasePath}/${asset.id}`)}\n >\n <td className=\"px-6 py-4\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center overflow-hidden\">\n {asset.thumbnailUrl ? (\n <img\n src={asset.thumbnailUrl}\n alt=\"\"\n className=\"w-full h-full object-cover\"\n />\n ) : (\n <FileText size={20} className=\"text-[var(--color-status-info)]\" />\n )}\n </div>\n <div>\n <p className=\"font-medium text-text-primary\">{asset.title}</p>\n <p className=\"text-xs text-text-tertiary font-mono\">/{asset.slug}</p>\n </div>\n </div>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-xs font-medium px-2 py-1 rounded-full bg-[var(--color-status-info-subtle)] text-[var(--color-status-info)]\">\n {asset.category.replace(/_/g, ' ')}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">\n {(asset.mimeType ?? 'file').split('/').pop()} · {formatBytes(asset.fileSize)}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">{asset.visibility}</span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">\n {formatDate(asset.updatedAt)}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <div\n className=\"flex items-center justify-end gap-2\"\n onClick={(e) => e.stopPropagation()}\n >\n <a\n href={asset.fileUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('pressKit.download', 'Download')}\n >\n <Download size={18} />\n </a>\n <button\n type=\"button\"\n onClick={() => navigate(`${pressKitBasePath}/${asset.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('pressKit.viewDetails', 'View details')}\n >\n <Eye size={18} />\n </button>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${pressKitBasePath}/${asset.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('pressKit.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => handleDelete(asset.id)}\n disabled={deleteLoading}\n className=\"p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50\"\n title={tr('pressKit.delete', 'Delete')}\n >\n <Trash2 size={18} />\n </button>\n </PermissionGate>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAeA,IAAM,IAA2E;CAC/E;EAAE,OAAO;EAAO,UAAU;EAAI;CAC9B;EAAE,OAAO;EAAS,UAAU;EAAQ;CACpC;E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;OACL,kBAAC,MAAD;QAAI,WAAU;kBACZ,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAW,EAAM,UAAU;SACvB,CAAA;QACJ,CAAA;OACL,kBAAC,MAAD;QAAI,WAAU;kBACZ,kBAAC,OAAD;SACE,WAAU;SACV,UAAU,MAAM,EAAE,iBAAiB;mBAFrC;UAIE,kBAAC,KAAD;WACE,MAAM,EAAM;WACZ,QAAO;WACP,KAAI;WACJ,WAAU;WACV,OAAO,EAAG,qBAAqB,WAAW;qBAE1C,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;WACpB,CAAA;UACJ,kBAAC,UAAD;WACE,MAAK;WACL,eAAe,EAAS,GAAG,EAAiB,GAAG,EAAM,KAAK;WAC1D,WAAU;WACV,OAAO,EAAG,wBAAwB,eAAe;qBAEjD,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;WACV,CAAA;UACT,kBAAC,GAAD;WAAgB,MAAK;qBAArB,CACE,kBAAC,UAAD;YACE,MAAK;YACL,eAAe,EAAS,GAAG,EAAiB,GAAG,EAAM,GAAG,OAAO;YAC/D,WAAU;YACV,OAAO,EAAG,iBAAiB,OAAO;sBAElC,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;YAChB,CAAA,EACT,kBAAC,UAAD;YACE,MAAK;YACL,eAAe,EAAa,EAAM,GAAG;YACrC,UAAU;YACV,WAAU;YACV,OAAO,EAAG,mBAAmB,SAAS;sBAEtC,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;YACb,CAAA,CACM;;UACb;;QACH,CAAA;OACF;QApFE,EAAM,GAoFR,CACL;KACI,CAAA,CACF;;GACJ,CAAA,CAEJ"}
1
+ {"version":3,"file":"PressKitListPage.js","names":[],"sources":["../../../../../src/product-management/modules/press-kit/pages/PressKitListPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Download, FileText, Plus, Eye, SquarePen, Trash2, RefreshCw } from 'lucide-react';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport {\n Button,\n CTAOverflowMenu,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n} from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useDebounced } from '../../../shared/hooks/useDebounced';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { usePressKitAssets, useDeletePressKitAsset } from '../hooks/usePressKitAssets';\nimport { SearchInput } from '../../../shared/components/input/SearchInput';\nimport { exportToCsv } from '../../../shared/utils/exportUtils';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { PressKitAssetFilterInput, PressKitAssetCategory } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\n/** Category tabs — each filters the list server-side by category ('' = All). */\nconst CATEGORY_TABS: { label: string; category: PressKitAssetCategory | '' }[] = [\n { label: 'All', category: '' },\n { label: 'Logos', category: 'LOGO' },\n { label: 'Banners', category: 'BANNER' },\n { label: 'Screenshots', category: 'SCREENSHOT' },\n { label: 'Brochures', category: 'BROCHURE' },\n { label: 'Documents', category: 'DOCUMENT' },\n { label: 'Press Releases', category: 'PRESS_RELEASE' },\n { label: 'Brand Guides', category: 'BRAND_GUIDE' },\n { label: 'Contracts', category: 'CONTRACT' },\n];\n\nfunction formatBytes(bytes: number | null): string {\n if (!bytes) return '—';\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;\n return `${(bytes / 1024 / 1024).toFixed(1)} MB`;\n}\n\nexport function PressKitListPage() {\n const { navigate, basePath = '/products' } = useProductConsole();\n const pressKitBasePath = `${basePath}/press-kit`;\n const [searchQuery, setSearchQuery] = useState('');\n // Debounce so typing doesn't fire a query (and flip `loading`) on every keystroke.\n const debouncedSearchQuery = useDebounced(searchQuery, 300);\n const tr = useTr();\n const [filter, setFilter] = useState<PressKitAssetFilterInput>({});\n\n const { assets, loading, error, refetch } = usePressKitAssets(\n undefined,\n { ...filter, search: debouncedSearchQuery || undefined },\n { limit: 50 }\n );\n\n const { deletePressKitAsset, loading: deleteLoading } = useDeletePressKitAsset();\n const { confirm, ConfirmDialog } = useConfirmDialog();\n\n const handleDelete = async (id: string) => {\n void nativeImpact('medium');\n const message = tr('pressKit.confirmDelete', 'Delete this press kit asset?');\n const native = await nativeConfirm({\n title: 'Delete press kit asset',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Delete press kit asset',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n destructive: true,\n })\n : native;\n if (!ok) return;\n\n try {\n // `deletePressKitAsset` returns `Boolean!`. A throw covers hard failures\n // (network, auth, validation); the explicit `false` branch covers\n // soft-failure cases where the resolver resolved but the asset wasn't\n // actually removed — so we don't show a misleading success toast.\n const result = await deletePressKitAsset(id);\n if (!result.data?.deletePressKitAsset) {\n void nativeNotify('error');\n console.error('Press kit asset delete returned false:', id);\n return;\n }\n void nativeNotify('success');\n refetch();\n } catch (err) {\n void nativeNotify('error');\n console.error('Failed to delete press kit asset:', err);\n }\n };\n\n const formatDate = (dateString: string | null) => {\n if (!dateString) return '—';\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n };\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n <div className=\"mb-6\">\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4\">\n <div>\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2\">\n <GradientText>{tr('pressKit.title', 'Press Kit')}</GradientText>\n </h1>\n <p className=\"text-text-secondary\">\n {tr('pressKit.subtitle', 'Manage downloadable press & media assets')}\n </p>\n </div>\n\n <PermissionGate role=\"super_admin\">\n <CTAOverflowMenu\n primary={{\n label: tr('pressKit.newAsset', 'New Asset'),\n onSelect: () => navigate(`${pressKitBasePath}/new`),\n icon: <Plus className=\"size-4\" />,\n }}\n actions={[]}\n />\n </PermissionGate>\n </div>\n\n {/* Category tabs */}\n <div className=\"flex flex-wrap gap-1 border-b border-border-seam pb-px\">\n {CATEGORY_TABS.map((t) => {\n const active = (filter.category ?? '') === t.category;\n return (\n <button\n key={t.label}\n type=\"button\"\n onClick={() =>\n setFilter({\n ...filter,\n category: (t.category || undefined) as PressKitAssetCategory | undefined,\n })\n }\n className={`px-4 py-2 rounded-t-lg text-sm font-medium transition-all border-b-2 ${\n active\n ? 'border-[var(--color-action-primary-bg)] text-text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n {t.label}\n </button>\n );\n })}\n </div>\n\n <div className=\"flex gap-4\">\n <SearchInput\n value={searchQuery}\n onChange={setSearchQuery}\n placeholder={tr('pressKit.searchPlaceholder', 'Search press kit assets...')}\n className=\"flex-1\"\n />\n\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-surface text-text-primary border border-default rounded-lg hover:bg-bg-sunken transition-all duration-200\"\n >\n <RefreshCw size={18} />\n </button>\n\n {assets.length > 0 && (\n <button\n type=\"button\"\n onClick={() =>\n exportToCsv(\n 'press-kit-assets',\n assets.map((a) => ({\n id: a.id,\n slug: a.slug,\n title: a.title,\n category: a.category,\n fileUrl: a.fileUrl,\n mimeType: a.mimeType ?? '',\n visibility: a.visibility,\n sortOrder: a.sortOrder,\n productId: a.productId,\n updatedAt: a.updatedAt,\n }))\n )\n }\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-surface text-text-primary border border-default rounded-lg hover:bg-bg-sunken transition-all duration-200\"\n title={tr('pressKit.exportCsv', 'Export as CSV')}\n >\n <Download size={18} />\n </button>\n )}\n </div>\n </div>\n\n {/* Body — header above stays mounted across refetches so the search keeps focus. */}\n {error ? (\n <ErrorState\n message={error.message}\n action={{ label: tr('productCommon.retry', 'Retry'), onClick: () => refetch() }}\n />\n ) : loading && assets.length === 0 ? (\n <LoadingState message={tr('pressKit.loadingAssets', 'Loading press kit assets...')} />\n ) : assets.length === 0 ? (\n <GlassCard treatment=\"insight\" className=\"animate-in fade-in duration-200\">\n <IllustratedEmptyState\n illustration={searchQuery || filter.category ? 'empty-search' : 'empty-files'}\n title={tr('pressKit.noAssetsFound', 'No press kit assets found')}\n action={\n <PermissionGate role=\"super_admin\">\n <Button type=\"button\" onClick={() => navigate(`${pressKitBasePath}/new`)}>\n <Plus className=\"size-4\" />\n {tr('pressKit.newAsset', 'New Asset')}\n </Button>\n </PermissionGate>\n }\n />\n </GlassCard>\n ) : (\n <GlassCard treatment=\"insight\" className=\"overflow-hidden p-0\">\n <table className=\"w-full\">\n <thead className=\"bg-bg-sunken/60 border-b border-border-seam\">\n <tr>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnAsset', 'Asset')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnCategory', 'Category')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnFile', 'File')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnVisibility', 'Visibility')}\n </th>\n <th className=\"text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnUpdated', 'Updated')}\n </th>\n <th className=\"text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase\">\n {tr('pressKit.columnActions', 'Actions')}\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-border-seam\">\n {assets.map((asset) => (\n <tr\n key={asset.id}\n className=\"hover:bg-bg-sunken/70 transition-colors duration-200 cursor-pointer\"\n onClick={() => navigate(`${pressKitBasePath}/${asset.id}`)}\n >\n <td className=\"px-6 py-4\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-10 rounded-lg bg-[var(--color-status-info-subtle)] flex items-center justify-center overflow-hidden\">\n {asset.thumbnailUrl ? (\n <img\n src={asset.thumbnailUrl}\n alt=\"\"\n className=\"w-full h-full object-cover\"\n />\n ) : (\n <FileText size={20} className=\"text-[var(--color-status-info)]\" />\n )}\n </div>\n <div>\n <p className=\"font-medium text-text-primary\">{asset.title}</p>\n <p className=\"text-xs text-text-tertiary font-mono\">/{asset.slug}</p>\n </div>\n </div>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-xs font-medium px-2 py-1 rounded-full bg-[var(--color-status-info-subtle)] text-[var(--color-status-info)]\">\n {asset.category.replace(/_/g, ' ')}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">\n {(asset.mimeType ?? 'file').split('/').pop()} · {formatBytes(asset.fileSize)}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">{asset.visibility}</span>\n </td>\n <td className=\"px-6 py-4\">\n <span className=\"text-sm text-text-secondary\">\n {formatDate(asset.updatedAt)}\n </span>\n </td>\n <td className=\"px-6 py-4\">\n <div\n className=\"flex items-center justify-end gap-2\"\n onClick={(e) => e.stopPropagation()}\n >\n <a\n href={asset.fileUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('pressKit.download', 'Download')}\n >\n <Download size={18} />\n </a>\n <button\n type=\"button\"\n onClick={() => navigate(`${pressKitBasePath}/${asset.id}`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('pressKit.viewDetails', 'View details')}\n >\n <Eye size={18} />\n </button>\n <PermissionGate role=\"super_admin\">\n <button\n type=\"button\"\n onClick={() => navigate(`${pressKitBasePath}/${asset.id}/edit`)}\n className=\"p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200\"\n title={tr('pressKit.edit', 'Edit')}\n >\n <SquarePen size={18} />\n </button>\n <button\n type=\"button\"\n onClick={() => handleDelete(asset.id)}\n disabled={deleteLoading}\n className=\"p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50\"\n title={tr('pressKit.delete', 'Delete')}\n >\n <Trash2 size={18} />\n </button>\n </PermissionGate>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </GlassCard>\n )}\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,IAAM,IAA2E;CAC/E;EAAE,OAAO;EAAO,UAAU;EAAI;CAC9B;EAAE,OAAO;EAAS,UAAU;EAAQ;CACpC;EAAE,OAAO;EAAW,UAAU;EAAU;CACxC;EAAE,OAAO;EAAe,UAAU;EAAc;CAChD;EAAE,OAAO;EAAa,UAAU;EAAY;CAC5C;EAAE,OAAO;EAAa,UAAU;EAAY;CAC5C;EAAE,OAAO;EAAkB,UAAU;EAAiB;CACtD;EAAE,OAAO;EAAgB,UAAU;EAAe;CAClD;EAAE,OAAO;EAAa,UAAU;EAAY;CAC7C;AAED,SAAS,EAAY,GAA8B;AAIjD,QAHK,IACD,IAAQ,OAAa,GAAG,EAAM,MAC9B,IAAQ,OAAO,OAAa,IAAI,IAAQ,MAAM,QAAQ,EAAE,CAAC,OACtD,IAAI,IAAQ,OAAO,MAAM,QAAQ,EAAE,CAAC,OAHxB;;AAMrB,SAAgB,IAAmB;CACjC,IAAM,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAmB,GAAG,EAAS,aAC/B,CAAC,GAAa,KAAkB,EAAS,GAAG,EAE5C,IAAuB,EAAa,GAAa,IAAI,EACrD,IAAK,GAAO,EACZ,CAAC,GAAQ,KAAa,EAAmC,EAAE,CAAC,EAE5D,EAAE,WAAQ,YAAS,UAAO,eAAY,EAC1C,KAAA,GAC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AD,EAAK,MAAM,IAAM,CAAA;YACV,CAAA;WACT,kBAAC,GAAD;YAAgB,MAAK;sBAArB,CACE,kBAAC,UAAD;aACE,MAAK;aACL,eAAe,EAAS,GAAG,EAAiB,GAAG,EAAM,GAAG,OAAO;aAC/D,WAAU;aACV,OAAO,EAAG,iBAAiB,OAAO;uBAElC,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;aAChB,CAAA,EACT,kBAAC,UAAD;aACE,MAAK;aACL,eAAe,EAAa,EAAM,GAAG;aACrC,UAAU;aACV,WAAU;aACV,OAAO,EAAG,mBAAmB,SAAS;uBAEtC,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;aACb,CAAA,CACM;;WACb;;SACH,CAAA;QACF;SApFE,EAAM,GAoFR,CACL;MACI,CAAA,CACF;;IACE,CAAA;GAEb;GACG"}
@@ -321,7 +321,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
321
321
  ]
322
322
  }),
323
323
  /* @__PURE__ */ m("div", {
324
- className: "space-y-4 pt-4 border-t border-default",
324
+ className: "space-y-4 pt-4 border-t border-border-seam",
325
325
  children: [
326
326
  /* @__PURE__ */ p("h3", {
327
327
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
@@ -479,7 +479,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
479
479
  ]
480
480
  }),
481
481
  /* @__PURE__ */ m("div", {
482
- className: "space-y-4 pt-4 border-t border-default",
482
+ className: "space-y-4 pt-4 border-t border-border-seam",
483
483
  children: [/* @__PURE__ */ m("button", {
484
484
  type: "button",
485
485
  onClick: () => F("contact"),
@@ -584,7 +584,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
584
584
  })]
585
585
  }),
586
586
  /* @__PURE__ */ m("div", {
587
- className: "space-y-4 pt-4 border-t border-default",
587
+ className: "space-y-4 pt-4 border-t border-border-seam",
588
588
  children: [/* @__PURE__ */ m("button", {
589
589
  type: "button",
590
590
  onClick: () => F("seo"),
@@ -712,7 +712,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
712
712
  })]
713
713
  }),
714
714
  /* @__PURE__ */ m("div", {
715
- className: "space-y-4 pt-4 border-t border-default",
715
+ className: "space-y-4 pt-4 border-t border-border-seam",
716
716
  children: [/* @__PURE__ */ m("button", {
717
717
  type: "button",
718
718
  onClick: () => F("appStore"),
@@ -768,7 +768,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
768
768
  })]
769
769
  }),
770
770
  /* @__PURE__ */ m("div", {
771
- className: "space-y-4 pt-4 border-t border-default",
771
+ className: "space-y-4 pt-4 border-t border-border-seam",
772
772
  children: [/* @__PURE__ */ m("button", {
773
773
  type: "button",
774
774
  onClick: () => F("social"),
@@ -830,7 +830,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
830
830
  })]
831
831
  }),
832
832
  /* @__PURE__ */ m("div", {
833
- className: "space-y-4 pt-4 border-t border-default",
833
+ className: "space-y-4 pt-4 border-t border-border-seam",
834
834
  children: [/* @__PURE__ */ m("button", {
835
835
  type: "button",
836
836
  onClick: () => F("resources"),
@@ -917,7 +917,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
917
917
  })
918
918
  ]
919
919
  }), N.integrations && /* @__PURE__ */ m("div", {
920
- className: "px-4 pb-4 pt-2 space-y-4 border-t border-default",
920
+ className: "px-4 pb-4 pt-2 space-y-4 border-t border-border-seam",
921
921
  children: [
922
922
  /* @__PURE__ */ p("p", {
923
923
  className: "text-xs text-text-secondary",
@@ -963,7 +963,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
963
963
  })]
964
964
  }),
965
965
  /* @__PURE__ */ m("div", {
966
- className: "flex gap-3 pt-4 border-t border-default",
966
+ className: "flex gap-3 pt-4 border-t border-border-seam",
967
967
  children: [/* @__PURE__ */ m("button", {
968
968
  type: "submit",
969
969
  disabled: x,
@@ -1 +1 @@
1
- {"version":3,"file":"ProductForm.js","names":[],"sources":["../../../../../src/product-management/modules/products/components/ProductForm.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Loader2, ChevronDown, ChevronRight, Plus, X, Shield } from 'lucide-react';\nimport { ZodError } from 'zod';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport type { CreateProductInput, UpdateProductInput, PlatformProduct } from '../types';\nimport { ProductStatus } from '../types';\nimport { createProductSchema, updateProductSchema } from '../schemas';\nimport { TagInput } from '../../../shared/components/input/TagInput';\n\ninterface SocialLinkEntry {\n /** Stable client-side id so React list keys survive reorder/remove. */\n id: string;\n platform: string;\n url: string;\n}\n\nlet nextEntryId = 0;\nconst makeEntryId = (prefix: string) => `${prefix}-${++nextEntryId}`;\n\n/**\n * Resource-links share the same admin UI shape as social-links — a list of\n * (key, URL) rows the admin can freely add / remove. They're stored in their\n * own JSON column on `Product` so the website SDK can pick them up separately\n * from socials (different footer column, different default behaviour).\n */\ninterface ResourceLinkEntry {\n /** Stable client-side id so React list keys survive reorder/remove. */\n id: string;\n resource: string;\n url: string;\n}\n\ninterface ProductFormProps {\n product?: PlatformProduct | null;\n onSubmit: (data: CreateProductInput | UpdateProductInput) => Promise<void>;\n onCancel: () => void;\n loading?: boolean;\n}\n\nfunction initSocialLinks(product?: PlatformProduct | null): SocialLinkEntry[] {\n if (product?.socialLinks && typeof product.socialLinks === 'object') {\n const entries = Object.entries(product.socialLinks);\n if (entries.length > 0) {\n return entries.map(([platform, url]) => ({ id: makeEntryId('social'), platform, url }));\n }\n }\n return [];\n}\n\nfunction initResourceLinks(product?: PlatformProduct | null): ResourceLinkEntry[] {\n if (product?.resourceLinks && typeof product.resourceLinks === 'object') {\n const entries = Object.entries(product.resourceLinks);\n if (entries.length > 0) {\n return entries.map(([resource, url]) => ({ id: makeEntryId('resource'), resource, url }));\n }\n }\n return [];\n}\n\nexport function ProductForm({ product, onSubmit, onCancel, loading }: ProductFormProps) {\n const tr = useTr();\n\n const [formData, setFormData] = useState({\n name: product?.name || '',\n slug: product?.slug || '',\n description: product?.description || '',\n status: product?.status || ProductStatus.ACTIVE,\n logoUrl: product?.logoUrl || '',\n website: product?.website || '',\n appUrl: product?.appUrl || '',\n docsUrl: product?.docsUrl || '',\n githubUrl: product?.githubUrl || '',\n statusPageUrl: product?.statusPageUrl || '',\n contactEmail: product?.contactEmail || '',\n supportEmail: product?.supportEmail || '',\n contactPhone: product?.contactPhone || '',\n contactAddress: product?.contactAddress || '',\n seoTitle: product?.seoTitle || '',\n seoDescription: product?.seoDescription || '',\n seoKeywords: product?.seoKeywords || '',\n ogImage: product?.ogImage || '',\n appStoreUrl: product?.appStoreUrl || '',\n playStoreUrl: product?.playStoreUrl || '',\n });\n\n const [socialLinks, setSocialLinks] = useState<SocialLinkEntry[]>(() => initSocialLinks(product));\n const [resourceLinks, setResourceLinks] = useState<ResourceLinkEntry[]>(() =>\n initResourceLinks(product)\n );\n const [tags, setTags] = useState<string[]>(product?.tags ?? []);\n\n const [errors, setErrors] = useState<Record<string, string>>({});\n\n const [expandedSections, setExpandedSections] = useState<Record<string, boolean>>({\n contact: false,\n seo: false,\n appStore: false,\n social: false,\n resources: false,\n integrations: false,\n });\n\n const toggleSection = (section: string) => {\n setExpandedSections((prev) => ({ ...prev, [section]: !prev[section] }));\n };\n\n const addSocialLink = () => {\n setSocialLinks((prev) => [...prev, { id: makeEntryId('social'), platform: '', url: '' }]);\n };\n\n const removeSocialLink = (index: number) => {\n setSocialLinks((prev) => prev.filter((_, i) => i !== index));\n };\n\n const updateSocialLink = (index: number, field: 'platform' | 'url', value: string) => {\n setSocialLinks((prev) =>\n prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry))\n );\n };\n\n const buildSocialLinksRecord = (): Record<string, string> | undefined => {\n const filtered = socialLinks.filter(\n (entry) => entry.platform.trim() !== '' && entry.url.trim() !== ''\n );\n if (filtered.length === 0) return undefined;\n const record: Record<string, string> = {};\n filtered.forEach((entry) => {\n record[entry.platform.trim()] = entry.url.trim();\n });\n return record;\n };\n\n const addResourceLink = () => {\n setResourceLinks((prev) => [...prev, { id: makeEntryId('resource'), resource: '', url: '' }]);\n };\n\n const removeResourceLink = (index: number) => {\n setResourceLinks((prev) => prev.filter((_, i) => i !== index));\n };\n\n const updateResourceLink = (index: number, field: 'resource' | 'url', value: string) => {\n setResourceLinks((prev) =>\n prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry))\n );\n };\n\n const buildResourceLinksRecord = (): Record<string, string> | undefined => {\n const filtered = resourceLinks.filter(\n (entry) => entry.resource.trim() !== '' && entry.url.trim() !== ''\n );\n if (filtered.length === 0) return undefined;\n const record: Record<string, string> = {};\n filtered.forEach((entry) => {\n record[entry.resource.trim()] = entry.url.trim();\n });\n return record;\n };\n\n const validate = () => {\n try {\n const schema = product ? updateProductSchema : createProductSchema;\n const dataToValidate = {\n ...formData,\n socialLinks: buildSocialLinksRecord(),\n resourceLinks: buildResourceLinksRecord(),\n };\n schema.parse(dataToValidate);\n setErrors({});\n return true;\n } catch (error) {\n if (error instanceof ZodError) {\n const newErrors: Record<string, string> = {};\n error.issues.forEach((issue) => {\n const path = issue.path.join('.');\n newErrors[path] = issue.message;\n });\n setErrors(newErrors);\n }\n return false;\n }\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (!validate()) {\n return;\n }\n\n const socialLinksRecord = buildSocialLinksRecord();\n const resourceLinksRecord = buildResourceLinksRecord();\n\n const submitData = product\n ? {\n // Update only changed fields\n name: formData.name !== product.name ? formData.name : undefined,\n description:\n formData.description !== product.description ? formData.description : undefined,\n status: formData.status !== product.status ? formData.status : undefined,\n logoUrl: formData.logoUrl !== product.logoUrl ? formData.logoUrl : undefined,\n website: formData.website !== product.website ? formData.website : undefined,\n appUrl: formData.appUrl !== product.appUrl ? formData.appUrl : undefined,\n docsUrl: formData.docsUrl !== product.docsUrl ? formData.docsUrl : undefined,\n githubUrl: formData.githubUrl !== product.githubUrl ? formData.githubUrl : undefined,\n statusPageUrl:\n formData.statusPageUrl !== product.statusPageUrl ? formData.statusPageUrl : undefined,\n contactEmail:\n formData.contactEmail !== (product.contactEmail || '')\n ? formData.contactEmail\n : undefined,\n supportEmail:\n formData.supportEmail !== (product.supportEmail || '')\n ? formData.supportEmail\n : undefined,\n contactPhone:\n formData.contactPhone !== (product.contactPhone || '')\n ? formData.contactPhone\n : undefined,\n contactAddress:\n formData.contactAddress !== (product.contactAddress || '')\n ? formData.contactAddress\n : undefined,\n seoTitle: formData.seoTitle !== (product.seoTitle || '') ? formData.seoTitle : undefined,\n seoDescription:\n formData.seoDescription !== (product.seoDescription || '')\n ? formData.seoDescription\n : undefined,\n seoKeywords:\n formData.seoKeywords !== (product.seoKeywords || '') ? formData.seoKeywords : undefined,\n ogImage: formData.ogImage !== (product.ogImage || '') ? formData.ogImage : undefined,\n appStoreUrl:\n formData.appStoreUrl !== (product.appStoreUrl || '') ? formData.appStoreUrl : undefined,\n playStoreUrl:\n formData.playStoreUrl !== (product.playStoreUrl || '')\n ? formData.playStoreUrl\n : undefined,\n socialLinks: socialLinksRecord,\n resourceLinks: resourceLinksRecord,\n tags,\n // reCAPTCHA keys from Integrations section\n ...(() => {\n const form = e.target as HTMLFormElement;\n const siteKey = (form.elements.namedItem('recaptchaSiteKey') as HTMLInputElement)\n ?.value;\n const secretKey = (form.elements.namedItem('recaptchaSecretKey') as HTMLInputElement)\n ?.value;\n const result: Record<string, string | undefined> = {};\n if (siteKey && siteKey !== (product.recaptchaSiteKey || ''))\n result.recaptchaSiteKey = siteKey;\n if (secretKey) result.recaptchaSecretKey = secretKey;\n return result;\n })(),\n }\n : {\n // Create with all fields\n name: formData.name,\n slug: formData.slug,\n description: formData.description || undefined,\n status: formData.status,\n logoUrl: formData.logoUrl || undefined,\n website: formData.website || undefined,\n appUrl: formData.appUrl || undefined,\n docsUrl: formData.docsUrl || undefined,\n githubUrl: formData.githubUrl || undefined,\n statusPageUrl: formData.statusPageUrl || undefined,\n contactEmail: formData.contactEmail || undefined,\n supportEmail: formData.supportEmail || undefined,\n contactPhone: formData.contactPhone || undefined,\n contactAddress: formData.contactAddress || undefined,\n seoTitle: formData.seoTitle || undefined,\n seoDescription: formData.seoDescription || undefined,\n seoKeywords: formData.seoKeywords || undefined,\n ogImage: formData.ogImage || undefined,\n appStoreUrl: formData.appStoreUrl || undefined,\n playStoreUrl: formData.playStoreUrl || undefined,\n socialLinks: socialLinksRecord,\n resourceLinks: resourceLinksRecord,\n tags,\n };\n\n await onSubmit(submitData);\n };\n\n const inputClassName = `\n w-full px-3 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n placeholder:text-text-tertiary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n disabled:bg-bg-sunken disabled:cursor-not-allowed\n transition-all duration-200\n `;\n\n const sectionHeaderClassName = `\n flex items-center gap-2 w-full text-left\n text-sm font-semibold text-text-secondary uppercase tracking-wider\n cursor-pointer hover:text-text-primary transition-colors duration-200\n `;\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-6 animate-in fade-in duration-200\">\n {/* Basic Information Section */}\n <div className=\"space-y-4\">\n <h3 className=\"text-sm font-semibold text-text-secondary uppercase tracking-wider\">\n {tr('products.basicInformation', 'Basic Information')}\n </h3>\n\n {/* Name */}\n <div>\n <label htmlFor=\"name\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.productName', 'Product Name')}{' '}\n <span className=\"text-[var(--color-status-error)]\">*</span>\n </label>\n <input\n id=\"name\"\n type=\"text\"\n value={formData.name}\n onChange={(e) => setFormData({ ...formData, name: e.target.value })}\n className={inputClassName}\n placeholder={tr('products.enterProductName', 'Enter product name')}\n disabled={loading}\n required\n />\n {errors.name && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.name}</p>\n )}\n </div>\n\n {/* Slug */}\n <div>\n <label htmlFor=\"slug\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.slug', 'Slug')}{' '}\n <span className=\"text-[var(--color-status-error)]\">*</span>\n </label>\n <input\n id=\"slug\"\n type=\"text\"\n value={formData.slug}\n onChange={(e) =>\n setFormData({ ...formData, slug: e.target.value.toLowerCase().replace(/\\s+/g, '-') })\n }\n className={inputClassName}\n placeholder=\"product-slug\"\n disabled={loading || !!product}\n required={!product}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.slugHint',\n 'Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.'\n )}\n </p>\n {errors.slug && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.slug}</p>\n )}\n </div>\n\n {/* Description */}\n <div>\n <label htmlFor=\"description\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.description', 'Description')}\n </label>\n <textarea\n id=\"description\"\n value={formData.description}\n onChange={(e) => setFormData({ ...formData, description: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder={tr('products.enterProductDescription', 'Enter product description')}\n disabled={loading}\n />\n </div>\n\n {/* Status */}\n <div>\n <label htmlFor=\"status\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.status', 'Status')}\n </label>\n <select\n id=\"status\"\n value={formData.status}\n onChange={(e) =>\n setFormData({\n ...formData,\n status: e.target.value as (typeof ProductStatus)[keyof typeof ProductStatus],\n })\n }\n className={inputClassName}\n disabled={loading}\n >\n <option value={ProductStatus.ACTIVE}>{tr('products.statusActive', 'Active')}</option>\n <option value={ProductStatus.DRAFT}>{tr('products.statusDraft', 'Draft')}</option>\n <option value={ProductStatus.WAITLIST}>\n {tr('products.statusWaitlist', 'Waitlist')}\n </option>\n <option value={ProductStatus.COMING_SOON}>\n {tr('products.statusComingSoon', 'Coming Soon')}\n </option>\n </select>\n </div>\n\n {/* Tags */}\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.tags', 'Tags')}\n </label>\n <TagInput value={tags} onChange={setTags} disabled={loading} />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr('products.tagsHint', 'Press Enter or comma to add a tag.')}\n </p>\n </div>\n </div>\n\n {/* URLs Section */}\n <div className=\"space-y-4 pt-4 border-t border-default\">\n <h3 className=\"text-sm font-semibold text-text-secondary uppercase tracking-wider\">\n {tr('products.urlsAndLinks', 'URLs & Links')}\n </h3>\n\n {/* Logo URL */}\n <div>\n <label htmlFor=\"logoUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.logoUrl', 'Logo URL')}\n </label>\n <input\n id=\"logoUrl\"\n type=\"url\"\n value={formData.logoUrl}\n onChange={(e) => setFormData({ ...formData, logoUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://example.com/logo.png\"\n disabled={loading}\n />\n {errors.logoUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.logoUrl}</p>\n )}\n </div>\n\n {/* App URL - Important for ProductSwitcher */}\n <div>\n <label htmlFor=\"appUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.appUrl', 'App URL')}{' '}\n <span className=\"text-[var(--color-status-warning)]\">\n {tr('products.requiredForProductSwitcher', '(Required for product switcher)')}\n </span>\n </label>\n <input\n id=\"appUrl\"\n type=\"url\"\n value={formData.appUrl}\n onChange={(e) => setFormData({ ...formData, appUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://app.product.com/\"\n disabled={loading}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.appUrlHint',\n \"The main application URL. Products without an App URL won't appear in the product switcher.\"\n )}\n </p>\n {errors.appUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.appUrl}</p>\n )}\n </div>\n\n {/* Website URL */}\n <div>\n <label htmlFor=\"website\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.websiteUrl', 'Website URL')}\n </label>\n <input\n id=\"website\"\n type=\"url\"\n value={formData.website}\n onChange={(e) => setFormData({ ...formData, website: e.target.value })}\n className={inputClassName}\n placeholder=\"https://product.com/\"\n disabled={loading}\n />\n {errors.website && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.website}</p>\n )}\n </div>\n\n {/* Docs URL */}\n <div>\n <label htmlFor=\"docsUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.documentationUrl', 'Documentation URL')}\n </label>\n <input\n id=\"docsUrl\"\n type=\"url\"\n value={formData.docsUrl}\n onChange={(e) => setFormData({ ...formData, docsUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://docs.product.com/\"\n disabled={loading}\n />\n {errors.docsUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.docsUrl}</p>\n )}\n </div>\n\n {/* GitHub URL */}\n <div>\n <label htmlFor=\"githubUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.githubUrl', 'GitHub URL')}\n </label>\n <input\n id=\"githubUrl\"\n type=\"url\"\n value={formData.githubUrl}\n onChange={(e) => setFormData({ ...formData, githubUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://github.com/org/repo\"\n disabled={loading}\n />\n {errors.githubUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.githubUrl}</p>\n )}\n </div>\n\n {/* Status Page URL */}\n <div>\n <label\n htmlFor=\"statusPageUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.statusPageUrl', 'Status Page URL')}\n </label>\n <input\n id=\"statusPageUrl\"\n type=\"url\"\n value={formData.statusPageUrl}\n onChange={(e) => setFormData({ ...formData, statusPageUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://status.product.com/\"\n disabled={loading}\n />\n {errors.statusPageUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.statusPageUrl}</p>\n )}\n </div>\n </div>\n\n {/* Contact Information Section */}\n <div className=\"space-y-4 pt-4 border-t border-default\">\n <button\n type=\"button\"\n onClick={() => toggleSection('contact')}\n className={sectionHeaderClassName}\n >\n {expandedSections.contact ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.contactInformation', 'Contact Information')}\n </button>\n\n {expandedSections.contact && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* Contact Email */}\n <div>\n <label\n htmlFor=\"contactEmail\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactEmail', 'Contact Email')}\n </label>\n <input\n id=\"contactEmail\"\n type=\"email\"\n value={formData.contactEmail}\n onChange={(e) => setFormData({ ...formData, contactEmail: e.target.value })}\n className={inputClassName}\n placeholder=\"contact@product.com\"\n disabled={loading}\n />\n {errors.contactEmail && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactEmail}\n </p>\n )}\n </div>\n\n {/* Support Email */}\n <div>\n <label\n htmlFor=\"supportEmail\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.supportEmail', 'Support Email')}\n </label>\n <input\n id=\"supportEmail\"\n type=\"email\"\n value={formData.supportEmail}\n onChange={(e) => setFormData({ ...formData, supportEmail: e.target.value })}\n className={inputClassName}\n placeholder=\"support@product.com\"\n disabled={loading}\n />\n {errors.supportEmail && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.supportEmail}\n </p>\n )}\n </div>\n\n {/* Contact Phone */}\n <div>\n <label\n htmlFor=\"contactPhone\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactPhone', 'Contact Phone')}\n </label>\n <input\n id=\"contactPhone\"\n type=\"tel\"\n value={formData.contactPhone}\n onChange={(e) => setFormData({ ...formData, contactPhone: e.target.value })}\n className={inputClassName}\n placeholder=\"+1 (555) 123-4567\"\n disabled={loading}\n />\n {errors.contactPhone && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactPhone}\n </p>\n )}\n </div>\n\n {/* Contact Address */}\n <div>\n <label\n htmlFor=\"contactAddress\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactAddress', 'Contact Address')}\n </label>\n <textarea\n id=\"contactAddress\"\n value={formData.contactAddress}\n onChange={(e) => setFormData({ ...formData, contactAddress: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder=\"123 Main St, City, State, ZIP\"\n disabled={loading}\n />\n {errors.contactAddress && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactAddress}\n </p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* SEO Metadata Section */}\n <div className=\"space-y-4 pt-4 border-t border-default\">\n <button\n type=\"button\"\n onClick={() => toggleSection('seo')}\n className={sectionHeaderClassName}\n >\n {expandedSections.seo ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.seoMetadata', 'SEO Metadata')}\n </button>\n\n {expandedSections.seo && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* SEO Title */}\n <div>\n <label\n htmlFor=\"seoTitle\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoTitle', 'SEO Title')}\n </label>\n <input\n id=\"seoTitle\"\n type=\"text\"\n value={formData.seoTitle}\n onChange={(e) => setFormData({ ...formData, seoTitle: e.target.value })}\n className={inputClassName}\n placeholder=\"Product SEO title\"\n disabled={loading}\n maxLength={100}\n />\n <div className=\"flex justify-between mt-1\">\n {errors.seoTitle ? (\n <p className=\"text-sm text-[var(--color-status-error)]\">{errors.seoTitle}</p>\n ) : (\n <span />\n )}\n <p className=\"text-xs text-text-tertiary\">{formData.seoTitle.length}/100</p>\n </div>\n </div>\n\n {/* SEO Description */}\n <div>\n <label\n htmlFor=\"seoDescription\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoDescription', 'SEO Description')}\n </label>\n <textarea\n id=\"seoDescription\"\n value={formData.seoDescription}\n onChange={(e) => setFormData({ ...formData, seoDescription: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder={tr(\n 'products.seoDescriptionPlaceholder',\n 'Brief description for search engines'\n )}\n disabled={loading}\n maxLength={300}\n />\n <div className=\"flex justify-between mt-1\">\n {errors.seoDescription ? (\n <p className=\"text-sm text-[var(--color-status-error)]\">\n {errors.seoDescription}\n </p>\n ) : (\n <span />\n )}\n <p className=\"text-xs text-text-tertiary\">{formData.seoDescription.length}/300</p>\n </div>\n </div>\n\n {/* SEO Keywords */}\n <div>\n <label\n htmlFor=\"seoKeywords\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoKeywords', 'SEO Keywords')}\n </label>\n <input\n id=\"seoKeywords\"\n type=\"text\"\n value={formData.seoKeywords}\n onChange={(e) => setFormData({ ...formData, seoKeywords: e.target.value })}\n className={inputClassName}\n placeholder=\"keyword1, keyword2, keyword3\"\n disabled={loading}\n maxLength={200}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.seoKeywordsHint',\n 'Comma-separated keywords for search engine optimization.'\n )}\n </p>\n {errors.seoKeywords && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.seoKeywords}\n </p>\n )}\n </div>\n\n {/* OG Image */}\n <div>\n <label htmlFor=\"ogImage\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.ogImageUrl', 'OG Image URL')}\n </label>\n <input\n id=\"ogImage\"\n type=\"url\"\n value={formData.ogImage}\n onChange={(e) => setFormData({ ...formData, ogImage: e.target.value })}\n className={inputClassName}\n placeholder=\"https://example.com/og-image.png\"\n disabled={loading}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr('products.ogImageHint', 'Open Graph image used when sharing on social media.')}\n </p>\n {errors.ogImage && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.ogImage}</p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* App Store Links Section */}\n <div className=\"space-y-4 pt-4 border-t border-default\">\n <button\n type=\"button\"\n onClick={() => toggleSection('appStore')}\n className={sectionHeaderClassName}\n >\n {expandedSections.appStore ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.appStoreLinks', 'App Store Links')}\n </button>\n\n {expandedSections.appStore && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* Apple App Store URL */}\n <div>\n <label\n htmlFor=\"appStoreUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.appleAppStoreUrl', 'Apple App Store URL')}\n </label>\n <input\n id=\"appStoreUrl\"\n type=\"url\"\n value={formData.appStoreUrl}\n onChange={(e) => setFormData({ ...formData, appStoreUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://apps.apple.com/app/...\"\n disabled={loading}\n />\n {errors.appStoreUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.appStoreUrl}\n </p>\n )}\n </div>\n\n {/* Google Play Store URL */}\n <div>\n <label\n htmlFor=\"playStoreUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.googlePlayStoreUrl', 'Google Play Store URL')}\n </label>\n <input\n id=\"playStoreUrl\"\n type=\"url\"\n value={formData.playStoreUrl}\n onChange={(e) => setFormData({ ...formData, playStoreUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://play.google.com/store/apps/details?id=...\"\n disabled={loading}\n />\n {errors.playStoreUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.playStoreUrl}\n </p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* Social Media Links Section */}\n <div className=\"space-y-4 pt-4 border-t border-default\">\n <button\n type=\"button\"\n onClick={() => toggleSection('social')}\n className={sectionHeaderClassName}\n >\n {expandedSections.social ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.socialMediaLinks', 'Social Media Links')}\n </button>\n\n {expandedSections.social && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {socialLinks.map((entry, index) => (\n <div key={entry.id} className=\"flex items-start gap-3\">\n <div className=\"flex-1\">\n <label\n htmlFor={`socialPlatform-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.platform', 'Platform')}\n </label>\n <input\n id={`socialPlatform-${index}`}\n type=\"text\"\n value={entry.platform}\n onChange={(e) => updateSocialLink(index, 'platform', e.target.value)}\n className={inputClassName}\n placeholder=\"e.g. twitter\"\n disabled={loading}\n />\n </div>\n <div className=\"flex-[2]\">\n <label\n htmlFor={`socialUrl-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.url', 'URL')}\n </label>\n <input\n id={`socialUrl-${index}`}\n type=\"url\"\n value={entry.url}\n onChange={(e) => updateSocialLink(index, 'url', e.target.value)}\n className={inputClassName}\n placeholder=\"https://twitter.com/yourproduct\"\n disabled={loading}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeSocialLink(index)}\n disabled={loading}\n className=\"\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n title={tr('products.removeSocialLink', 'Remove social link')}\n >\n <X size={16} />\n </button>\n </div>\n ))}\n\n <button\n type=\"button\"\n onClick={addSocialLink}\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n text-sm font-medium\n text-text-secondary\n border border-dashed border-default\n rounded-lg\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n <Plus size={16} />\n {tr('products.addSocialLink', 'Add Social Link')}\n </button>\n </div>\n )}\n </div>\n\n {/*\n * Resource Links Section\n * Identical shape to \"Social Media Links\" — a free-form list of\n * (resource-key, URL) rows. Surfaces in the website footer\n * \"Resources\" column via the SDK <ResourceLinks/> primitive. Known\n * resource keys the SDK renders today: `docs`, `community`,\n * `careers`, `team`, `companies`. Unknown keys are silently skipped\n * by the SDK, so admins can add new ones before the SDK ships an\n * icon/label for them.\n */}\n <div className=\"space-y-4 pt-4 border-t border-default\">\n <button\n type=\"button\"\n onClick={() => toggleSection('resources')}\n className={sectionHeaderClassName}\n >\n {expandedSections.resources ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.resourceLinks', 'Resource Links')}\n </button>\n\n {expandedSections.resources && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n <p className=\"text-xs text-text-tertiary\">\n {tr(\n 'products.resourceLinksHint',\n 'Footer \"Resources\" column. Known keys: docs, community, careers, team, companies. Unknown keys are ignored by the website until the SDK adds them.'\n )}\n </p>\n\n {resourceLinks.map((entry, index) => (\n <div key={entry.id} className=\"flex items-start gap-3\">\n <div className=\"flex-1\">\n <label\n htmlFor={`resourceKey-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.resource', 'Resource')}\n </label>\n <input\n id={`resourceKey-${index}`}\n type=\"text\"\n value={entry.resource}\n onChange={(e) => updateResourceLink(index, 'resource', e.target.value)}\n className={inputClassName}\n placeholder=\"e.g. docs\"\n disabled={loading}\n />\n </div>\n <div className=\"flex-[2]\">\n <label\n htmlFor={`resourceUrl-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.url', 'URL')}\n </label>\n <input\n id={`resourceUrl-${index}`}\n type=\"url\"\n value={entry.url}\n onChange={(e) => updateResourceLink(index, 'url', e.target.value)}\n className={inputClassName}\n placeholder=\"https://docs.yourproduct.com\"\n disabled={loading}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeResourceLink(index)}\n disabled={loading}\n className=\"\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n title={tr('products.removeResourceLink', 'Remove resource link')}\n >\n <X size={16} />\n </button>\n </div>\n ))}\n\n <button\n type=\"button\"\n onClick={addResourceLink}\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n text-sm font-medium\n text-text-secondary\n border border-dashed border-default\n rounded-lg\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n <Plus size={16} />\n {tr('products.addResourceLink', 'Add Resource Link')}\n </button>\n </div>\n )}\n </div>\n\n {/* Integrations Section */}\n <div className=\"border border-default rounded-lg overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => toggleSection('integrations')}\n className=\"\n w-full flex items-center gap-2 px-4 py-3\n text-sm font-semibold text-text-primary\n bg-surface hover:bg-bg-sunken\n transition-all duration-200\n \"\n >\n {expandedSections.integrations ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n <Shield size={16} className=\"text-text-secondary\" />\n {tr('products.integrations', 'Integrations')}\n <span className=\"text-xs font-normal text-text-secondary ml-1\">\n {tr('products.recaptcha', '(reCAPTCHA)')}\n </span>\n </button>\n\n {expandedSections.integrations && (\n <div className=\"px-4 pb-4 pt-2 space-y-4 border-t border-default\">\n <p className=\"text-xs text-text-secondary\">\n {tr(\n 'products.recaptchaDescription',\n 'reCAPTCHA v2 keys for bot protection on website forms (newsletter, contact). Site key is public, secret key is used for server-side verification only.'\n )}\n </p>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n {tr('products.recaptchaSiteKey', 'reCAPTCHA Site Key')}\n </label>\n <input\n type=\"text\"\n name=\"recaptchaSiteKey\"\n defaultValue={product?.recaptchaSiteKey || ''}\n disabled={loading}\n placeholder=\"6Lxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n className=\"\n w-full px-3 py-2\n bg-[var(--color-bg-input)] text-text-primary\n border border-default rounded-lg\n focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-bg)] focus:border-transparent\n disabled:opacity-50\n text-sm font-mono\n transition-all duration-200\n \"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'products.recaptchaSiteKeyHint',\n 'Public key — exposed in frontend. Register at google.com/recaptcha/admin'\n )}\n </p>\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n {tr('products.recaptchaSecretKey', 'reCAPTCHA Secret Key')}\n </label>\n <input\n type=\"password\"\n name=\"recaptchaSecretKey\"\n defaultValue=\"\"\n disabled={loading}\n placeholder={tr(\n 'products.enterSecretKeyPlaceholder',\n 'Enter secret key (leave empty to keep existing)'\n )}\n className=\"\n w-full px-3 py-2\n bg-[var(--color-bg-input)] text-text-primary\n border border-default rounded-lg\n focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-bg)] focus:border-transparent\n disabled:opacity-50\n text-sm font-mono\n transition-all duration-200\n \"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'products.recaptchaSecretKeyHint',\n 'Secret key — server-side only, never exposed via public API'\n )}\n </p>\n </div>\n </div>\n )}\n </div>\n\n {/* Form Actions */}\n <div className=\"flex gap-3 pt-4 border-t border-default\">\n <button\n type=\"submit\"\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-6 py-2.5\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n {loading && <Loader2 size={16} className=\"animate-spin\" />}\n {product\n ? tr('products.updateProduct', 'Update Product')\n : tr('products.createProduct', 'Create Product')}\n </button>\n\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={loading}\n className=\"\n px-6 py-2.5\n bg-transparent\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n {tr('productCommon.cancel', 'Cancel')}\n </button>\n </div>\n </form>\n );\n}\n"],"mappings":";;;;;;;;;AAgBA,IAAI,IAAc,GACZ,KAAe,MAAmB,GAAG,EAAO,GAAG,EAAE;AAsBvD,SAAS,EAAgB,GAAqD;AAC5E,KAAI,GAAS,eAAe,OAAO,EAAQ,eAAgB,UAAU;EACnE,IAAM,IAAU,OAAO,QAAQ,EAAQ,YAAY;AACnD,MAAI,EAAQ,SAA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iCACA,yJACD;OACC,CAAA;MAEJ,kBAAC,OAAD,EAAA,UAAA;OACE,kBAAC,SAAD;QAAO,WAAU;kBACd,EAAG,6BAA6B,qBAAqB;QAChD,CAAA;OACR,kBAAC,SAAD;QACE,MAAK;QACL,MAAK;QACL,cAAc,GAAS,oBAAoB;QAC3C,UAAU;QACV,aAAY;QACZ,WAAU;QASV,CAAA;OACF,kBAAC,KAAD;QAAG,WAAU;kBACV,EACC,iCACA,2EACD;QACC,CAAA;OACA,EAAA,CAAA;MAEN,kBAAC,OAAD,EAAA,UAAA;OACE,kBAAC,SAAD;QAAO,WAAU;kBACd,EAAG,+BAA+B,uBAAuB;QACpD,CAAA;OACR,kBAAC,SAAD;QACE,MAAK;QACL,MAAK;QACL,cAAa;QACb,UAAU;QACV,aAAa,EACX,sCACA,kDACD;QACD,WAAU;QASV,CAAA;OACF,kBAAC,KAAD;QAAG,WAAU;kBACV,EACC,mCACA,8DACD;QACC,CAAA;OACA,EAAA,CAAA;MACF;OAEJ;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,UAAD;KACE,MAAK;KACL,UAAU;KACV,WAAU;eAHZ,CAcG,KAAW,kBAAC,GAAD;MAAS,MAAM;MAAI,WAAU;MAAiB,CAAA,EACzD,IACG,EAAG,0BAA0B,iBAAiB,GAC9C,EAAG,0BAA0B,iBAAiB,CAC3C;QAET,kBAAC,UAAD;KACE,MAAK;KACL,SAAS;KACT,UAAU;KACV,WAAU;eAYT,EAAG,wBAAwB,SAAS;KAC9B,CAAA,CACL;;GACD"}
1
+ {"version":3,"file":"ProductForm.js","names":[],"sources":["../../../../../src/product-management/modules/products/components/ProductForm.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Loader2, ChevronDown, ChevronRight, Plus, X, Shield } from 'lucide-react';\nimport { ZodError } from 'zod';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport type { CreateProductInput, UpdateProductInput, PlatformProduct } from '../types';\nimport { ProductStatus } from '../types';\nimport { createProductSchema, updateProductSchema } from '../schemas';\nimport { TagInput } from '../../../shared/components/input/TagInput';\n\ninterface SocialLinkEntry {\n /** Stable client-side id so React list keys survive reorder/remove. */\n id: string;\n platform: string;\n url: string;\n}\n\nlet nextEntryId = 0;\nconst makeEntryId = (prefix: string) => `${prefix}-${++nextEntryId}`;\n\n/**\n * Resource-links share the same admin UI shape as social-links — a list of\n * (key, URL) rows the admin can freely add / remove. They're stored in their\n * own JSON column on `Product` so the website SDK can pick them up separately\n * from socials (different footer column, different default behaviour).\n */\ninterface ResourceLinkEntry {\n /** Stable client-side id so React list keys survive reorder/remove. */\n id: string;\n resource: string;\n url: string;\n}\n\ninterface ProductFormProps {\n product?: PlatformProduct | null;\n onSubmit: (data: CreateProductInput | UpdateProductInput) => Promise<void>;\n onCancel: () => void;\n loading?: boolean;\n}\n\nfunction initSocialLinks(product?: PlatformProduct | null): SocialLinkEntry[] {\n if (product?.socialLinks && typeof product.socialLinks === 'object') {\n const entries = Object.entries(product.socialLinks);\n if (entries.length > 0) {\n return entries.map(([platform, url]) => ({ id: makeEntryId('social'), platform, url }));\n }\n }\n return [];\n}\n\nfunction initResourceLinks(product?: PlatformProduct | null): ResourceLinkEntry[] {\n if (product?.resourceLinks && typeof product.resourceLinks === 'object') {\n const entries = Object.entries(product.resourceLinks);\n if (entries.length > 0) {\n return entries.map(([resource, url]) => ({ id: makeEntryId('resource'), resource, url }));\n }\n }\n return [];\n}\n\nexport function ProductForm({ product, onSubmit, onCancel, loading }: ProductFormProps) {\n const tr = useTr();\n\n const [formData, setFormData] = useState({\n name: product?.name || '',\n slug: product?.slug || '',\n description: product?.description || '',\n status: product?.status || ProductStatus.ACTIVE,\n logoUrl: product?.logoUrl || '',\n website: product?.website || '',\n appUrl: product?.appUrl || '',\n docsUrl: product?.docsUrl || '',\n githubUrl: product?.githubUrl || '',\n statusPageUrl: product?.statusPageUrl || '',\n contactEmail: product?.contactEmail || '',\n supportEmail: product?.supportEmail || '',\n contactPhone: product?.contactPhone || '',\n contactAddress: product?.contactAddress || '',\n seoTitle: product?.seoTitle || '',\n seoDescription: product?.seoDescription || '',\n seoKeywords: product?.seoKeywords || '',\n ogImage: product?.ogImage || '',\n appStoreUrl: product?.appStoreUrl || '',\n playStoreUrl: product?.playStoreUrl || '',\n });\n\n const [socialLinks, setSocialLinks] = useState<SocialLinkEntry[]>(() => initSocialLinks(product));\n const [resourceLinks, setResourceLinks] = useState<ResourceLinkEntry[]>(() =>\n initResourceLinks(product)\n );\n const [tags, setTags] = useState<string[]>(product?.tags ?? []);\n\n const [errors, setErrors] = useState<Record<string, string>>({});\n\n const [expandedSections, setExpandedSections] = useState<Record<string, boolean>>({\n contact: false,\n seo: false,\n appStore: false,\n social: false,\n resources: false,\n integrations: false,\n });\n\n const toggleSection = (section: string) => {\n setExpandedSections((prev) => ({ ...prev, [section]: !prev[section] }));\n };\n\n const addSocialLink = () => {\n setSocialLinks((prev) => [...prev, { id: makeEntryId('social'), platform: '', url: '' }]);\n };\n\n const removeSocialLink = (index: number) => {\n setSocialLinks((prev) => prev.filter((_, i) => i !== index));\n };\n\n const updateSocialLink = (index: number, field: 'platform' | 'url', value: string) => {\n setSocialLinks((prev) =>\n prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry))\n );\n };\n\n const buildSocialLinksRecord = (): Record<string, string> | undefined => {\n const filtered = socialLinks.filter(\n (entry) => entry.platform.trim() !== '' && entry.url.trim() !== ''\n );\n if (filtered.length === 0) return undefined;\n const record: Record<string, string> = {};\n filtered.forEach((entry) => {\n record[entry.platform.trim()] = entry.url.trim();\n });\n return record;\n };\n\n const addResourceLink = () => {\n setResourceLinks((prev) => [...prev, { id: makeEntryId('resource'), resource: '', url: '' }]);\n };\n\n const removeResourceLink = (index: number) => {\n setResourceLinks((prev) => prev.filter((_, i) => i !== index));\n };\n\n const updateResourceLink = (index: number, field: 'resource' | 'url', value: string) => {\n setResourceLinks((prev) =>\n prev.map((entry, i) => (i === index ? { ...entry, [field]: value } : entry))\n );\n };\n\n const buildResourceLinksRecord = (): Record<string, string> | undefined => {\n const filtered = resourceLinks.filter(\n (entry) => entry.resource.trim() !== '' && entry.url.trim() !== ''\n );\n if (filtered.length === 0) return undefined;\n const record: Record<string, string> = {};\n filtered.forEach((entry) => {\n record[entry.resource.trim()] = entry.url.trim();\n });\n return record;\n };\n\n const validate = () => {\n try {\n const schema = product ? updateProductSchema : createProductSchema;\n const dataToValidate = {\n ...formData,\n socialLinks: buildSocialLinksRecord(),\n resourceLinks: buildResourceLinksRecord(),\n };\n schema.parse(dataToValidate);\n setErrors({});\n return true;\n } catch (error) {\n if (error instanceof ZodError) {\n const newErrors: Record<string, string> = {};\n error.issues.forEach((issue) => {\n const path = issue.path.join('.');\n newErrors[path] = issue.message;\n });\n setErrors(newErrors);\n }\n return false;\n }\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (!validate()) {\n return;\n }\n\n const socialLinksRecord = buildSocialLinksRecord();\n const resourceLinksRecord = buildResourceLinksRecord();\n\n const submitData = product\n ? {\n // Update only changed fields\n name: formData.name !== product.name ? formData.name : undefined,\n description:\n formData.description !== product.description ? formData.description : undefined,\n status: formData.status !== product.status ? formData.status : undefined,\n logoUrl: formData.logoUrl !== product.logoUrl ? formData.logoUrl : undefined,\n website: formData.website !== product.website ? formData.website : undefined,\n appUrl: formData.appUrl !== product.appUrl ? formData.appUrl : undefined,\n docsUrl: formData.docsUrl !== product.docsUrl ? formData.docsUrl : undefined,\n githubUrl: formData.githubUrl !== product.githubUrl ? formData.githubUrl : undefined,\n statusPageUrl:\n formData.statusPageUrl !== product.statusPageUrl ? formData.statusPageUrl : undefined,\n contactEmail:\n formData.contactEmail !== (product.contactEmail || '')\n ? formData.contactEmail\n : undefined,\n supportEmail:\n formData.supportEmail !== (product.supportEmail || '')\n ? formData.supportEmail\n : undefined,\n contactPhone:\n formData.contactPhone !== (product.contactPhone || '')\n ? formData.contactPhone\n : undefined,\n contactAddress:\n formData.contactAddress !== (product.contactAddress || '')\n ? formData.contactAddress\n : undefined,\n seoTitle: formData.seoTitle !== (product.seoTitle || '') ? formData.seoTitle : undefined,\n seoDescription:\n formData.seoDescription !== (product.seoDescription || '')\n ? formData.seoDescription\n : undefined,\n seoKeywords:\n formData.seoKeywords !== (product.seoKeywords || '') ? formData.seoKeywords : undefined,\n ogImage: formData.ogImage !== (product.ogImage || '') ? formData.ogImage : undefined,\n appStoreUrl:\n formData.appStoreUrl !== (product.appStoreUrl || '') ? formData.appStoreUrl : undefined,\n playStoreUrl:\n formData.playStoreUrl !== (product.playStoreUrl || '')\n ? formData.playStoreUrl\n : undefined,\n socialLinks: socialLinksRecord,\n resourceLinks: resourceLinksRecord,\n tags,\n // reCAPTCHA keys from Integrations section\n ...(() => {\n const form = e.target as HTMLFormElement;\n const siteKey = (form.elements.namedItem('recaptchaSiteKey') as HTMLInputElement)\n ?.value;\n const secretKey = (form.elements.namedItem('recaptchaSecretKey') as HTMLInputElement)\n ?.value;\n const result: Record<string, string | undefined> = {};\n if (siteKey && siteKey !== (product.recaptchaSiteKey || ''))\n result.recaptchaSiteKey = siteKey;\n if (secretKey) result.recaptchaSecretKey = secretKey;\n return result;\n })(),\n }\n : {\n // Create with all fields\n name: formData.name,\n slug: formData.slug,\n description: formData.description || undefined,\n status: formData.status,\n logoUrl: formData.logoUrl || undefined,\n website: formData.website || undefined,\n appUrl: formData.appUrl || undefined,\n docsUrl: formData.docsUrl || undefined,\n githubUrl: formData.githubUrl || undefined,\n statusPageUrl: formData.statusPageUrl || undefined,\n contactEmail: formData.contactEmail || undefined,\n supportEmail: formData.supportEmail || undefined,\n contactPhone: formData.contactPhone || undefined,\n contactAddress: formData.contactAddress || undefined,\n seoTitle: formData.seoTitle || undefined,\n seoDescription: formData.seoDescription || undefined,\n seoKeywords: formData.seoKeywords || undefined,\n ogImage: formData.ogImage || undefined,\n appStoreUrl: formData.appStoreUrl || undefined,\n playStoreUrl: formData.playStoreUrl || undefined,\n socialLinks: socialLinksRecord,\n resourceLinks: resourceLinksRecord,\n tags,\n };\n\n await onSubmit(submitData);\n };\n\n const inputClassName = `\n w-full px-3 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n placeholder:text-text-tertiary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n disabled:bg-bg-sunken disabled:cursor-not-allowed\n transition-all duration-200\n `;\n\n const sectionHeaderClassName = `\n flex items-center gap-2 w-full text-left\n text-sm font-semibold text-text-secondary uppercase tracking-wider\n cursor-pointer hover:text-text-primary transition-colors duration-200\n `;\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-6 animate-in fade-in duration-200\">\n {/* Basic Information Section */}\n <div className=\"space-y-4\">\n <h3 className=\"text-sm font-semibold text-text-secondary uppercase tracking-wider\">\n {tr('products.basicInformation', 'Basic Information')}\n </h3>\n\n {/* Name */}\n <div>\n <label htmlFor=\"name\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.productName', 'Product Name')}{' '}\n <span className=\"text-[var(--color-status-error)]\">*</span>\n </label>\n <input\n id=\"name\"\n type=\"text\"\n value={formData.name}\n onChange={(e) => setFormData({ ...formData, name: e.target.value })}\n className={inputClassName}\n placeholder={tr('products.enterProductName', 'Enter product name')}\n disabled={loading}\n required\n />\n {errors.name && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.name}</p>\n )}\n </div>\n\n {/* Slug */}\n <div>\n <label htmlFor=\"slug\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.slug', 'Slug')}{' '}\n <span className=\"text-[var(--color-status-error)]\">*</span>\n </label>\n <input\n id=\"slug\"\n type=\"text\"\n value={formData.slug}\n onChange={(e) =>\n setFormData({ ...formData, slug: e.target.value.toLowerCase().replace(/\\s+/g, '-') })\n }\n className={inputClassName}\n placeholder=\"product-slug\"\n disabled={loading || !!product}\n required={!product}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.slugHint',\n 'Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.'\n )}\n </p>\n {errors.slug && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.slug}</p>\n )}\n </div>\n\n {/* Description */}\n <div>\n <label htmlFor=\"description\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.description', 'Description')}\n </label>\n <textarea\n id=\"description\"\n value={formData.description}\n onChange={(e) => setFormData({ ...formData, description: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder={tr('products.enterProductDescription', 'Enter product description')}\n disabled={loading}\n />\n </div>\n\n {/* Status */}\n <div>\n <label htmlFor=\"status\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.status', 'Status')}\n </label>\n <select\n id=\"status\"\n value={formData.status}\n onChange={(e) =>\n setFormData({\n ...formData,\n status: e.target.value as (typeof ProductStatus)[keyof typeof ProductStatus],\n })\n }\n className={inputClassName}\n disabled={loading}\n >\n <option value={ProductStatus.ACTIVE}>{tr('products.statusActive', 'Active')}</option>\n <option value={ProductStatus.DRAFT}>{tr('products.statusDraft', 'Draft')}</option>\n <option value={ProductStatus.WAITLIST}>\n {tr('products.statusWaitlist', 'Waitlist')}\n </option>\n <option value={ProductStatus.COMING_SOON}>\n {tr('products.statusComingSoon', 'Coming Soon')}\n </option>\n </select>\n </div>\n\n {/* Tags */}\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.tags', 'Tags')}\n </label>\n <TagInput value={tags} onChange={setTags} disabled={loading} />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr('products.tagsHint', 'Press Enter or comma to add a tag.')}\n </p>\n </div>\n </div>\n\n {/* URLs Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <h3 className=\"text-sm font-semibold text-text-secondary uppercase tracking-wider\">\n {tr('products.urlsAndLinks', 'URLs & Links')}\n </h3>\n\n {/* Logo URL */}\n <div>\n <label htmlFor=\"logoUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.logoUrl', 'Logo URL')}\n </label>\n <input\n id=\"logoUrl\"\n type=\"url\"\n value={formData.logoUrl}\n onChange={(e) => setFormData({ ...formData, logoUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://example.com/logo.png\"\n disabled={loading}\n />\n {errors.logoUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.logoUrl}</p>\n )}\n </div>\n\n {/* App URL - Important for ProductSwitcher */}\n <div>\n <label htmlFor=\"appUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.appUrl', 'App URL')}{' '}\n <span className=\"text-[var(--color-status-warning)]\">\n {tr('products.requiredForProductSwitcher', '(Required for product switcher)')}\n </span>\n </label>\n <input\n id=\"appUrl\"\n type=\"url\"\n value={formData.appUrl}\n onChange={(e) => setFormData({ ...formData, appUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://app.product.com/\"\n disabled={loading}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.appUrlHint',\n \"The main application URL. Products without an App URL won't appear in the product switcher.\"\n )}\n </p>\n {errors.appUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.appUrl}</p>\n )}\n </div>\n\n {/* Website URL */}\n <div>\n <label htmlFor=\"website\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.websiteUrl', 'Website URL')}\n </label>\n <input\n id=\"website\"\n type=\"url\"\n value={formData.website}\n onChange={(e) => setFormData({ ...formData, website: e.target.value })}\n className={inputClassName}\n placeholder=\"https://product.com/\"\n disabled={loading}\n />\n {errors.website && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.website}</p>\n )}\n </div>\n\n {/* Docs URL */}\n <div>\n <label htmlFor=\"docsUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.documentationUrl', 'Documentation URL')}\n </label>\n <input\n id=\"docsUrl\"\n type=\"url\"\n value={formData.docsUrl}\n onChange={(e) => setFormData({ ...formData, docsUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://docs.product.com/\"\n disabled={loading}\n />\n {errors.docsUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.docsUrl}</p>\n )}\n </div>\n\n {/* GitHub URL */}\n <div>\n <label htmlFor=\"githubUrl\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.githubUrl', 'GitHub URL')}\n </label>\n <input\n id=\"githubUrl\"\n type=\"url\"\n value={formData.githubUrl}\n onChange={(e) => setFormData({ ...formData, githubUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://github.com/org/repo\"\n disabled={loading}\n />\n {errors.githubUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.githubUrl}</p>\n )}\n </div>\n\n {/* Status Page URL */}\n <div>\n <label\n htmlFor=\"statusPageUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.statusPageUrl', 'Status Page URL')}\n </label>\n <input\n id=\"statusPageUrl\"\n type=\"url\"\n value={formData.statusPageUrl}\n onChange={(e) => setFormData({ ...formData, statusPageUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://status.product.com/\"\n disabled={loading}\n />\n {errors.statusPageUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.statusPageUrl}</p>\n )}\n </div>\n </div>\n\n {/* Contact Information Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('contact')}\n className={sectionHeaderClassName}\n >\n {expandedSections.contact ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.contactInformation', 'Contact Information')}\n </button>\n\n {expandedSections.contact && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* Contact Email */}\n <div>\n <label\n htmlFor=\"contactEmail\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactEmail', 'Contact Email')}\n </label>\n <input\n id=\"contactEmail\"\n type=\"email\"\n value={formData.contactEmail}\n onChange={(e) => setFormData({ ...formData, contactEmail: e.target.value })}\n className={inputClassName}\n placeholder=\"contact@product.com\"\n disabled={loading}\n />\n {errors.contactEmail && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactEmail}\n </p>\n )}\n </div>\n\n {/* Support Email */}\n <div>\n <label\n htmlFor=\"supportEmail\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.supportEmail', 'Support Email')}\n </label>\n <input\n id=\"supportEmail\"\n type=\"email\"\n value={formData.supportEmail}\n onChange={(e) => setFormData({ ...formData, supportEmail: e.target.value })}\n className={inputClassName}\n placeholder=\"support@product.com\"\n disabled={loading}\n />\n {errors.supportEmail && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.supportEmail}\n </p>\n )}\n </div>\n\n {/* Contact Phone */}\n <div>\n <label\n htmlFor=\"contactPhone\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactPhone', 'Contact Phone')}\n </label>\n <input\n id=\"contactPhone\"\n type=\"tel\"\n value={formData.contactPhone}\n onChange={(e) => setFormData({ ...formData, contactPhone: e.target.value })}\n className={inputClassName}\n placeholder=\"+1 (555) 123-4567\"\n disabled={loading}\n />\n {errors.contactPhone && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactPhone}\n </p>\n )}\n </div>\n\n {/* Contact Address */}\n <div>\n <label\n htmlFor=\"contactAddress\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.contactAddress', 'Contact Address')}\n </label>\n <textarea\n id=\"contactAddress\"\n value={formData.contactAddress}\n onChange={(e) => setFormData({ ...formData, contactAddress: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder=\"123 Main St, City, State, ZIP\"\n disabled={loading}\n />\n {errors.contactAddress && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.contactAddress}\n </p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* SEO Metadata Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('seo')}\n className={sectionHeaderClassName}\n >\n {expandedSections.seo ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.seoMetadata', 'SEO Metadata')}\n </button>\n\n {expandedSections.seo && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* SEO Title */}\n <div>\n <label\n htmlFor=\"seoTitle\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoTitle', 'SEO Title')}\n </label>\n <input\n id=\"seoTitle\"\n type=\"text\"\n value={formData.seoTitle}\n onChange={(e) => setFormData({ ...formData, seoTitle: e.target.value })}\n className={inputClassName}\n placeholder=\"Product SEO title\"\n disabled={loading}\n maxLength={100}\n />\n <div className=\"flex justify-between mt-1\">\n {errors.seoTitle ? (\n <p className=\"text-sm text-[var(--color-status-error)]\">{errors.seoTitle}</p>\n ) : (\n <span />\n )}\n <p className=\"text-xs text-text-tertiary\">{formData.seoTitle.length}/100</p>\n </div>\n </div>\n\n {/* SEO Description */}\n <div>\n <label\n htmlFor=\"seoDescription\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoDescription', 'SEO Description')}\n </label>\n <textarea\n id=\"seoDescription\"\n value={formData.seoDescription}\n onChange={(e) => setFormData({ ...formData, seoDescription: e.target.value })}\n rows={3}\n className={inputClassName}\n placeholder={tr(\n 'products.seoDescriptionPlaceholder',\n 'Brief description for search engines'\n )}\n disabled={loading}\n maxLength={300}\n />\n <div className=\"flex justify-between mt-1\">\n {errors.seoDescription ? (\n <p className=\"text-sm text-[var(--color-status-error)]\">\n {errors.seoDescription}\n </p>\n ) : (\n <span />\n )}\n <p className=\"text-xs text-text-tertiary\">{formData.seoDescription.length}/300</p>\n </div>\n </div>\n\n {/* SEO Keywords */}\n <div>\n <label\n htmlFor=\"seoKeywords\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.seoKeywords', 'SEO Keywords')}\n </label>\n <input\n id=\"seoKeywords\"\n type=\"text\"\n value={formData.seoKeywords}\n onChange={(e) => setFormData({ ...formData, seoKeywords: e.target.value })}\n className={inputClassName}\n placeholder=\"keyword1, keyword2, keyword3\"\n disabled={loading}\n maxLength={200}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr(\n 'products.seoKeywordsHint',\n 'Comma-separated keywords for search engine optimization.'\n )}\n </p>\n {errors.seoKeywords && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.seoKeywords}\n </p>\n )}\n </div>\n\n {/* OG Image */}\n <div>\n <label htmlFor=\"ogImage\" className=\"block text-sm font-medium text-text-primary mb-1\">\n {tr('products.ogImageUrl', 'OG Image URL')}\n </label>\n <input\n id=\"ogImage\"\n type=\"url\"\n value={formData.ogImage}\n onChange={(e) => setFormData({ ...formData, ogImage: e.target.value })}\n className={inputClassName}\n placeholder=\"https://example.com/og-image.png\"\n disabled={loading}\n />\n <p className=\"text-xs text-text-tertiary mt-1\">\n {tr('products.ogImageHint', 'Open Graph image used when sharing on social media.')}\n </p>\n {errors.ogImage && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{errors.ogImage}</p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* App Store Links Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('appStore')}\n className={sectionHeaderClassName}\n >\n {expandedSections.appStore ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.appStoreLinks', 'App Store Links')}\n </button>\n\n {expandedSections.appStore && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {/* Apple App Store URL */}\n <div>\n <label\n htmlFor=\"appStoreUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.appleAppStoreUrl', 'Apple App Store URL')}\n </label>\n <input\n id=\"appStoreUrl\"\n type=\"url\"\n value={formData.appStoreUrl}\n onChange={(e) => setFormData({ ...formData, appStoreUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://apps.apple.com/app/...\"\n disabled={loading}\n />\n {errors.appStoreUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.appStoreUrl}\n </p>\n )}\n </div>\n\n {/* Google Play Store URL */}\n <div>\n <label\n htmlFor=\"playStoreUrl\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.googlePlayStoreUrl', 'Google Play Store URL')}\n </label>\n <input\n id=\"playStoreUrl\"\n type=\"url\"\n value={formData.playStoreUrl}\n onChange={(e) => setFormData({ ...formData, playStoreUrl: e.target.value })}\n className={inputClassName}\n placeholder=\"https://play.google.com/store/apps/details?id=...\"\n disabled={loading}\n />\n {errors.playStoreUrl && (\n <p className=\"text-sm text-[var(--color-status-error)] mt-1\">\n {errors.playStoreUrl}\n </p>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* Social Media Links Section */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('social')}\n className={sectionHeaderClassName}\n >\n {expandedSections.social ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.socialMediaLinks', 'Social Media Links')}\n </button>\n\n {expandedSections.social && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n {socialLinks.map((entry, index) => (\n <div key={entry.id} className=\"flex items-start gap-3\">\n <div className=\"flex-1\">\n <label\n htmlFor={`socialPlatform-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.platform', 'Platform')}\n </label>\n <input\n id={`socialPlatform-${index}`}\n type=\"text\"\n value={entry.platform}\n onChange={(e) => updateSocialLink(index, 'platform', e.target.value)}\n className={inputClassName}\n placeholder=\"e.g. twitter\"\n disabled={loading}\n />\n </div>\n <div className=\"flex-[2]\">\n <label\n htmlFor={`socialUrl-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.url', 'URL')}\n </label>\n <input\n id={`socialUrl-${index}`}\n type=\"url\"\n value={entry.url}\n onChange={(e) => updateSocialLink(index, 'url', e.target.value)}\n className={inputClassName}\n placeholder=\"https://twitter.com/yourproduct\"\n disabled={loading}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeSocialLink(index)}\n disabled={loading}\n className=\"\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n title={tr('products.removeSocialLink', 'Remove social link')}\n >\n <X size={16} />\n </button>\n </div>\n ))}\n\n <button\n type=\"button\"\n onClick={addSocialLink}\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n text-sm font-medium\n text-text-secondary\n border border-dashed border-default\n rounded-lg\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n <Plus size={16} />\n {tr('products.addSocialLink', 'Add Social Link')}\n </button>\n </div>\n )}\n </div>\n\n {/*\n * Resource Links Section\n * Identical shape to \"Social Media Links\" — a free-form list of\n * (resource-key, URL) rows. Surfaces in the website footer\n * \"Resources\" column via the SDK <ResourceLinks/> primitive. Known\n * resource keys the SDK renders today: `docs`, `community`,\n * `careers`, `team`, `companies`. Unknown keys are silently skipped\n * by the SDK, so admins can add new ones before the SDK ships an\n * icon/label for them.\n */}\n <div className=\"space-y-4 pt-4 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={() => toggleSection('resources')}\n className={sectionHeaderClassName}\n >\n {expandedSections.resources ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n {tr('products.resourceLinks', 'Resource Links')}\n </button>\n\n {expandedSections.resources && (\n <div className=\"space-y-4 animate-in fade-in duration-200\">\n <p className=\"text-xs text-text-tertiary\">\n {tr(\n 'products.resourceLinksHint',\n 'Footer \"Resources\" column. Known keys: docs, community, careers, team, companies. Unknown keys are ignored by the website until the SDK adds them.'\n )}\n </p>\n\n {resourceLinks.map((entry, index) => (\n <div key={entry.id} className=\"flex items-start gap-3\">\n <div className=\"flex-1\">\n <label\n htmlFor={`resourceKey-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.resource', 'Resource')}\n </label>\n <input\n id={`resourceKey-${index}`}\n type=\"text\"\n value={entry.resource}\n onChange={(e) => updateResourceLink(index, 'resource', e.target.value)}\n className={inputClassName}\n placeholder=\"e.g. docs\"\n disabled={loading}\n />\n </div>\n <div className=\"flex-[2]\">\n <label\n htmlFor={`resourceUrl-${index}`}\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n {tr('products.url', 'URL')}\n </label>\n <input\n id={`resourceUrl-${index}`}\n type=\"url\"\n value={entry.url}\n onChange={(e) => updateResourceLink(index, 'url', e.target.value)}\n className={inputClassName}\n placeholder=\"https://docs.yourproduct.com\"\n disabled={loading}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => removeResourceLink(index)}\n disabled={loading}\n className=\"\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n title={tr('products.removeResourceLink', 'Remove resource link')}\n >\n <X size={16} />\n </button>\n </div>\n ))}\n\n <button\n type=\"button\"\n onClick={addResourceLink}\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n text-sm font-medium\n text-text-secondary\n border border-dashed border-default\n rounded-lg\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n <Plus size={16} />\n {tr('products.addResourceLink', 'Add Resource Link')}\n </button>\n </div>\n )}\n </div>\n\n {/* Integrations Section */}\n <div className=\"border border-default rounded-lg overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => toggleSection('integrations')}\n className=\"\n w-full flex items-center gap-2 px-4 py-3\n text-sm font-semibold text-text-primary\n bg-surface hover:bg-bg-sunken\n transition-all duration-200\n \"\n >\n {expandedSections.integrations ? <ChevronDown size={16} /> : <ChevronRight size={16} />}\n <Shield size={16} className=\"text-text-secondary\" />\n {tr('products.integrations', 'Integrations')}\n <span className=\"text-xs font-normal text-text-secondary ml-1\">\n {tr('products.recaptcha', '(reCAPTCHA)')}\n </span>\n </button>\n\n {expandedSections.integrations && (\n <div className=\"px-4 pb-4 pt-2 space-y-4 border-t border-border-seam\">\n <p className=\"text-xs text-text-secondary\">\n {tr(\n 'products.recaptchaDescription',\n 'reCAPTCHA v2 keys for bot protection on website forms (newsletter, contact). Site key is public, secret key is used for server-side verification only.'\n )}\n </p>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n {tr('products.recaptchaSiteKey', 'reCAPTCHA Site Key')}\n </label>\n <input\n type=\"text\"\n name=\"recaptchaSiteKey\"\n defaultValue={product?.recaptchaSiteKey || ''}\n disabled={loading}\n placeholder=\"6Lxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n className=\"\n w-full px-3 py-2\n bg-[var(--color-bg-input)] text-text-primary\n border border-default rounded-lg\n focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-bg)] focus:border-transparent\n disabled:opacity-50\n text-sm font-mono\n transition-all duration-200\n \"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'products.recaptchaSiteKeyHint',\n 'Public key — exposed in frontend. Register at google.com/recaptcha/admin'\n )}\n </p>\n </div>\n\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1.5\">\n {tr('products.recaptchaSecretKey', 'reCAPTCHA Secret Key')}\n </label>\n <input\n type=\"password\"\n name=\"recaptchaSecretKey\"\n defaultValue=\"\"\n disabled={loading}\n placeholder={tr(\n 'products.enterSecretKeyPlaceholder',\n 'Enter secret key (leave empty to keep existing)'\n )}\n className=\"\n w-full px-3 py-2\n bg-[var(--color-bg-input)] text-text-primary\n border border-default rounded-lg\n focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-bg)] focus:border-transparent\n disabled:opacity-50\n text-sm font-mono\n transition-all duration-200\n \"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'products.recaptchaSecretKeyHint',\n 'Secret key — server-side only, never exposed via public API'\n )}\n </p>\n </div>\n </div>\n )}\n </div>\n\n {/* Form Actions */}\n <div className=\"flex gap-3 pt-4 border-t border-border-seam\">\n <button\n type=\"submit\"\n disabled={loading}\n className=\"\n inline-flex items-center gap-2 px-6 py-2.5\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n {loading && <Loader2 size={16} className=\"animate-spin\" />}\n {product\n ? tr('products.updateProduct', 'Update Product')\n : tr('products.createProduct', 'Create Product')}\n </button>\n\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={loading}\n className=\"\n px-6 py-2.5\n bg-transparent\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n \"\n >\n {tr('productCommon.cancel', 'Cancel')}\n </button>\n </div>\n </form>\n );\n}\n"],"mappings":";;;;;;;;;AAgBA,IAAI,IAAc,GACZ,KAAe,MAAmB,GAAG,EAAO,GAAG,EAAE;AAsBvD,SAAS,EAAgB,GAAqD;AAC5E,KAAI,GAAS,eAAe,OAAO,EAAQ,eAAgB,UAAU;EACnE,IAAM,IAAU,OAAO,QAAQ,EAAQ,YAAY;AACnD,MAAI,EAAQ,SAAS,EACnB,QAAO,EAAQ,KAAK,CAAC,GAAU,QAAU;GAAE,IAAI,EAAY,SAAS;GAAE;GAAU;GAAK,EAAE;;AAG3F,QAAO,EAAE;;AAGX,SAAS,EAAkB,GAAuD;AAChF,KAAI,GAAS,iBAAiB,OAAO,EAAQ,iBAAkB,UAAU;EACvE,IAA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ACV,aAAY;QACZ,WAAU;QASV,CAAA;OACF,kBAAC,KAAD;QAAG,WAAU;kBACV,EACC,iCACA,2EACD;QACC,CAAA;OACA,EAAA,CAAA;MAEN,kBAAC,OAAD,EAAA,UAAA;OACE,kBAAC,SAAD;QAAO,WAAU;kBACd,EAAG,+BAA+B,uBAAuB;QACpD,CAAA;OACR,kBAAC,SAAD;QACE,MAAK;QACL,MAAK;QACL,cAAa;QACb,UAAU;QACV,aAAa,EACX,sCACA,kDACD;QACD,WAAU;QASV,CAAA;OACF,kBAAC,KAAD;QAAG,WAAU;kBACV,EACC,mCACA,8DACD;QACC,CAAA;OACA,EAAA,CAAA;MACF;OAEJ;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,UAAD;KACE,MAAK;KACL,UAAU;KACV,WAAU;eAHZ,CAcG,KAAW,kBAAC,GAAD;MAAS,MAAM;MAAI,WAAU;MAAiB,CAAA,EACzD,IACG,EAAG,0BAA0B,iBAAiB,GAC9C,EAAG,0BAA0B,iBAAiB,CAC3C;QAET,kBAAC,UAAD;KACE,MAAK;KACL,SAAS;KACT,UAAU;KACV,WAAU;eAYT,EAAG,wBAAwB,SAAS;KAC9B,CAAA,CACL;;GACD"}
@@ -107,7 +107,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
107
107
  return t.includes("team") || t.includes("business") || t.includes("enterprise");
108
108
  }, X = C.filter((e) => !Y(e.name)), Z = C.filter((e) => Y(e.name)), ie = X.filter((e) => e.duration === "monthly"), ae = X.filter((e) => e.duration === "yearly"), [Q, $] = r("individual");
109
109
  return /* @__PURE__ */ f("div", {
110
- className: "bg-surface border border-default rounded-lg p-6 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:shadow-[var(--shadow-elevation-2)] lg:col-span-2",
110
+ className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-[var(--shadow-pop)] lg:col-span-2",
111
111
  children: [
112
112
  /* @__PURE__ */ f("div", {
113
113
  className: "flex items-center justify-between mb-4",
@@ -466,7 +466,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
466
466
  /* @__PURE__ */ f("div", {
467
467
  className: "mb-4",
468
468
  children: [/* @__PURE__ */ f("span", {
469
- className: "text-3xl font-bold text-text-primary",
469
+ className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
470
470
  children: [t, e.price]
471
471
  }), /* @__PURE__ */ f("span", {
472
472
  className: "text-sm text-text-secondary ml-1",
@@ -474,7 +474,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
474
474
  })]
475
475
  }),
476
476
  e.features && e.features.length > 0 ? /* @__PURE__ */ f("div", {
477
- className: "space-y-2 border-t border-default pt-3",
477
+ className: "space-y-2 border-t border-border-seam pt-3",
478
478
  children: [e.features.slice(0, 6).map((e) => {
479
479
  let t = e.quota, n = e.quotaId;
480
480
  if (t) {
@@ -497,7 +497,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
497
497
  ]
498
498
  })]
499
499
  }) : /* @__PURE__ */ d("div", {
500
- className: "border-t border-default pt-3",
500
+ className: "border-t border-border-seam pt-3",
501
501
  children: /* @__PURE__ */ d("p", {
502
502
  className: "text-xs text-text-secondary italic",
503
503
  children: S("products.noFeaturesAssigned", "No features assigned")