payaza-storefront-layouts 1.0.47 → 1.0.49

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.
@@ -2,6 +2,7 @@ import { LayoutInventory } from './types';
2
2
  export * from './types';
3
3
  export * from './shared';
4
4
  export * as PayazaForm from './payaza-form';
5
+ export { getGlobalAssetSelectionHandler } from './payaza-form/AssetSelectionContext';
5
6
  /**
6
7
  * Helper to get the full inventory of all layouts
7
8
  * Now uses alignment-schemas instead of requirements JSON
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAGzB,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,eAOnC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAGzB,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,eAOnC,CAAC"}
@@ -3,6 +3,8 @@ export * from './types';
3
3
  export * from './shared';
4
4
  // Export PayazaForm editor
5
5
  export * as PayazaForm from './payaza-form';
6
+ // Also export asset selection handler directly for easier access
7
+ export { getGlobalAssetSelectionHandler } from './payaza-form/AssetSelectionContext';
6
8
  /**
7
9
  * Helper to get the full inventory of all layouts
8
10
  * Now uses alignment-schemas instead of requirements JSON
@@ -1 +1 @@
1
- {"version":3,"file":"AssetSelectionContext.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/AssetSelectionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,SAAS,EAAqB,MAAM,OAAO,CAAC;AAE9G,UAAU,0BAA0B;IAClC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uBAAuB,EAAE,OAAO,CAAC;CAClC;AAID,UAAU,2BAA2B;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAKD,eAAO,MAAM,8BAA8B,GAAI,SAAS,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,SAErF,CAAC;AAEF,eAAO,MAAM,8BAA8B,QAAO,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAE3E,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAkDxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,0BAYpC,CAAC"}
1
+ {"version":3,"file":"AssetSelectionContext.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/AssetSelectionContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,SAAS,EAAqB,MAAM,OAAO,CAAC;AAE9G,UAAU,0BAA0B;IAClC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uBAAuB,EAAE,OAAO,CAAC;CAClC;AAID,UAAU,2BAA2B;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAKD,eAAO,MAAM,8BAA8B,GAAI,SAAS,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,SAErF,CAAC;AAEF,eAAO,MAAM,8BAA8B,QAAO,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAE3E,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAsExE,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,0BAYpC,CAAC"}
@@ -15,26 +15,48 @@ export const AssetSelectionProvider = ({ children, onOpenAssets, assets, }) => {
15
15
  // Update ref when callback changes
16
16
  useEffect(() => {
17
17
  callbackRef.current = pendingCallback;
18
+ console.log('[AssetSelectionContext] Callback ref updated:', {
19
+ hasCallback: !!pendingCallback,
20
+ hasRef: !!callbackRef.current,
21
+ });
18
22
  }, [pendingCallback]);
19
23
  // Set up global handler that host app can call
24
+ // The handler always reads from callbackRef.current to get the latest callback
20
25
  useEffect(() => {
21
26
  const handler = (url) => {
27
+ console.log('[AssetSelectionContext] Global handler called with URL:', url, {
28
+ hasCallbackRef: !!callbackRef.current,
29
+ });
22
30
  if (callbackRef.current) {
31
+ console.log('[AssetSelectionContext] Invoking callback with URL:', url);
23
32
  callbackRef.current(url);
24
33
  setPendingCallback(null); // Clear callback after use
34
+ callbackRef.current = null; // Also clear ref
35
+ }
36
+ else {
37
+ console.warn('[AssetSelectionContext] No callback available when handler was called');
25
38
  }
26
39
  };
27
40
  setGlobalAssetSelectionHandler(handler);
41
+ console.log('[AssetSelectionContext] Global handler registered');
28
42
  return () => {
29
43
  setGlobalAssetSelectionHandler(null);
44
+ console.log('[AssetSelectionContext] Global handler cleared');
30
45
  };
31
46
  }, []);
32
47
  const onOpenAssetSelect = useCallback((callback) => {
33
48
  if (onOpenAssets) {
49
+ console.log('[AssetSelectionContext] onOpenAssetSelect called, storing callback');
34
50
  // Store the callback so the host app can call it when an asset is selected
35
51
  setPendingCallback(() => callback);
52
+ // Also update ref immediately for synchronous access
53
+ callbackRef.current = callback;
36
54
  // Open the asset library
37
55
  onOpenAssets();
56
+ console.log('[AssetSelectionContext] Asset library opened, callback stored');
57
+ }
58
+ else {
59
+ console.warn('[AssetSelectionContext] onOpenAssets not available');
38
60
  }
39
61
  }, [onOpenAssets]);
40
62
  const value = {
@@ -1 +1 @@
1
- {"version":3,"file":"PayazaFormEditor.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/PayazaFormEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAU/C,OAAO,EAA4B,eAAe,EAAgB,MAAM,mBAAmB,CAAC;AAQ5F,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAgyB5D,CAAC"}
1
+ {"version":3,"file":"PayazaFormEditor.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/PayazaFormEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAU/C,OAAO,EAA4B,eAAe,EAAgB,MAAM,mBAAmB,CAAC;AAQ5F,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkyB5D,CAAC"}
@@ -15,7 +15,7 @@ import { useDebounce } from '../../hooks/use-debounce';
15
15
  import { AIGenerateModal } from '../shared/AIGenerateModal';
16
16
  import { useAlertModal } from '../../components/ui/alert-modal';
17
17
  import { AssetSelectionProvider } from './AssetSelectionContext';
18
- export const PayazaFormEditor = ({ layoutId, initialData, inventory, onChange, onSave, onPublish, onBack, onBackToSettings, onOpenAssets, onBackToTheme, title, className = '', customWidgets, storeName, storeDescription, assets, }) => {
18
+ export const PayazaFormEditor = ({ layoutId, initialData, inventory, onChange, onSave, onPublish, onBack, onBackToSettings, onOpenAssets, onBackToTheme, title, className = '', customWidgets, storeName, storeDescription, assets, publishButtonText, }) => {
19
19
  const [activePageId, setActivePageId] = useState('home');
20
20
  const [data, setData] = useState(initialData);
21
21
  const dataRef = useRef(initialData);
@@ -479,7 +479,7 @@ export const PayazaFormEditor = ({ layoutId, initialData, inventory, onChange, o
479
479
  if (!layoutJson || !pageSchema) {
480
480
  return (_jsx("div", { className: "flex items-center justify-center h-full", children: _jsx("div", { className: "text-slate-400", children: "Layout not found" }) }));
481
481
  }
482
- return (_jsx(AssetSelectionProvider, { onOpenAssets: onOpenAssets, assets: assets, children: _jsxs("div", { className: `flex flex-col h-full bg-white ${className} font-sans antialiased text-slate-900`, children: [_jsx(EditorHeader, { layoutName: layoutJson.layoutName || layoutId, storeName: storeName, activePage: activePageId, pages: pages, onPageSwitch: setActivePageId, onSave: handleSave, onPublish: onPublish && hasChangesSincePublish ? handlePublish : undefined, onBack: onBack, onBackToSettings: onBackToSettings, onOpenAssets: onOpenAssets, onBackToTheme: onBackToTheme, onUndo: handleUndo, onRedo: handleRedo, canUndo: historyIndex > 0, canRedo: historyIndex < history.length - 1, viewMode: viewMode, onViewModeChange: setViewMode, editorType: "payaza-form", isSaving: isSaving, isPublishing: isPublishing, onGenerateAI: () => setIsAIModalOpen(true), isGeneratingAI: isGeneratingAI }), _jsx(AIGenerateModal, { isOpen: isAIModalOpen, onClose: () => setIsAIModalOpen(false), onGenerate: handleAIGenerate, initialContext: {
482
+ return (_jsx(AssetSelectionProvider, { onOpenAssets: onOpenAssets, assets: assets, children: _jsxs("div", { className: `flex flex-col h-full bg-white ${className} font-sans antialiased text-slate-900`, children: [_jsx(EditorHeader, { layoutName: layoutJson.layoutName || layoutId, storeName: storeName, activePage: activePageId, pages: pages, onPageSwitch: setActivePageId, onSave: handleSave, onPublish: onPublish && hasChangesSincePublish ? handlePublish : undefined, onBack: onBack, onBackToSettings: onBackToSettings, onOpenAssets: onOpenAssets, onBackToTheme: onBackToTheme, onUndo: handleUndo, onRedo: handleRedo, canUndo: historyIndex > 0, canRedo: historyIndex < history.length - 1, viewMode: viewMode, onViewModeChange: setViewMode, editorType: "payaza-form", isSaving: isSaving, isPublishing: isPublishing, onGenerateAI: () => setIsAIModalOpen(true), isGeneratingAI: isGeneratingAI, publishButtonText: publishButtonText }), _jsx(AIGenerateModal, { isOpen: isAIModalOpen, onClose: () => setIsAIModalOpen(false), onGenerate: handleAIGenerate, initialContext: {
483
483
  storeName: storeName || data?.name || '',
484
484
  storeDescription: storeDescription || data?.description || '',
485
485
  assets: assets || [],
@@ -1 +1 @@
1
- {"version":3,"file":"ImageField.d.ts","sourceRoot":"","sources":["../../../../src/editor/payaza-form/components/ImageField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsGhD,CAAC"}
1
+ {"version":3,"file":"ImageField.d.ts","sourceRoot":"","sources":["../../../../src/editor/payaza-form/components/ImageField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0GhD,CAAC"}
@@ -8,12 +8,16 @@ export const ImageField = ({ label, value, onChange, placeholder, }) => {
8
8
  const { onOpenAssetSelect, isAssetLibraryAvailable } = useAssetSelection();
9
9
  const handleReplace = React.useCallback(() => {
10
10
  if (isAssetLibraryAvailable) {
11
+ console.log('[ImageField] REPLACE clicked, opening asset library');
11
12
  // Open asset library with callback to replace image
12
13
  onOpenAssetSelect((selectedUrl) => {
14
+ console.log('[ImageField] Callback invoked with URL:', selectedUrl);
13
15
  onChange(selectedUrl);
16
+ console.log('[ImageField] Image field updated with URL:', selectedUrl);
14
17
  });
15
18
  }
16
19
  else {
20
+ console.warn('[ImageField] Asset library not available, clearing image');
17
21
  // Fallback: just clear the image if asset library is not available
18
22
  onChange('');
19
23
  }
@@ -2,7 +2,7 @@ export { PayazaFormEditor } from './PayazaFormEditor';
2
2
  export type { PayazaFormEditorProps } from './PayazaFormEditor';
3
3
  export { PayazaFormEditorFullPage } from './PayazaFormEditorFullPage';
4
4
  export type { PayazaFormEditorFullPageProps } from './PayazaFormEditorFullPage';
5
- export { getGlobalAssetSelectionHandler } from './AssetSelectionContext';
5
+ export { getGlobalAssetSelectionHandler, setGlobalAssetSelectionHandler } from './AssetSelectionContext';
6
6
  export * from './engine';
7
7
  export * from './data-transformer';
8
8
  export * from './layout-loader';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/payaza-form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzG,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export { PayazaFormEditor } from './PayazaFormEditor';
2
2
  export { PayazaFormEditorFullPage } from './PayazaFormEditorFullPage';
3
- export { getGlobalAssetSelectionHandler } from './AssetSelectionContext';
3
+ export { getGlobalAssetSelectionHandler, setGlobalAssetSelectionHandler } from './AssetSelectionContext';
4
4
  export * from './engine';
5
5
  export * from './data-transformer';
6
6
  export * from './layout-loader';
@@ -25,6 +25,7 @@ interface EditorHeaderProps {
25
25
  viewMode?: 'desktop' | 'tablet' | 'mobile';
26
26
  onViewModeChange?: (mode: 'desktop' | 'tablet' | 'mobile') => void;
27
27
  editorType?: 'payaza-form';
28
+ publishButtonText?: string;
28
29
  }
29
30
  export declare const EditorHeader: React.FC<EditorHeaderProps>;
30
31
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"EditorHeader.d.ts","sourceRoot":"","sources":["../../../src/editor/shared/EditorHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AA+ExE,UAAU,iBAAiB;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC3C,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,KAAK,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAWD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwWpD,CAAC"}
1
+ {"version":3,"file":"EditorHeader.d.ts","sourceRoot":"","sources":["../../../src/editor/shared/EditorHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AA+ExE,UAAU,iBAAiB;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC3C,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,KAAK,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAWD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyWpD,CAAC"}
@@ -31,7 +31,7 @@ const getPageIcon = (pageId) => {
31
31
  default: return _jsx(FileText, { className: "w-3.5 h-3.5" });
32
32
  }
33
33
  };
34
- export const EditorHeader = ({ layoutName, storeName, activePage, isSaving, isPublishing, onSave, onPublish, onBack, onBackToSettings, onOpenAssets, onBackToTheme, onUndo, onRedo, canUndo, canRedo, onGenerateAI, isGeneratingAI, pages, onPageSwitch, viewMode = 'desktop', onViewModeChange, editorType }) => {
34
+ export const EditorHeader = ({ layoutName, storeName, activePage, isSaving, isPublishing, onSave, onPublish, onBack, onBackToSettings, onOpenAssets, onBackToTheme, onUndo, onRedo, canUndo, canRedo, onGenerateAI, isGeneratingAI, pages, onPageSwitch, viewMode = 'desktop', onViewModeChange, editorType, publishButtonText = 'Publish' }) => {
35
35
  const [isPageSwitcherOpen, setIsPageSwitcherOpen] = useState(false);
36
36
  const scrollContainerRef = useRef(null);
37
37
  const [canScrollLeft, setCanScrollLeft] = useState(false);
@@ -106,7 +106,7 @@ export const EditorHeader = ({ layoutName, storeName, activePage, isSaving, isPu
106
106
  setIsPageSwitcherOpen(false);
107
107
  }, className: `w-full flex items-center justify-between px-3 py-2.5 rounded-xl transition-all ${activePage === page.id
108
108
  ? 'bg-slate-900 text-white shadow-lg shadow-slate-200'
109
- : 'text-slate-600 hover:bg-slate-50'}`, children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: activePage === page.id ? 'text-white' : 'text-slate-400', children: getPageIcon(page.id) }), _jsx("span", { className: `text-[10px] font-black uppercase tracking-widest`, children: page.name })] }), activePage === page.id && _jsx(Check, { className: "w-3.5 h-3.5", strokeWidth: 3 })] }, page.id))) })] })) })] }) }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [_jsxs("div", { className: "flex items-center mr-2", children: [_jsx(Tooltip, { text: "Desktop View", children: _jsx("button", { onClick: () => onViewModeChange?.('desktop'), className: `p-2 rounded-xl transition-all ${viewMode === 'desktop' ? 'bg-slate-100 text-slate-900' : 'text-slate-400 hover:text-slate-600 hover:bg-slate-50'}`, children: _jsx(Monitor, { size: 18, strokeWidth: 2.5 }) }) }), _jsx(Tooltip, { text: "Tablet View", children: _jsx("button", { onClick: () => onViewModeChange?.('tablet'), className: `p-2 rounded-xl transition-all ${viewMode === 'tablet' ? 'bg-slate-100 text-slate-900' : 'text-slate-400 hover:text-slate-600 hover:bg-slate-50'}`, children: _jsx(Tablet, { size: 18, strokeWidth: 2.5 }) }) }), _jsx(Tooltip, { text: "Mobile View", children: _jsx("button", { onClick: () => onViewModeChange?.('mobile'), className: `p-2 rounded-xl transition-all ${viewMode === 'mobile' ? 'bg-slate-100 text-slate-900' : 'text-slate-400 hover:text-slate-600 hover:bg-slate-50'}`, children: _jsx(Smartphone, { size: 18, strokeWidth: 2.5 }) }) })] }), _jsx("div", { className: "h-8 w-px bg-slate-100 mx-1" }), _jsxs("div", { className: "flex items-center mr-2", children: [_jsx(Tooltip, { text: "Undo (Ctrl+Z)", children: _jsx("button", { onClick: onUndo, disabled: !canUndo, className: `p-2 rounded-xl transition-all ${canUndo ? 'text-slate-600 hover:bg-slate-50 hover:text-slate-900' : 'text-slate-200 cursor-not-allowed'}`, children: _jsx(Undo2, { size: 18, strokeWidth: 2.5 }) }) }), _jsx(Tooltip, { text: "Redo (Ctrl+Y)", children: _jsx("button", { onClick: onRedo, disabled: !canRedo, className: `p-2 rounded-xl transition-all ${canRedo ? 'text-slate-600 hover:bg-slate-50 hover:text-slate-900' : 'text-slate-200 cursor-not-allowed'}`, children: _jsx(Redo2, { size: 18, strokeWidth: 2.5 }) }) })] }), _jsx("div", { className: "h-8 w-px bg-slate-100 mx-1" }), _jsxs("div", { className: "flex items-center mr-2", children: [onBackToSettings && (_jsx(Tooltip, { text: "Store Settings", children: _jsx("button", { onClick: onBackToSettings, className: "p-2 rounded-xl text-slate-600 hover:text-slate-900 hover:bg-slate-50 transition-all", children: _jsx(Settings, { size: 18, strokeWidth: 2.5 }) }) })), onOpenAssets && (_jsx(Tooltip, { text: "Assets Library", children: _jsx("button", { onClick: onOpenAssets, className: "p-2 rounded-xl text-slate-600 hover:text-slate-900 hover:bg-slate-50 transition-all", children: _jsx(ImageIcon, { size: 18, strokeWidth: 2.5 }) }) })), onBackToTheme && (_jsx(Tooltip, { text: "Theme Selector", children: _jsx("button", { onClick: onBackToTheme, className: "p-2 rounded-xl text-slate-600 hover:text-slate-900 hover:bg-slate-50 transition-all", children: _jsx(Palette, { size: 18, strokeWidth: 2.5 }) }) }))] }), _jsx("div", { className: "h-8 w-px bg-slate-100 mx-1" }), onGenerateAI && (_jsx(Tooltip, { text: "AI Magic Generator", children: _jsx("button", { onClick: onGenerateAI, disabled: isGeneratingAI, className: "h-9 w-9 bg-gradient-to-r from-indigo-600 to-violet-600 text-white rounded-xl font-black flex items-center justify-center hover:from-indigo-700 hover:to-violet-700 transition-all shadow-md shadow-indigo-100 active:scale-[0.98] disabled:opacity-50", children: isGeneratingAI ? (_jsx("span", { className: "w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin" })) : (_jsx(Sparkles, { className: "w-3.5 h-3.5" })) }) })), _jsx(Tooltip, { text: "Save Changes", children: _jsxs("button", { onClick: onSave, disabled: isSaving, className: "h-9 px-4 bg-white text-slate-900 border border-slate-200 rounded-xl font-black text-[9px] uppercase tracking-[0.1em] flex items-center gap-2 hover:bg-slate-50 hover:shadow-md hover:shadow-slate-100 transition-all active:scale-[0.98] disabled:opacity-50", children: [isSaving ? (_jsx("span", { className: "w-3.5 h-3.5 border-2 border-slate-200 border-t-slate-800 rounded-full animate-spin" })) : (_jsx(Save, { className: "w-3.5 h-3.5", strokeWidth: 2.5 })), "Save Draft"] }) }), _jsx(Tooltip, { text: !onPublish ? "No changes to publish" : "Publish to Store", children: _jsxs("button", { onClick: onPublish, disabled: isPublishing || !onPublish, className: "h-9 px-5 bg-slate-900 text-white rounded-xl font-black text-[9px] uppercase tracking-[0.12em] flex items-center gap-2 hover:bg-black transition-all shadow-lg shadow-slate-200 active:scale-[0.98] disabled:opacity-50 disabled:bg-slate-200 disabled:text-slate-400 disabled:shadow-none", children: [isPublishing ? (_jsx("span", { className: "w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin" })) : (_jsx(Send, { className: "w-3.5 h-3.5", strokeWidth: 2.5 })), "Publish"] }) })] })] }), _jsx("style", { dangerouslySetInnerHTML: { __html: `
109
+ : 'text-slate-600 hover:bg-slate-50'}`, children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: activePage === page.id ? 'text-white' : 'text-slate-400', children: getPageIcon(page.id) }), _jsx("span", { className: `text-[10px] font-black uppercase tracking-widest`, children: page.name })] }), activePage === page.id && _jsx(Check, { className: "w-3.5 h-3.5", strokeWidth: 3 })] }, page.id))) })] })) })] }) }), _jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [_jsxs("div", { className: "flex items-center mr-2", children: [_jsx(Tooltip, { text: "Desktop View", children: _jsx("button", { onClick: () => onViewModeChange?.('desktop'), className: `p-2 rounded-xl transition-all ${viewMode === 'desktop' ? 'bg-slate-100 text-slate-900' : 'text-slate-400 hover:text-slate-600 hover:bg-slate-50'}`, children: _jsx(Monitor, { size: 18, strokeWidth: 2.5 }) }) }), _jsx(Tooltip, { text: "Tablet View", children: _jsx("button", { onClick: () => onViewModeChange?.('tablet'), className: `p-2 rounded-xl transition-all ${viewMode === 'tablet' ? 'bg-slate-100 text-slate-900' : 'text-slate-400 hover:text-slate-600 hover:bg-slate-50'}`, children: _jsx(Tablet, { size: 18, strokeWidth: 2.5 }) }) }), _jsx(Tooltip, { text: "Mobile View", children: _jsx("button", { onClick: () => onViewModeChange?.('mobile'), className: `p-2 rounded-xl transition-all ${viewMode === 'mobile' ? 'bg-slate-100 text-slate-900' : 'text-slate-400 hover:text-slate-600 hover:bg-slate-50'}`, children: _jsx(Smartphone, { size: 18, strokeWidth: 2.5 }) }) })] }), _jsx("div", { className: "h-8 w-px bg-slate-100 mx-1" }), _jsxs("div", { className: "flex items-center mr-2", children: [_jsx(Tooltip, { text: "Undo (Ctrl+Z)", children: _jsx("button", { onClick: onUndo, disabled: !canUndo, className: `p-2 rounded-xl transition-all ${canUndo ? 'text-slate-600 hover:bg-slate-50 hover:text-slate-900' : 'text-slate-200 cursor-not-allowed'}`, children: _jsx(Undo2, { size: 18, strokeWidth: 2.5 }) }) }), _jsx(Tooltip, { text: "Redo (Ctrl+Y)", children: _jsx("button", { onClick: onRedo, disabled: !canRedo, className: `p-2 rounded-xl transition-all ${canRedo ? 'text-slate-600 hover:bg-slate-50 hover:text-slate-900' : 'text-slate-200 cursor-not-allowed'}`, children: _jsx(Redo2, { size: 18, strokeWidth: 2.5 }) }) })] }), _jsx("div", { className: "h-8 w-px bg-slate-100 mx-1" }), _jsxs("div", { className: "flex items-center mr-2", children: [onBackToSettings && (_jsx(Tooltip, { text: "Store Settings", children: _jsx("button", { onClick: onBackToSettings, className: "p-2 rounded-xl text-slate-600 hover:text-slate-900 hover:bg-slate-50 transition-all", children: _jsx(Settings, { size: 18, strokeWidth: 2.5 }) }) })), onOpenAssets && (_jsx(Tooltip, { text: "Assets Library", children: _jsx("button", { onClick: onOpenAssets, className: "p-2 rounded-xl text-slate-600 hover:text-slate-900 hover:bg-slate-50 transition-all", children: _jsx(ImageIcon, { size: 18, strokeWidth: 2.5 }) }) })), onBackToTheme && (_jsx(Tooltip, { text: "Theme Selector", children: _jsx("button", { onClick: onBackToTheme, className: "p-2 rounded-xl text-slate-600 hover:text-slate-900 hover:bg-slate-50 transition-all", children: _jsx(Palette, { size: 18, strokeWidth: 2.5 }) }) }))] }), _jsx("div", { className: "h-8 w-px bg-slate-100 mx-1" }), onGenerateAI && (_jsx(Tooltip, { text: "AI Magic Generator", children: _jsx("button", { onClick: onGenerateAI, disabled: isGeneratingAI, className: "h-9 w-9 bg-gradient-to-r from-indigo-600 to-violet-600 text-white rounded-xl font-black flex items-center justify-center hover:from-indigo-700 hover:to-violet-700 transition-all shadow-md shadow-indigo-100 active:scale-[0.98] disabled:opacity-50", children: isGeneratingAI ? (_jsx("span", { className: "w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin" })) : (_jsx(Sparkles, { className: "w-3.5 h-3.5" })) }) })), _jsx(Tooltip, { text: "Save Changes", children: _jsxs("button", { onClick: onSave, disabled: isSaving, className: "h-9 px-4 bg-white text-slate-900 border border-slate-200 rounded-xl font-black text-[9px] uppercase tracking-[0.1em] flex items-center gap-2 hover:bg-slate-50 hover:shadow-md hover:shadow-slate-100 transition-all active:scale-[0.98] disabled:opacity-50", children: [isSaving ? (_jsx("span", { className: "w-3.5 h-3.5 border-2 border-slate-200 border-t-slate-800 rounded-full animate-spin" })) : (_jsx(Save, { className: "w-3.5 h-3.5", strokeWidth: 2.5 })), "Save Draft"] }) }), _jsx(Tooltip, { text: !onPublish ? "No changes to publish" : publishButtonText === "Update" ? "Update Store" : "Publish to Store", children: _jsxs("button", { onClick: onPublish, disabled: isPublishing || !onPublish, className: "h-9 px-5 bg-slate-900 text-white rounded-xl font-black text-[9px] uppercase tracking-[0.12em] flex items-center gap-2 hover:bg-black transition-all shadow-lg shadow-slate-200 active:scale-[0.98] disabled:opacity-50 disabled:bg-slate-200 disabled:text-slate-400 disabled:shadow-none", children: [isPublishing ? (_jsx("span", { className: "w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin" })) : (_jsx(Send, { className: "w-3.5 h-3.5", strokeWidth: 2.5 })), publishButtonText] }) })] })] }), _jsx("style", { dangerouslySetInnerHTML: { __html: `
110
110
  .overflow-x-auto::-webkit-scrollbar {
111
111
  display: none;
112
112
  }
@@ -94,6 +94,10 @@ export interface FullPageEditorProps extends BaseEditorProps {
94
94
  * Optional array of existing asset URLs passed from host app
95
95
  */
96
96
  assets?: string[];
97
+ /**
98
+ * Optional custom text for the publish button (e.g., "Update" for published stores)
99
+ */
100
+ publishButtonText?: string;
97
101
  }
98
102
  /**
99
103
  * Interface representing a page within a layout
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,EAAE,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,EAAE,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC"}
@@ -2,6 +2,6 @@ import { StoreConfig } from '../../../lib/store-types';
2
2
  interface FoodHomePageModernProps {
3
3
  storeConfig: StoreConfig;
4
4
  }
5
- export declare function FoodHomePageModern({ storeConfig: initialConfig }: FoodHomePageModernProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function FoodHomePageModern({ storeConfig }: FoodHomePageModernProps): import("react/jsx-runtime").JSX.Element;
6
6
  export {};
7
7
  //# sourceMappingURL=FoodHomePageModern.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FoodHomePageModern.d.ts","sourceRoot":"","sources":["../../../../src/layouts/food-modern/components/FoodHomePageModern.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAgB9D,UAAU,uBAAuB;IAC9B,WAAW,EAAE,WAAW,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,uBAAuB,2CAktBzF"}
1
+ {"version":3,"file":"FoodHomePageModern.d.ts","sourceRoot":"","sources":["../../../../src/layouts/food-modern/components/FoodHomePageModern.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAgB9D,UAAU,uBAAuB;IAC9B,WAAW,EAAE,WAAW,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,WAAW,EAAE,EAAE,uBAAuB,2CAmoB1E"}
@@ -7,48 +7,18 @@ import { useToast } from '../../../components/ui/toast';
7
7
  import { useStore } from '../../../lib/store-context';
8
8
  import { Star, Clock, MapPin, ChefHat, ArrowRight, Instagram, Facebook, Twitter, Utensils, Search, Menu as MenuIcon, Calendar, Users, Mail, Phone, CheckCircle, Flame, Wine, Coffee, X } from 'lucide-react';
9
9
  import Link from 'next/link';
10
- import { useState, useEffect, useCallback } from 'react';
10
+ import { useState, useEffect } from 'react';
11
11
  import { formatCurrency } from '../../../lib/utils';
12
12
  import { getLayoutText, getBannerImage, getLogoUrl, getAssetUrl } from '../../../lib/utils/asset-helpers';
13
13
  import { StoreLogo } from '../../../components/ui/store-logos';
14
14
  import { shouldUseAPI } from '../../../lib/utils/demo-detection';
15
15
  import { VideoPlayer } from '../../../components/ui/video-player';
16
16
  import { PromoBanner } from '../../shared/components/PromoBanner';
17
- export function FoodHomePageModern({ storeConfig: initialConfig }) {
18
- const { store, addToCart } = useStore();
19
- const storeConfig = store || initialConfig;
20
- // In preview mode, use mock items if none are available
21
- const isPreview = (typeof window !== 'undefined' && window.__IS_PREVIEW__) || storeConfig.layoutConfig?.isPreview;
22
- const categories = (storeConfig.categories && storeConfig.categories.length > 0)
23
- ? storeConfig.categories
24
- : (isPreview ? [
25
- { id: 'cat1', name: 'Starters', slug: 'starters' },
26
- { id: 'cat2', name: 'Mains', slug: 'mains' },
27
- { id: 'cat3', name: 'Desserts', slug: 'desserts' }
28
- ] : []);
29
- const menuItems = (storeConfig.menuItems && storeConfig.menuItems.length > 0)
30
- ? storeConfig.menuItems
31
- : (isPreview ? [
32
- {
33
- id: 'item1',
34
- name: 'Truffle Burger',
35
- description: 'Wagyu beef patty with black truffle sauce and brie cheese',
36
- price: 24.99,
37
- categoryId: 'cat2',
38
- image: 'https://images.unsplash.com/photo-1568901346375-23c9450c58cd?w=800&h=600&fit=crop&q=80',
39
- inStock: true
40
- },
41
- {
42
- id: 'item2',
43
- name: 'Seared Scallops',
44
- description: 'Pan-seared scallops with cauliflower puree',
45
- price: 18.99,
46
- categoryId: 'cat1',
47
- image: 'https://images.unsplash.com/photo-1546793665-c74683f339c1?w=800&h=600&fit=crop&q=80',
48
- inStock: true
49
- },
50
- ] : []);
17
+ export function FoodHomePageModern({ storeConfig }) {
18
+ const categories = storeConfig.categories || [];
19
+ const menuItems = storeConfig.menuItems || [];
51
20
  const layoutConfig = storeConfig.layoutConfig;
21
+ const { addToCart } = useStore();
52
22
  const { addToast } = useToast();
53
23
  const [scrolled, setScrolled] = useState(false);
54
24
  const [isReservationOpen, setIsReservationOpen] = useState(false);
@@ -58,7 +28,6 @@ export function FoodHomePageModern({ storeConfig: initialConfig }) {
58
28
  const [activeTab, setActiveTab] = useState('all');
59
29
  const [isSearchOpen, setIsSearchOpen] = useState(false);
60
30
  const [newsletterEmail, setNewsletterEmail] = useState('');
61
- const [resetReservationStep, setResetReservationStep] = useState(false);
62
31
  useEffect(() => {
63
32
  const handleScroll = () => {
64
33
  setScrolled(window.scrollY > 50);
@@ -66,48 +35,25 @@ export function FoodHomePageModern({ storeConfig: initialConfig }) {
66
35
  window.addEventListener('scroll', handleScroll);
67
36
  return () => window.removeEventListener('scroll', handleScroll);
68
37
  }, []);
69
- // Handle reservation submission and reset timers
70
- useEffect(() => {
71
- let submissionTimer;
72
- if (isSubmitting) {
73
- submissionTimer = setTimeout(() => {
74
- setIsSubmitting(false);
75
- setReservationStep(2);
76
- addToast('Table reserved successfully!', 'success');
77
- }, 1500);
78
- }
79
- return () => {
80
- if (submissionTimer)
81
- clearTimeout(submissionTimer);
82
- };
83
- }, [isSubmitting, addToast]);
84
- useEffect(() => {
85
- let resetTimer;
86
- if (resetReservationStep) {
87
- resetTimer = setTimeout(() => {
88
- setReservationStep(1);
89
- setResetReservationStep(false);
90
- }, 300);
91
- }
92
- return () => {
93
- if (resetTimer)
94
- clearTimeout(resetTimer);
95
- };
96
- }, [resetReservationStep]);
97
- const handleReservationSubmit = useCallback((e) => {
38
+ const handleReservationSubmit = (e) => {
98
39
  e.preventDefault();
99
40
  setIsSubmitting(true);
100
- }, []);
101
- const closeReservation = useCallback(() => {
41
+ setTimeout(() => {
42
+ setIsSubmitting(false);
43
+ setReservationStep(2);
44
+ addToast('Table reserved successfully!', 'success');
45
+ }, 1500);
46
+ };
47
+ const closeReservation = () => {
102
48
  setIsReservationOpen(false);
103
- setResetReservationStep(true);
104
- }, []);
105
- const scrollToMenu = useCallback(() => {
49
+ setTimeout(() => setReservationStep(1), 300);
50
+ };
51
+ const scrollToMenu = () => {
106
52
  const menuSection = document.getElementById('menu-section');
107
53
  if (menuSection) {
108
54
  menuSection.scrollIntoView({ behavior: 'smooth' });
109
55
  }
110
- }, []);
56
+ };
111
57
  const filteredItems = activeTab === 'all'
112
58
  ? menuItems
113
59
  : menuItems.filter(item => item.categoryId === activeTab);
@@ -129,7 +75,7 @@ export function FoodHomePageModern({ storeConfig: initialConfig }) {
129
75
  image: t.image || fallbackTestimonials[idx]?.image || '',
130
76
  }))
131
77
  : fallbackTestimonials;
132
- return (_jsxs("div", { className: "min-h-screen bg-[#0F0F0F] text-white font-sans selection:bg-orange-500 selection:text-white", children: [_jsx("nav", { className: `fixed top-0 left-0 right-0 z-40 transition-all duration-500 ${scrolled ? 'bg-[#0F0F0F]/95 backdrop-blur-xl border-b border-white/5 py-4' : 'bg-transparent py-8'}`, children: _jsxs("div", { className: "container mx-auto px-6 flex items-center justify-between", children: [getLogoUrl(storeConfig) ? (_jsx(Link, { href: `/${storeConfig.slug}`, className: "relative z-50", children: _jsx(StoreLogo, { storeConfig: storeConfig, className: "h-10 w-10 transition-all duration-300 hover:opacity-90", alt: storeConfig.name }) })) : (_jsxs(Link, { href: `/${storeConfig.slug}`, className: "text-2xl font-black tracking-tighter uppercase relative z-50 group", children: [storeConfig.name, _jsx("span", { className: "text-orange-500 group-hover:text-white transition-colors duration-300", children: "." })] })), _jsxs("div", { className: "hidden md:flex items-center gap-10 text-xs font-bold tracking-[0.2em] uppercase", children: [_jsx("button", { onClick: scrollToMenu, className: "hover:text-orange-500 transition-colors relative after:content-[''] after:absolute after:-bottom-2 after:left-0 after:w-0 after:h-0.5 after:bg-orange-500 hover:after:w-full after:transition-all", children: "Menu" }), _jsx("button", { onClick: () => setIsReservationOpen(true), className: "hover:text-orange-500 transition-colors relative after:content-[''] after:absolute after:-bottom-2 after:left-0 after:w-0 after:h-0.5 after:bg-orange-500 hover:after:w-full after:transition-all", children: "Reservations" }), _jsx(Link, { href: `/${storeConfig.slug}/about`, className: "hover:text-orange-500 transition-colors relative after:content-[''] after:absolute after:-bottom-2 after:left-0 after:w-0 after:h-0.5 after:bg-orange-500 hover:after:w-full after:transition-all", children: "Story" }), _jsx(Link, { href: `/${storeConfig.slug}/contact`, className: "hover:text-orange-500 transition-colors relative after:content-[''] after:absolute after:-bottom-2 after:left-0 after:w-0 after:h-0.5 after:bg-orange-500 hover:after:w-full after:transition-all", children: "Contact" })] }), _jsxs("div", { className: "flex items-center gap-6", children: [_jsx(Button, { variant: "ghost", size: "icon", className: "text-white hover:text-orange-500 hover:bg-white/5 rounded-full md:hidden", onClick: () => setIsMenuOpen(true), children: _jsx(MenuIcon, { className: "h-6 w-6" }) }), storeConfig.features.search && (_jsx(Button, { variant: "ghost", size: "icon", onClick: () => setIsSearchOpen(!isSearchOpen), className: "text-white hover:text-orange-500 hover:bg-white/5 rounded-full hidden md:flex", children: _jsx(Search, { className: "h-5 w-5" }) })), _jsx(Button, { onClick: () => setIsReservationOpen(true), className: "bg-white text-black hover:bg-orange-500 hover:text-white rounded-full px-8 font-bold uppercase tracking-wider text-xs h-10 transition-all duration-300 hidden sm:flex", children: "Book Table" })] })] }) }), isSearchOpen && storeConfig.features.search && (_jsx("div", { className: "fixed inset-0 z-50 bg-[#0F0F0F]/98 backdrop-blur-xl pt-20", children: _jsx("div", { className: "container mx-auto px-6", children: _jsxs("div", { className: "relative max-w-2xl mx-auto", children: [_jsx(Search, { className: "absolute left-4 top-1/2 -translate-y-1/2 h-6 w-6 text-gray-400" }), _jsx("input", { type: "text", placeholder: getLayoutText(storeConfig, 'header.searchPlaceholder', 'Search menu items...'), autoFocus: true, className: "w-full pl-14 pr-4 py-6 text-xl bg-transparent border-b-2 border-orange-500/50 text-white focus:outline-none focus:border-orange-500", onBlur: () => setIsSearchOpen(false) })] }) }) })), _jsx("div", { className: `fixed inset-0 z-50 bg-[#0F0F0F] transition-transform duration-500 ${isMenuOpen ? 'translate-x-0' : '-translate-x-full'}`, children: _jsxs("div", { className: "flex flex-col h-full p-8", children: [_jsxs("div", { className: "flex justify-between items-center mb-12", children: [!getLogoUrl(storeConfig) ? (_jsxs("span", { className: "text-2xl font-black uppercase", children: [storeConfig.name, _jsx("span", { className: "text-orange-500", children: "." })] })) : (_jsx(StoreLogo, { storeConfig: storeConfig, className: "h-10 w-10", alt: storeConfig.name })), _jsx("button", { onClick: () => setIsMenuOpen(false), className: "text-white hover:text-orange-500", children: _jsx(X, { className: "h-8 w-8" }) })] }), _jsxs("div", { className: "flex flex-col gap-8 text-2xl font-black uppercase tracking-tight", children: [_jsx("button", { onClick: () => { scrollToMenu(); setIsMenuOpen(false); }, className: "text-left hover:text-orange-500", children: "Menu" }), _jsx("button", { onClick: () => { setIsReservationOpen(true); setIsMenuOpen(false); }, className: "text-left hover:text-orange-500", children: "Reservations" }), _jsx(Link, { href: `/${storeConfig.slug}/about`, onClick: () => setIsMenuOpen(false), className: "hover:text-orange-500", children: "Story" }), _jsx(Link, { href: `/${storeConfig.slug}/contact`, onClick: () => setIsMenuOpen(false), className: "hover:text-orange-500", children: "Contact" })] })] }) }), _jsxs("section", { "data-section": "hero", className: "relative h-screen w-full overflow-hidden flex items-center justify-center", children: [_jsxs("div", { className: "absolute inset-0 z-0", children: [_jsx(VideoPlayer, { src: getAssetUrl(storeConfig, 'hero_video', "https://cdn.coverr.co/videos/coverr-chef-preparing-food-in-kitchen-5379/1080p.mp4"), poster: getBannerImage(storeConfig, 'hero_video_poster', "https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?q=80&w=2070&auto=format&fit=crop"), context: "background", className: "w-full h-full opacity-50 scale-105" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-[#0F0F0F] via-[#0F0F0F]/40 to-black/30" }), _jsx("div", { className: "absolute inset-0 bg-[url('https://www.transparenttextures.com/patterns/noise.png')] opacity-20 mix-blend-overlay" })] }), _jsxs("div", { className: "relative z-10 text-center px-4 max-w-5xl mx-auto space-y-10", children: [_jsxs("div", { className: "flex justify-center items-center gap-6 animate-fade-in-up", children: [_jsx("span", { className: "h-px w-16 bg-white/30" }), _jsxs("div", { className: "flex items-center gap-2 text-orange-500 uppercase tracking-[0.3em] text-xs font-bold", children: [_jsx(Star, { className: "h-3 w-3 fill-current" }), " ", layoutConfig?.sections?.hero?.badge || getLayoutText(storeConfig, 'food.ourPhilosophy', 'Michelin Star 2024')] }), _jsx("span", { className: "h-px w-16 bg-white/30" })] }), _jsxs("h1", { className: "text-5xl md:text-8xl lg:text-9xl font-black tracking-tighter leading-none uppercase text-white animate-fade-in-up delay-100", children: [layoutConfig?.sections?.hero?.title || getLayoutText(storeConfig, 'food.ourPhilosophy', 'Taste the Extraordinary'), " ", _jsx("br", {}), _jsx("span", { className: "text-transparent bg-clip-text bg-gradient-to-r from-orange-400 to-amber-200", children: layoutConfig?.sections?.hero?.titleHighlight || 'Extraordinary' })] }), _jsx("p", { className: "text-lg md:text-xl text-gray-300 max-w-xl mx-auto font-light leading-relaxed animate-fade-in-up delay-200 tracking-wide", children: layoutConfig?.sections?.hero?.subtitle || `${storeConfig.description} Where culinary art meets exceptional atmosphere.` }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-6 justify-center items-center pt-8 animate-fade-in-up delay-300", children: [_jsx(Button, { onClick: () => setIsReservationOpen(true), className: "h-14 px-10 bg-orange-600 hover:bg-orange-700 text-white text-sm font-bold uppercase tracking-[0.2em] rounded-full transition-all hover:scale-105 hover:shadow-[0_0_40px_rgba(234,88,12,0.3)]", children: layoutConfig?.sections?.hero?.primaryCTA || getLayoutText(storeConfig, 'food.reserveTable', 'Reserve Table') }), _jsx("div", { onClick: scrollToMenu, className: "w-14 h-14 rounded-full border border-white/20 flex items-center justify-center cursor-pointer hover:bg-white hover:text-black transition-all group", children: _jsx(ArrowRight, { className: "h-5 w-5 group-hover:rotate-90 transition-transform duration-300" }) })] })] }), _jsxs("div", { className: "absolute bottom-10 left-1/2 -translate-x-1/2 flex flex-col items-center gap-4 animate-pulse", children: [_jsx("span", { className: "text-[10px] uppercase tracking-[0.3em] text-gray-500", children: "Scroll" }), _jsx("div", { className: "w-px h-16 bg-gradient-to-b from-orange-500 to-transparent" })] })] }), layoutConfig?.sections?.about?.show !== false && (_jsxs("section", { "data-section": "about", className: "py-20 px-6 relative overflow-hidden", children: [_jsx("div", { className: "absolute top-0 right-0 w-1/3 h-full bg-white/5 skew-x-12 transform translate-x-20 pointer-events-none" }), _jsx("div", { className: "container mx-auto max-w-6xl relative z-10", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center", children: [_jsxs("div", { className: "relative", children: [_jsx("div", { className: "aspect-[4/5] rounded-none overflow-hidden grayscale hover:grayscale-0 transition-all duration-700", children: _jsx(ImageWithFallback, { src: getBannerImage(storeConfig, 'about_section_image', "https://images.unsplash.com/photo-1559339352-11d035aa65de?w=1200&q=80"), alt: "Chef", className: "w-full h-full object-cover" }) }), _jsxs("div", { className: "absolute -bottom-10 -right-10 bg-[#1A1A1A] p-8 border border-white/5 max-w-xs hidden md:block", children: [_jsx("p", { className: "font-serif italic text-2xl text-white mb-4", children: layoutConfig?.sections?.about?.quote || '"Cooking is an art, but patience is the key ingredient."' }), _jsx("p", { className: "text-orange-500 text-xs font-bold uppercase tracking-widest", children: layoutConfig?.sections?.about?.author || '— Head Chef Marco' })] })] }), _jsxs("div", { className: "space-y-8", children: [_jsx("span", { className: "text-orange-500 font-bold uppercase tracking-widest text-xs", children: layoutConfig?.sections?.about?.badge || getLayoutText(storeConfig, 'food.ourPhilosophy', 'Our Philosophy') }), _jsx("h2", { className: "text-4xl md:text-5xl font-bold leading-tight", children: layoutConfig?.sections?.about?.title || getLayoutText(storeConfig, 'food.ourPhilosophy', 'Crafting Memories Through Flavor') }), _jsx("p", { className: "text-gray-400 text-lg leading-relaxed", children: layoutConfig?.sections?.about?.description || getLayoutText(storeConfig, 'food.ourPhilosophy', 'We believe that dining is more than just eating; it\'s an experience that engages all senses. Our seasonal menu is carefully curated using locally sourced ingredients to bring you the freshest flavors of the region.') }), _jsxs("div", { className: "grid grid-cols-3 gap-8 pt-8 border-t border-white/10", children: [_jsxs("div", { children: [_jsx(Flame, { className: "h-8 w-8 text-orange-500 mb-4" }), _jsx("h4", { className: "font-bold text-lg", children: "Wood Fired" }), _jsx("p", { className: "text-sm text-gray-500 mt-2", children: "Authentic taste" })] }), _jsxs("div", { children: [_jsx(Wine, { className: "h-8 w-8 text-orange-500 mb-4" }), _jsx("h4", { className: "font-bold text-lg", children: "Fine Wines" }), _jsx("p", { className: "text-sm text-gray-500 mt-2", children: "Curated selection" })] }), _jsxs("div", { children: [_jsx(Coffee, { className: "h-8 w-8 text-orange-500 mb-4" }), _jsx("h4", { className: "font-bold text-lg", children: "Artisan Coffee" }), _jsx("p", { className: "text-sm text-gray-500 mt-2", children: "Roasted in-house" })] })] })] })] }) })] })), layoutConfig?.sections?.promoBanner?.show !== false && layoutConfig?.sections?.promoBanner && (_jsx(PromoBanner, { config: layoutConfig.sections.promoBanner, layoutStyle: "food", className: "my-20" })), _jsx("section", { id: "menu-section", "data-section": "categories", className: "py-20 bg-[#141414] border-t border-white/5", children: _jsxs("div", { className: "container mx-auto px-6 max-w-7xl", children: [_jsxs("div", { className: "text-center mb-12", children: [_jsx("span", { className: "text-orange-500 font-bold uppercase tracking-widest text-xs mb-4 block", children: "Discover" }), _jsx("h2", { className: "text-4xl md:text-5xl font-bold uppercase tracking-tight mb-8", children: layoutConfig?.sections?.categories?.title || getLayoutText(storeConfig, 'food.menuCategories', 'Our Menu') }), _jsxs("div", { className: "flex flex-wrap justify-center gap-4", children: [_jsx("button", { onClick: () => setActiveTab('all'), className: `px-8 py-3 rounded-full text-sm font-bold uppercase tracking-wider transition-all border ${activeTab === 'all' ? 'bg-white text-black border-white' : 'bg-transparent text-gray-400 border-white/10 hover:border-white/30'}`, children: "All" }), categories.map((cat) => (_jsx("button", { onClick: () => setActiveTab(cat.id), className: `px-8 py-3 rounded-full text-sm font-bold uppercase tracking-wider transition-all border ${activeTab === cat.id ? 'bg-white text-black border-white' : 'bg-transparent text-gray-400 border-white/10 hover:border-white/30'}`, children: cat.name }, cat.id)))] })] }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-16", children: filteredItems.map((item) => (_jsxs("div", { className: "group cursor-pointer", children: [_jsxs("div", { className: "aspect-square overflow-hidden rounded-full mb-6 border border-white/10 relative", children: [_jsx(ImageWithFallback, { src: item.image, alt: item.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110 group-hover:rotate-3", skeletonAspectRatio: "square" }), _jsx("div", { className: "hidden lg:flex absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity items-center justify-center", children: _jsx(Button, { className: "bg-orange-600 rounded-full px-6 hover:bg-orange-700", onClick: (e) => {
78
+ return (_jsxs("div", { className: "min-h-screen bg-[#0F0F0F] text-white font-sans selection:bg-orange-500 selection:text-white", children: [_jsx("nav", { className: `fixed top-0 left-0 right-0 z-40 transition-all duration-500 ${scrolled ? 'bg-[#0F0F0F]/95 backdrop-blur-xl border-b border-white/5 py-4' : 'bg-transparent py-8'}`, children: _jsxs("div", { className: "container mx-auto px-6 flex items-center justify-between", children: [getLogoUrl(storeConfig) ? (_jsx(Link, { href: `/${storeConfig.slug}`, className: "relative z-50", children: _jsx(StoreLogo, { storeConfig: storeConfig, className: "h-10 w-10 transition-all duration-300 hover:opacity-90", alt: storeConfig.name }) })) : (_jsxs(Link, { href: `/${storeConfig.slug}`, className: "text-2xl font-black tracking-tighter uppercase relative z-50 group", children: [storeConfig.name, _jsx("span", { className: "text-orange-500 group-hover:text-white transition-colors duration-300", children: "." })] })), _jsxs("div", { className: "hidden md:flex items-center gap-10 text-xs font-bold tracking-[0.2em] uppercase", children: [_jsx("button", { onClick: scrollToMenu, className: "hover:text-orange-500 transition-colors relative after:content-[''] after:absolute after:-bottom-2 after:left-0 after:w-0 after:h-0.5 after:bg-orange-500 hover:after:w-full after:transition-all", children: "Menu" }), _jsx("button", { onClick: () => setIsReservationOpen(true), className: "hover:text-orange-500 transition-colors relative after:content-[''] after:absolute after:-bottom-2 after:left-0 after:w-0 after:h-0.5 after:bg-orange-500 hover:after:w-full after:transition-all", children: "Reservations" }), _jsx(Link, { href: `/${storeConfig.slug}/about`, className: "hover:text-orange-500 transition-colors relative after:content-[''] after:absolute after:-bottom-2 after:left-0 after:w-0 after:h-0.5 after:bg-orange-500 hover:after:w-full after:transition-all", children: "Story" }), _jsx(Link, { href: `/${storeConfig.slug}/contact`, className: "hover:text-orange-500 transition-colors relative after:content-[''] after:absolute after:-bottom-2 after:left-0 after:w-0 after:h-0.5 after:bg-orange-500 hover:after:w-full after:transition-all", children: "Contact" })] }), _jsxs("div", { className: "flex items-center gap-6", children: [_jsx(Button, { variant: "ghost", size: "icon", className: "text-white hover:text-orange-500 hover:bg-white/5 rounded-full md:hidden", onClick: () => setIsMenuOpen(true), children: _jsx(MenuIcon, { className: "h-6 w-6" }) }), storeConfig.features.search && (_jsx(Button, { variant: "ghost", size: "icon", onClick: () => setIsSearchOpen(!isSearchOpen), className: "text-white hover:text-orange-500 hover:bg-white/5 rounded-full hidden md:flex", children: _jsx(Search, { className: "h-5 w-5" }) })), _jsx(Button, { onClick: () => setIsReservationOpen(true), className: "bg-white text-black hover:bg-orange-500 hover:text-white rounded-full px-8 font-bold uppercase tracking-wider text-xs h-10 transition-all duration-300 hidden sm:flex", children: "Book Table" })] })] }) }), isSearchOpen && storeConfig.features.search && (_jsx("div", { className: "fixed inset-0 z-50 bg-[#0F0F0F]/98 backdrop-blur-xl pt-20", children: _jsx("div", { className: "container mx-auto px-6", children: _jsxs("div", { className: "relative max-w-2xl mx-auto", children: [_jsx(Search, { className: "absolute left-4 top-1/2 -translate-y-1/2 h-6 w-6 text-gray-400" }), _jsx("input", { type: "text", placeholder: getLayoutText(storeConfig, 'header.searchPlaceholder', 'Search menu items...'), autoFocus: true, className: "w-full pl-14 pr-4 py-6 text-xl bg-transparent border-b-2 border-orange-500/50 text-white focus:outline-none focus:border-orange-500", onBlur: () => setIsSearchOpen(false) })] }) }) })), _jsx("div", { className: `fixed inset-0 z-50 bg-[#0F0F0F] transition-transform duration-500 ${isMenuOpen ? 'translate-x-0' : '-translate-x-full'}`, children: _jsxs("div", { className: "flex flex-col h-full p-8", children: [_jsxs("div", { className: "flex justify-between items-center mb-12", children: [!getLogoUrl(storeConfig) ? (_jsxs("span", { className: "text-2xl font-black uppercase", children: [storeConfig.name, _jsx("span", { className: "text-orange-500", children: "." })] })) : (_jsx(StoreLogo, { storeConfig: storeConfig, className: "h-10 w-10", alt: storeConfig.name })), _jsx("button", { onClick: () => setIsMenuOpen(false), className: "text-white hover:text-orange-500", children: _jsx(X, { className: "h-8 w-8" }) })] }), _jsxs("div", { className: "flex flex-col gap-8 text-2xl font-black uppercase tracking-tight", children: [_jsx("button", { onClick: () => { scrollToMenu(); setIsMenuOpen(false); }, className: "text-left hover:text-orange-500", children: "Menu" }), _jsx("button", { onClick: () => { setIsReservationOpen(true); setIsMenuOpen(false); }, className: "text-left hover:text-orange-500", children: "Reservations" }), _jsx(Link, { href: `/${storeConfig.slug}/about`, onClick: () => setIsMenuOpen(false), className: "hover:text-orange-500", children: "Story" }), _jsx(Link, { href: `/${storeConfig.slug}/contact`, onClick: () => setIsMenuOpen(false), className: "hover:text-orange-500", children: "Contact" })] })] }) }), _jsxs("section", { "data-section": "hero", className: "relative h-screen w-full overflow-hidden flex items-center justify-center bg-[#0F0F0F]", children: [_jsxs("div", { className: "absolute inset-0 z-0", children: [_jsx(VideoPlayer, { src: getAssetUrl(storeConfig, 'hero_video', "https://cdn.coverr.co/videos/coverr-chef-preparing-food-in-kitchen-5379/1080p.mp4"), poster: getBannerImage(storeConfig, 'hero_video_poster', "https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?q=80&w=2070&auto=format&fit=crop"), context: "background", className: "w-full h-full opacity-50 scale-105" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-[#0F0F0F] via-[#0F0F0F]/40 to-black/30" }), _jsx("div", { className: "absolute inset-0 bg-[url('https://www.transparenttextures.com/patterns/noise.png')] opacity-20 mix-blend-overlay" })] }), _jsxs("div", { className: "relative z-10 text-center px-4 max-w-5xl mx-auto space-y-10", children: [_jsxs("div", { className: "flex justify-center items-center gap-6 animate-fade-in-up", children: [_jsx("span", { className: "h-px w-16 bg-white/30" }), _jsxs("div", { className: "flex items-center gap-2 text-orange-500 uppercase tracking-[0.3em] text-xs font-bold", children: [_jsx(Star, { className: "h-3 w-3 fill-current" }), " ", getLayoutText(storeConfig, 'food.ourPhilosophy', 'Michelin Star 2024')] }), _jsx("span", { className: "h-px w-16 bg-white/30" })] }), _jsxs("h1", { className: "text-5xl md:text-8xl lg:text-9xl font-black tracking-tighter leading-none uppercase text-white animate-fade-in-up delay-100", children: [getLayoutText(storeConfig, 'food.ourPhilosophy', 'Taste the Extraordinary'), " ", _jsx("br", {}), _jsx("span", { className: "text-transparent bg-clip-text bg-gradient-to-r from-orange-400 to-amber-200", children: "Extraordinary" })] }), _jsxs("p", { className: "text-lg md:text-xl text-gray-300 max-w-xl mx-auto font-light leading-relaxed animate-fade-in-up delay-200 tracking-wide", children: [storeConfig.description, " Where culinary art meets exceptional atmosphere."] }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-6 justify-center items-center pt-8 animate-fade-in-up delay-300", children: [_jsx(Button, { onClick: () => setIsReservationOpen(true), className: "h-14 px-10 bg-orange-600 hover:bg-orange-700 text-white text-sm font-bold uppercase tracking-[0.2em] rounded-full transition-all hover:scale-105 hover:shadow-[0_0_40px_rgba(234,88,12,0.3)]", children: getLayoutText(storeConfig, 'food.reserveTable', 'Reserve Table') }), _jsx("div", { onClick: scrollToMenu, className: "w-14 h-14 rounded-full border border-white/20 flex items-center justify-center cursor-pointer hover:bg-white hover:text-black transition-all group", children: _jsx(ArrowRight, { className: "h-5 w-5 group-hover:rotate-90 transition-transform duration-300" }) })] })] }), _jsxs("div", { className: "absolute bottom-10 left-1/2 -translate-x-1/2 flex flex-col items-center gap-4 animate-pulse", children: [_jsx("span", { className: "text-[10px] uppercase tracking-[0.3em] text-gray-500", children: "Scroll" }), _jsx("div", { className: "w-px h-16 bg-gradient-to-b from-orange-500 to-transparent" })] })] }), layoutConfig?.sections?.story?.show !== false && (_jsxs("section", { className: "py-20 px-6 relative overflow-hidden", children: [_jsx("div", { className: "absolute top-0 right-0 w-1/3 h-full bg-white/5 skew-x-12 transform translate-x-20 pointer-events-none" }), _jsx("div", { className: "container mx-auto max-w-6xl relative z-10", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center", children: [_jsxs("div", { className: "relative", children: [_jsx("div", { className: "aspect-[4/5] rounded-none overflow-hidden grayscale hover:grayscale-0 transition-all duration-700", children: _jsx(ImageWithFallback, { src: getBannerImage(storeConfig, 'about_section_image', "https://images.unsplash.com/photo-1559339352-11d035aa65de?w=1200&q=80"), alt: "Chef", className: "w-full h-full object-cover" }) }), _jsxs("div", { className: "absolute -bottom-10 -right-10 bg-[#1A1A1A] p-8 border border-white/5 max-w-xs hidden md:block", children: [_jsx("p", { className: "font-serif italic text-2xl text-white mb-4", children: "\"Cooking is an art, but patience is the key ingredient.\"" }), _jsx("p", { className: "text-orange-500 text-xs font-bold uppercase tracking-widest", children: "\u2014 Head Chef Marco" })] })] }), _jsxs("div", { className: "space-y-8", children: [_jsx("span", { className: "text-orange-500 font-bold uppercase tracking-widest text-xs", children: layoutConfig?.sections?.story?.label || getLayoutText(storeConfig, 'food.ourPhilosophy', 'Our Philosophy') }), _jsx("h2", { className: "text-4xl md:text-5xl font-bold leading-tight", children: layoutConfig?.sections?.story?.title || getLayoutText(storeConfig, 'food.ourPhilosophy', 'Crafting Memories Through Flavor') }), _jsx("p", { className: "text-gray-400 text-lg leading-relaxed", children: layoutConfig?.sections?.story?.description || getLayoutText(storeConfig, 'food.ourPhilosophy', 'We believe that dining is more than just eating; it\'s an experience that engages all senses. Our seasonal menu is carefully curated using locally sourced ingredients to bring you the freshest flavors of the region.') }), _jsxs("div", { className: "grid grid-cols-3 gap-8 pt-8 border-t border-white/10", children: [_jsxs("div", { children: [_jsx(Flame, { className: "h-8 w-8 text-orange-500 mb-4" }), _jsx("h4", { className: "font-bold text-lg", children: "Wood Fired" }), _jsx("p", { className: "text-sm text-gray-500 mt-2", children: "Authentic taste" })] }), _jsxs("div", { children: [_jsx(Wine, { className: "h-8 w-8 text-orange-500 mb-4" }), _jsx("h4", { className: "font-bold text-lg", children: "Fine Wines" }), _jsx("p", { className: "text-sm text-gray-500 mt-2", children: "Curated selection" })] }), _jsxs("div", { children: [_jsx(Coffee, { className: "h-8 w-8 text-orange-500 mb-4" }), _jsx("h4", { className: "font-bold text-lg", children: "Artisan Coffee" }), _jsx("p", { className: "text-sm text-gray-500 mt-2", children: "Roasted in-house" })] })] })] })] }) })] })), layoutConfig?.sections?.promoBanner?.show !== false && layoutConfig?.sections?.promoBanner && (_jsx(PromoBanner, { config: layoutConfig.sections.promoBanner, layoutStyle: "food", className: "my-20" })), _jsx("section", { id: "menu-section", className: "py-20 bg-[#141414] border-t border-white/5", children: _jsxs("div", { className: "container mx-auto px-6 max-w-7xl", children: [_jsxs("div", { className: "text-center mb-12", children: [_jsx("span", { className: "text-orange-500 font-bold uppercase tracking-widest text-xs mb-4 block", children: "Discover" }), _jsx("h2", { className: "text-4xl md:text-5xl font-bold uppercase tracking-tight mb-8", children: getLayoutText(storeConfig, 'food.menuCategories', 'Our Menu') }), _jsxs("div", { className: "flex flex-wrap justify-center gap-4", children: [_jsx("button", { onClick: () => setActiveTab('all'), className: `px-8 py-3 rounded-full text-sm font-bold uppercase tracking-wider transition-all border ${activeTab === 'all' ? 'bg-white text-black border-white' : 'bg-transparent text-gray-400 border-white/10 hover:border-white/30'}`, children: "All" }), categories.map((cat) => (_jsx("button", { onClick: () => setActiveTab(cat.id), className: `px-8 py-3 rounded-full text-sm font-bold uppercase tracking-wider transition-all border ${activeTab === cat.id ? 'bg-white text-black border-white' : 'bg-transparent text-gray-400 border-white/10 hover:border-white/30'}`, children: cat.name }, cat.id)))] })] }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-16", children: filteredItems.map((item) => (_jsxs("div", { className: "group cursor-pointer", children: [_jsxs("div", { className: "aspect-square overflow-hidden rounded-full mb-6 border border-white/10 relative", children: [_jsx(ImageWithFallback, { src: item.image, alt: item.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110 group-hover:rotate-3", skeletonAspectRatio: "square" }), _jsx("div", { className: "hidden lg:flex absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity items-center justify-center", children: _jsx(Button, { className: "bg-orange-600 rounded-full px-6 hover:bg-orange-700", onClick: (e) => {
133
79
  e.preventDefault();
134
80
  e.stopPropagation();
135
81
  // Adapt menu item to product for cart
@@ -158,7 +104,7 @@ export function FoodHomePageModern({ storeConfig: initialConfig }) {
158
104
  };
159
105
  addToCart(product);
160
106
  addToast(`${item.name} added to order`, 'success');
161
- }, children: _jsx(Utensils, { className: "h-5 w-5" }) })] }), _jsxs("div", { className: "text-center px-4", children: [_jsx("h3", { className: "text-xl font-bold uppercase tracking-wide mb-2 group-hover:text-orange-500 transition-colors", children: item.name }), _jsx("p", { className: "text-gray-500 text-sm mb-3 line-clamp-2", children: item.description }), _jsx("span", { className: "text-2xl font-serif text-white block", children: formatCurrency(item.price, item.currency || storeConfig.settings?.currency || 'USD') })] })] }, item.id))) })] }) }), testimonialsSection?.show !== false && (_jsx("section", { "data-section": "testimonials", className: "py-20 px-6 bg-[#0F0F0F] border-t border-white/5", children: _jsxs("div", { className: "container mx-auto max-w-6xl", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-12 uppercase tracking-tight", children: testimonialsSection?.title || getLayoutText(storeConfig, 'sections.testimonials.title', 'Guest Stories') }), testimonialsSection?.subtitle && (_jsx("p", { className: "text-center text-gray-400 mb-12 max-w-2xl mx-auto", children: testimonialsSection.subtitle })), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: testimonials.slice(0, 3).map((t) => (_jsxs("div", { className: "bg-[#1A1A1A] p-8 rounded-none border border-white/5 relative hover:-translate-y-2 transition-transform duration-300", children: [_jsx("div", { className: "absolute -top-5 left-8 text-6xl text-orange-500/20 font-serif", children: "\"" }), _jsx("p", { className: "text-gray-300 leading-relaxed mb-8 relative z-10 italic font-light", children: t.comment }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx(ImageWithFallback, { src: t.image, alt: t.name, className: "w-12 h-12 rounded-full object-cover grayscale" }), _jsxs("div", { children: [_jsx("h4", { className: "font-bold text-white text-sm uppercase tracking-wide", children: t.name }), _jsx("span", { className: "text-xs text-orange-500 font-bold uppercase tracking-widest", children: t.role })] })] })] }, t.id))) })] }) })), _jsxs("section", { "data-section": "bookings", className: "relative py-20 md:py-32 flex items-center justify-center overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 bg-cover bg-center fixed-bg opacity-30 grayscale", style: { backgroundImage: `url('${getBannerImage(storeConfig, 'reservation_bg', "https://images.unsplash.com/photo-1559339352-11d035aa65de?q=80&w=1974&auto=format&fit=crop")}')` } }), _jsx("div", { className: "absolute inset-0 bg-[#0F0F0F]/80" }), _jsxs("div", { className: "relative z-10 text-center max-w-4xl mx-auto px-6", children: [_jsx(ChefHat, { className: "h-12 w-12 md:h-16 md:w-16 text-white/20 mx-auto mb-6 md:mb-8" }), _jsx("h2", { className: "text-4xl md:text-7xl font-bold uppercase tracking-tight mb-6 md:mb-8", children: "Your Table Awaits" }), _jsx("p", { className: "text-lg md:text-xl text-gray-300 mb-10 md:mb-12 font-light", children: "Experience the art of fine dining in the heart of the city." }), _jsx(Button, { onClick: () => setIsReservationOpen(true), className: "h-16 px-12 bg-white text-black hover:bg-orange-500 hover:text-white text-lg font-bold uppercase tracking-[0.2em] rounded-full transition-all duration-300 hover:shadow-[0_0_30px_rgba(255,255,255,0.2)]", children: "Make a Reservation" })] })] }), _jsx("footer", { className: "bg-black pt-24 pb-12 border-t border-white/5", children: _jsxs("div", { className: "container mx-auto px-6", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-16 mb-20", children: [_jsxs("div", { className: "space-y-8", children: [_jsxs(Link, { href: `/${storeConfig.slug}`, className: "text-3xl font-black tracking-tighter uppercase block", children: [storeConfig.name, _jsx("span", { className: "text-orange-500", children: "." })] }), _jsx("p", { className: "text-gray-500 leading-relaxed text-sm", children: storeConfig.description || getLayoutText(storeConfig, 'footer.description', 'Redefining the art of dining through innovation, passion, and uncompromising quality.') }), (storeConfig.branding.socialMedia || storeConfig.socialLinks) && (_jsxs("div", { className: "flex gap-4", children: [(storeConfig.branding.socialMedia?.instagram || storeConfig.socialLinks?.instagram) && (_jsx("a", { href: storeConfig.branding.socialMedia?.instagram || storeConfig.socialLinks?.instagram || '#', target: "_blank", rel: "noopener noreferrer", className: "w-10 h-10 border border-white/10 flex items-center justify-center hover:bg-orange-500 hover:border-orange-500 hover:text-white transition-all rounded-full", children: _jsx(Instagram, { className: "h-4 w-4" }) })), (storeConfig.branding.socialMedia?.facebook || storeConfig.socialLinks?.facebook) && (_jsx("a", { href: storeConfig.branding.socialMedia?.facebook || storeConfig.socialLinks?.facebook || '#', target: "_blank", rel: "noopener noreferrer", className: "w-10 h-10 border border-white/10 flex items-center justify-center hover:bg-orange-500 hover:border-orange-500 hover:text-white transition-all rounded-full", children: _jsx(Facebook, { className: "h-4 w-4" }) })), (storeConfig.branding.socialMedia?.twitter || storeConfig.socialLinks?.twitter) && (_jsx("a", { href: storeConfig.branding.socialMedia?.twitter || storeConfig.socialLinks?.twitter || '#', target: "_blank", rel: "noopener noreferrer", className: "w-10 h-10 border border-white/10 flex items-center justify-center hover:bg-orange-500 hover:border-orange-500 hover:text-white transition-all rounded-full", children: _jsx(Twitter, { className: "h-4 w-4" }) }))] }))] }), _jsxs("div", { children: [_jsx("h4", { className: "text-sm font-bold uppercase tracking-[0.2em] mb-8 text-white", children: getLayoutText(storeConfig, 'footer.quickLinks.title', 'Quick Links') }), _jsx("ul", { className: "space-y-4 text-gray-500 text-sm", children: storeConfig.navigation?.footer && storeConfig.navigation.footer.length > 0 ? (storeConfig.navigation.footer.map((section, idx) => (section.links?.map((link, linkIdx) => (_jsx("li", { children: _jsx(Link, { href: link.href, className: "hover:text-orange-500 transition-colors", children: link.label }) }, `${idx}-${linkIdx}`))))).flat()) : (_jsxs(_Fragment, { children: [_jsx("li", { children: _jsx(Link, { href: `/${storeConfig.slug}/menu`, className: "hover:text-orange-500 transition-colors", children: getLayoutText(storeConfig, 'footer.quickLinks.menu', 'Our Menu') }) }), _jsx("li", { children: _jsx("button", { onClick: () => setIsReservationOpen(true), className: "hover:text-orange-500 transition-colors text-left", children: getLayoutText(storeConfig, 'footer.quickLinks.reservations', 'Reservations') }) }), _jsx("li", { children: _jsx(Link, { href: `/${storeConfig.slug}/contact`, className: "hover:text-orange-500 transition-colors", children: getLayoutText(storeConfig, 'footer.quickLinks.privateDining', 'Private Dining') }) }), _jsx("li", { children: _jsx(Link, { href: `/${storeConfig.slug}/contact`, className: "hover:text-orange-500 transition-colors", children: getLayoutText(storeConfig, 'footer.quickLinks.giftCards', 'Gift Cards') }) })] })) })] }), _jsxs("div", { children: [_jsx("h4", { className: "text-sm font-bold uppercase tracking-[0.2em] mb-8 text-white", children: getLayoutText(storeConfig, 'footer.contact.title', 'Contact') }), _jsxs("ul", { className: "space-y-4 text-gray-500 text-sm", children: [storeConfig.contactInfo?.address && ((storeConfig.contactInfo.address.street ||
107
+ }, children: _jsx(Utensils, { className: "h-5 w-5" }) })] }), _jsxs("div", { className: "text-center px-4", children: [_jsx("h3", { className: "text-xl font-bold uppercase tracking-wide mb-2 group-hover:text-orange-500 transition-colors", children: item.name }), _jsx("p", { className: "text-gray-500 text-sm mb-3 line-clamp-2", children: item.description }), _jsx("span", { className: "text-2xl font-serif text-white block", children: formatCurrency(item.price, item.currency || storeConfig.settings?.currency || 'USD') })] })] }, item.id))) })] }) }), testimonialsSection?.show !== false && (_jsx("section", { className: "py-20 px-6 bg-[#0F0F0F] border-t border-white/5", children: _jsxs("div", { className: "container mx-auto max-w-6xl", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-12 uppercase tracking-tight", children: testimonialsSection?.title || getLayoutText(storeConfig, 'sections.testimonials.title', 'Guest Stories') }), testimonialsSection?.subtitle && (_jsx("p", { className: "text-center text-gray-400 mb-12 max-w-2xl mx-auto", children: testimonialsSection.subtitle })), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: testimonials.slice(0, 3).map((t) => (_jsxs("div", { className: "bg-[#1A1A1A] p-8 rounded-none border border-white/5 relative hover:-translate-y-2 transition-transform duration-300", children: [_jsx("div", { className: "absolute -top-5 left-8 text-6xl text-orange-500/20 font-serif", children: "\"" }), _jsx("p", { className: "text-gray-300 leading-relaxed mb-8 relative z-10 italic font-light", children: t.comment }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx(ImageWithFallback, { src: t.image, alt: t.name, className: "w-12 h-12 rounded-full object-cover grayscale" }), _jsxs("div", { children: [_jsx("h4", { className: "font-bold text-white text-sm uppercase tracking-wide", children: t.name }), _jsx("span", { className: "text-xs text-orange-500 font-bold uppercase tracking-widest", children: t.role })] })] })] }, t.id))) })] }) })), _jsxs("section", { className: "relative py-20 md:py-32 flex items-center justify-center overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 bg-cover bg-center fixed-bg opacity-30 grayscale", style: { backgroundImage: `url('${getBannerImage(storeConfig, 'reservation_bg', "https://images.unsplash.com/photo-1559339352-11d035aa65de?q=80&w=1974&auto=format&fit=crop")}')` } }), _jsx("div", { className: "absolute inset-0 bg-[#0F0F0F]/80" }), _jsxs("div", { className: "relative z-10 text-center max-w-4xl mx-auto px-6", children: [_jsx(ChefHat, { className: "h-12 w-12 md:h-16 md:w-16 text-white/20 mx-auto mb-6 md:mb-8" }), _jsx("h2", { className: "text-4xl md:text-7xl font-bold uppercase tracking-tight mb-6 md:mb-8", children: "Your Table Awaits" }), _jsx("p", { className: "text-lg md:text-xl text-gray-300 mb-10 md:mb-12 font-light", children: "Experience the art of fine dining in the heart of the city." }), _jsx(Button, { onClick: () => setIsReservationOpen(true), className: "h-16 px-12 bg-white text-black hover:bg-orange-500 hover:text-white text-lg font-bold uppercase tracking-[0.2em] rounded-full transition-all duration-300 hover:shadow-[0_0_30px_rgba(255,255,255,0.2)]", children: "Make a Reservation" })] })] }), _jsx("footer", { className: "bg-black pt-24 pb-12 border-t border-white/5", children: _jsxs("div", { className: "container mx-auto px-6", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-16 mb-20", children: [_jsxs("div", { className: "space-y-8", children: [_jsxs(Link, { href: `/${storeConfig.slug}`, className: "text-3xl font-black tracking-tighter uppercase block", children: [storeConfig.name, _jsx("span", { className: "text-orange-500", children: "." })] }), _jsx("p", { className: "text-gray-500 leading-relaxed text-sm", children: storeConfig.description || getLayoutText(storeConfig, 'footer.description', 'Redefining the art of dining through innovation, passion, and uncompromising quality.') }), (storeConfig.branding.socialMedia || storeConfig.socialLinks) && (_jsxs("div", { className: "flex gap-4", children: [(storeConfig.branding.socialMedia?.instagram || storeConfig.socialLinks?.instagram) && (_jsx("a", { href: storeConfig.branding.socialMedia?.instagram || storeConfig.socialLinks?.instagram || '#', target: "_blank", rel: "noopener noreferrer", className: "w-10 h-10 border border-white/10 flex items-center justify-center hover:bg-orange-500 hover:border-orange-500 hover:text-white transition-all rounded-full", children: _jsx(Instagram, { className: "h-4 w-4" }) })), (storeConfig.branding.socialMedia?.facebook || storeConfig.socialLinks?.facebook) && (_jsx("a", { href: storeConfig.branding.socialMedia?.facebook || storeConfig.socialLinks?.facebook || '#', target: "_blank", rel: "noopener noreferrer", className: "w-10 h-10 border border-white/10 flex items-center justify-center hover:bg-orange-500 hover:border-orange-500 hover:text-white transition-all rounded-full", children: _jsx(Facebook, { className: "h-4 w-4" }) })), (storeConfig.branding.socialMedia?.twitter || storeConfig.socialLinks?.twitter) && (_jsx("a", { href: storeConfig.branding.socialMedia?.twitter || storeConfig.socialLinks?.twitter || '#', target: "_blank", rel: "noopener noreferrer", className: "w-10 h-10 border border-white/10 flex items-center justify-center hover:bg-orange-500 hover:border-orange-500 hover:text-white transition-all rounded-full", children: _jsx(Twitter, { className: "h-4 w-4" }) }))] }))] }), _jsxs("div", { children: [_jsx("h4", { className: "text-sm font-bold uppercase tracking-[0.2em] mb-8 text-white", children: getLayoutText(storeConfig, 'footer.quickLinks.title', 'Quick Links') }), _jsx("ul", { className: "space-y-4 text-gray-500 text-sm", children: storeConfig.navigation?.footer && storeConfig.navigation.footer.length > 0 ? (storeConfig.navigation.footer.map((section, idx) => (section.links?.map((link, linkIdx) => (_jsx("li", { children: _jsx(Link, { href: link.href, className: "hover:text-orange-500 transition-colors", children: link.label }) }, `${idx}-${linkIdx}`))))).flat()) : (_jsxs(_Fragment, { children: [_jsx("li", { children: _jsx(Link, { href: `/${storeConfig.slug}/menu`, className: "hover:text-orange-500 transition-colors", children: getLayoutText(storeConfig, 'footer.quickLinks.menu', 'Our Menu') }) }), _jsx("li", { children: _jsx("button", { onClick: () => setIsReservationOpen(true), className: "hover:text-orange-500 transition-colors text-left", children: getLayoutText(storeConfig, 'footer.quickLinks.reservations', 'Reservations') }) }), _jsx("li", { children: _jsx(Link, { href: `/${storeConfig.slug}/contact`, className: "hover:text-orange-500 transition-colors", children: getLayoutText(storeConfig, 'footer.quickLinks.privateDining', 'Private Dining') }) }), _jsx("li", { children: _jsx(Link, { href: `/${storeConfig.slug}/contact`, className: "hover:text-orange-500 transition-colors", children: getLayoutText(storeConfig, 'footer.quickLinks.giftCards', 'Gift Cards') }) })] })) })] }), _jsxs("div", { children: [_jsx("h4", { className: "text-sm font-bold uppercase tracking-[0.2em] mb-8 text-white", children: getLayoutText(storeConfig, 'footer.contact.title', 'Contact') }), _jsxs("ul", { className: "space-y-4 text-gray-500 text-sm", children: [storeConfig.contactInfo?.address && ((storeConfig.contactInfo.address.street ||
162
108
  storeConfig.contactInfo.address.city ||
163
109
  storeConfig.contactInfo.address.state ||
164
110
  storeConfig.contactInfo.address.zipCode) && (_jsxs("li", { className: "flex items-start gap-3", children: [_jsx(MapPin, { className: "h-5 w-5 text-orange-500 mt-1 shrink-0" }), _jsxs("span", { children: [storeConfig.contactInfo.address.street && `${storeConfig.contactInfo.address.street}, `, storeConfig.contactInfo.address.city && `${storeConfig.contactInfo.address.city}, `, storeConfig.contactInfo.address.state && `${storeConfig.contactInfo.address.state} `, storeConfig.contactInfo.address.zipCode && storeConfig.contactInfo.address.zipCode] })] }))), storeConfig.contactInfo?.phone && (_jsxs("li", { className: "flex items-center gap-3", children: [_jsx(Phone, { className: "h-5 w-5 text-orange-500 shrink-0" }), _jsx("a", { href: `tel:${storeConfig.contactInfo.phone}`, className: "hover:text-orange-500 transition-colors", children: storeConfig.contactInfo.phone })] })), storeConfig.contactInfo?.email && (_jsxs("li", { className: "flex items-center gap-3", children: [_jsx(Mail, { className: "h-5 w-5 text-orange-500 shrink-0" }), _jsx("a", { href: `mailto:${storeConfig.contactInfo.email}`, className: "hover:text-orange-500 transition-colors", children: storeConfig.contactInfo.email })] })), storeConfig.locations && storeConfig.locations.length > 0 && storeConfig.locations[0].openingHours && (_jsxs("li", { className: "flex items-center gap-3", children: [_jsx(Clock, { className: "h-5 w-5 text-orange-500 shrink-0" }), _jsx("span", { children: storeConfig.locations[0].openingHours })] })), !storeConfig.contactInfo?.address && !storeConfig.contactInfo?.phone && !storeConfig.contactInfo?.email && (!storeConfig.locations || storeConfig.locations.length === 0 || !storeConfig.locations[0].openingHours) && (_jsxs("li", { className: "flex items-center gap-3", children: [_jsx(Clock, { className: "h-5 w-5 text-orange-500 shrink-0" }), _jsx("span", { children: getLayoutText(storeConfig, 'footer.contact.openingHours', 'Mon-Sun: 11am - 11pm') })] }))] })] }), _jsxs("div", { children: [_jsx("h4", { className: "text-sm font-bold uppercase tracking-[0.2em] mb-8 text-white", children: getLayoutText(storeConfig, 'footer.newsletter.title', 'Newsletter') }), _jsx("p", { className: "text-gray-500 mb-6 text-sm", children: getLayoutText(storeConfig, 'footer.newsletter.description', getLayoutText(storeConfig, 'sections.marketing.newsletter.subtitle', 'Subscribe for seasonal updates and exclusive invitations.')) }), _jsxs("form", { onSubmit: async (e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"GenericPageWrapper.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/components/GenericPageWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,uBAAuB,2CA8BnG"}
1
+ {"version":3,"file":"GenericPageWrapper.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/components/GenericPageWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,uBAAuB,2CAgCnG"}
@@ -10,7 +10,9 @@ export function GenericPageWrapper({ children, storeConfig: initialConfig }) {
10
10
  // So we need to re-add them for generic pages like Contact, About, etc.
11
11
  // 'electronics' and 'electronics-grid' are handled by ElectronicsPageWrapper usually,
12
12
  // but if we use this wrapper, we should check.
13
- const customLayouts = ['food-modern', 'clothing-minimal', 'booking-agenda'];
13
+ // BaseStoreLayout now handles headers for these layouts on inner pages,
14
+ // so we don't need to add them here anymore to avoid duplication.
15
+ const customLayouts = [];
14
16
  // Note: electronics layouts usually use ElectronicsPageWrapper which has its own header.
15
17
  // If this wrapper is used for them, we might want to check or just use StoreHeader as fallback.
16
18
  // But typically we route those to ElectronicsPageWrapper.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payaza-storefront-layouts",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "type": "module",
5
5
  "description": "Shared layout components for StoreFront applications",
6
6
  "main": "dist/index.js",