"use client";

import { Suspense } from "react";

import LayoutWrapper from "@/components/layout/LayoutWrapper";
import BranchSelectionPopup from "@/components/BranchSelectionPopup";

/**
 * Storefront shell layout.
 *
 * Wraps all customer-facing routes in the layout-aware shell (LayoutWrapper →
 * registry getLayoutShell). The Suspense boundary satisfies useSearchParams()
 * usage in descendants (e.g. SEO) without opting the whole route into CSR.
 */
export default function StoreLayout({ children }) {
  return (
    <LayoutWrapper>
      <Suspense fallback={null}>{children}</Suspense>
      <BranchSelectionPopup />
    </LayoutWrapper>
  );
}
