@burdenoff/microfe-product 2026.529.1 → 2026.624.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 (53) hide show
  1. package/dist/product/pages/ProductCatalogPage.js +4 -4
  2. package/dist/product/pages/ProductCatalogPage.js.map +1 -1
  3. package/dist/product-management/modules/content-pages/components/ContentPageForm.js +6 -6
  4. package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
  5. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +3 -3
  6. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +11 -11
  8. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
  9. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +3 -3
  10. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
  11. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +3 -3
  12. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
  13. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +1 -1
  14. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
  15. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +9 -9
  16. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  17. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +3 -3
  18. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  19. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +2 -2
  20. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  21. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +9 -9
  22. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
  23. package/dist/product-management/modules/products/components/ProductForm.js +8 -8
  24. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  25. package/dist/product-management/modules/products/components/ProductPlans.js +6 -6
  26. package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
  27. package/dist/product-management/modules/products/components/ProductStatusBadge.js +1 -1
  28. package/dist/product-management/modules/products/components/ProductStatusBadge.js.map +1 -1
  29. package/dist/product-management/modules/products/pages/ProductDetailPage.js +3 -3
  30. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  31. package/dist/product-management/modules/products/pages/ProductsListPage.js +11 -11
  32. package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
  33. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +3 -3
  34. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  35. package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.js +1 -1
  36. package/dist/product-management/modules/shortcuts/components/ShortcutKeyBadge.js.map +1 -1
  37. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +4 -4
  38. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  39. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +11 -11
  40. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
  41. package/dist/product-management/shared/components/AuditHistoryTab.js +1 -1
  42. package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
  43. package/dist/product-management/shared/components/feedback/EmptyState.js +1 -1
  44. package/dist/product-management/shared/components/feedback/EmptyState.js.map +1 -1
  45. package/dist/product-management/shared/components/feedback/ErrorState.js +1 -1
  46. package/dist/product-management/shared/components/feedback/ErrorState.js.map +1 -1
  47. package/dist/product-management/shared/components/input/ProductCombobox.js +1 -1
  48. package/dist/product-management/shared/components/input/ProductCombobox.js.map +1 -1
  49. package/dist/product-management/shared/components/input/SearchInput.js +1 -1
  50. package/dist/product-management/shared/components/input/SearchInput.js.map +1 -1
  51. package/dist/shared/utils/renderMarkdown.js +1 -1
  52. package/dist/shared/utils/renderMarkdown.js.map +1 -1
  53. package/package.json +1 -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-300\">\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 hover:scale-[1.02] 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-muted 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-muted 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-300\">\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 hover:scale-[1.02] 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-muted 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-muted 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-muted 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-muted 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-muted 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;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,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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 { 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-300\">\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-300\">\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;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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ACP,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"}
@@ -177,7 +177,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
177
177
  resourceLinks: n,
178
178
  tags: k
179
179
  });
180
- }, K = "\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-muted disabled:cursor-not-allowed\n transition-all duration-200\n ", q = "\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 ";
180
+ }, K = "\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 ", q = "\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 ";
181
181
  return /* @__PURE__ */ m("form", {
182
182
  onSubmit: G,
183
183
  className: "space-y-6 animate-in fade-in duration-300",
@@ -815,7 +815,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
815
815
  type: "button",
816
816
  onClick: () => L(t),
817
817
  disabled: x,
818
- className: "\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-muted\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
818
+ 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 ",
819
819
  title: S("products.removeSocialLink", "Remove social link"),
820
820
  children: /* @__PURE__ */ p(f, { size: 16 })
821
821
  })
@@ -824,7 +824,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
824
824
  type: "button",
825
825
  onClick: I,
826
826
  disabled: x,
827
- 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-muted hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
827
+ 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 ",
828
828
  children: [/* @__PURE__ */ p(u, { size: 16 }), S("products.addSocialLink", "Add Social Link")]
829
829
  })]
830
830
  })]
@@ -882,7 +882,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
882
882
  type: "button",
883
883
  onClick: () => V(t),
884
884
  disabled: x,
885
- className: "\n mt-7 p-2\n text-text-tertiary\n hover:text-[var(--color-status-error)]\n rounded-lg\n hover:bg-muted\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
885
+ 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 ",
886
886
  title: S("products.removeResourceLink", "Remove resource link"),
887
887
  children: /* @__PURE__ */ p(f, { size: 16 })
888
888
  })
@@ -892,7 +892,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
892
892
  type: "button",
893
893
  onClick: B,
894
894
  disabled: x,
895
- 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-muted hover:text-text-primary\n transition-all duration-200\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
895
+ 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 ",
896
896
  children: [/* @__PURE__ */ p(u, { size: 16 }), S("products.addResourceLink", "Add Resource Link")]
897
897
  })
898
898
  ]
@@ -903,7 +903,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
903
903
  children: [/* @__PURE__ */ m("button", {
904
904
  type: "button",
905
905
  onClick: () => F("integrations"),
906
- 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-muted\n transition-all duration-200\n ",
906
+ 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 ",
907
907
  children: [
908
908
  N.integrations ? /* @__PURE__ */ p(s, { size: 16 }) : /* @__PURE__ */ p(c, { size: 16 }),
909
909
  /* @__PURE__ */ p(d, {
@@ -967,7 +967,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
967
967
  children: [/* @__PURE__ */ m("button", {
968
968
  type: "submit",
969
969
  disabled: x,
970
- 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 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
970
+ 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 ",
971
971
  children: [x && /* @__PURE__ */ p(l, {
972
972
  size: 16,
973
973
  className: "animate-spin"
@@ -976,7 +976,7 @@ function y({ product: h, onSubmit: y, onCancel: b, loading: x }) {
976
976
  type: "button",
977
977
  onClick: b,
978
978
  disabled: x,
979
- className: "\n px-6 py-2.5\n bg-transparent\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-muted\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
979
+ 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 ",
980
980
  children: S("productCommon.cancel", "Cancel")
981
981
  })]
982
982
  })
@@ -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-muted 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-300\">\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-muted\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-muted 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-muted\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-muted 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-muted\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 hover:scale-[1.02]\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-muted\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,IAAM,IAAU,OAAO,QAAQ,EAAQ,cAAc;AACrD,MAAI,EA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;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-300\">\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,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,IAAM,IAAU,OAAO,QAAQ,EAAQ,cAAc;AACrD,MAAI,EAAQ,SAAS,EACnB,QAAO,EAAQ,KAAK,CAAC,GAAU,QAAU;GAAE,IAAI,EAAY,WAAW;GAAE;GAAU;GAAK,EAAE;;AAG7F,QAAO,EAAE;;AAGX,SAAgB,EAAY,EAAE,YAAS,aAAU,aAAU,cAA6B;CACtF,IAAM,IAAK,GAAO,EAEZ,CAAC,GAAU,KAAe,EAAS;EACvC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Aa,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"}
@@ -125,7 +125,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
125
125
  }),
126
126
  A && !x && /* @__PURE__ */ f("form", {
127
127
  onSubmit: G,
128
- className: "mb-6 p-4 bg-muted rounded-lg border border-default",
128
+ className: "mb-6 p-4 bg-bg-sunken rounded-lg border border-default",
129
129
  children: [
130
130
  /* @__PURE__ */ d("h3", {
131
131
  className: "text-sm font-semibold text-text-primary mb-3",
@@ -224,7 +224,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
224
224
  }), w.length > 0 ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
225
225
  className: "space-y-1.5 max-h-32 overflow-y-auto",
226
226
  children: w.map((e) => /* @__PURE__ */ f("label", {
227
- className: "flex items-center gap-2 text-xs text-text-primary cursor-pointer hover:bg-muted/50 px-2 py-1 rounded",
227
+ className: "flex items-center gap-2 text-xs text-text-primary cursor-pointer hover:bg-bg-sunken/50 px-2 py-1 rounded",
228
228
  children: [/* @__PURE__ */ d("input", {
229
229
  type: "checkbox",
230
230
  checked: B.quotas.some((t) => t.quotaId === e.id),
@@ -427,7 +427,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
427
427
  return /* @__PURE__ */ f("div", {
428
428
  className: `
429
429
  relative rounded-xl border p-5 transition-all duration-200
430
- ${e.isActive ? "border-default bg-surface hover:shadow-md" : "border-default bg-muted/30 opacity-60"}
430
+ ${e.isActive ? "border-default bg-surface hover:shadow-md" : "border-default bg-bg-sunken/30 opacity-60"}
431
431
  ${n ? "border-[var(--color-action-primary-bg)] ring-1 ring-[var(--color-action-primary-bg)]/20" : ""}
432
432
  `,
433
433
  children: [
@@ -441,7 +441,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
441
441
  className: "text-base font-semibold text-text-primary",
442
442
  children: e.name
443
443
  }), /* @__PURE__ */ d("span", {
444
- className: `inline-flex items-center px-1.5 py-0.5 text-xs font-medium rounded-full mt-1 ${e.isActive ? "bg-[var(--color-status-success-subtle)] text-[var(--color-status-success)]" : "bg-muted text-text-secondary"}`,
444
+ className: `inline-flex items-center px-1.5 py-0.5 text-xs font-medium rounded-full mt-1 ${e.isActive ? "bg-[var(--color-status-success-subtle)] text-[var(--color-status-success)]" : "bg-bg-sunken text-text-secondary"}`,
445
445
  children: e.isActive ? S("products.statusActive", "Active") : S("products.statusInactive", "Inactive")
446
446
  })] }), !x && /* @__PURE__ */ f("div", {
447
447
  className: "flex items-center gap-0.5",
@@ -449,7 +449,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
449
449
  type: "button",
450
450
  onClick: () => K(e),
451
451
  title: e.isActive ? S("products.deactivate", "Deactivate") : S("products.activate", "Activate"),
452
- className: "p-1.5 rounded-lg hover:bg-muted transition-colors text-text-secondary hover:text-text-primary",
452
+ className: "p-1.5 rounded-lg hover:bg-bg-sunken transition-colors text-text-secondary hover:text-text-primary",
453
453
  children: e.isActive ? /* @__PURE__ */ d(te, {
454
454
  size: 16,
455
455
  className: "text-[var(--color-status-success)]"
@@ -458,7 +458,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
458
458
  type: "button",
459
459
  onClick: () => q(e),
460
460
  title: S("products.edit", "Edit"),
461
- className: "p-1.5 rounded-lg hover:bg-muted transition-colors text-text-secondary hover:text-text-primary",
461
+ className: "p-1.5 rounded-lg hover:bg-bg-sunken transition-colors text-text-secondary hover:text-text-primary",
462
462
  children: /* @__PURE__ */ d(o, { size: 14 })
463
463
  })]
464
464
  })]