'use client'; import { useEffect, type ReactNode } from 'react'; import { cn } from '@/lib/utils'; import { useMobileChrome } from '@/components/layout/mobile/mobile-layout-provider'; /** * Wrapper for entity detail pages (clients, yachts, companies, etc.). Renders: * - desktop sticky compact header (entity name + status pill) * - the children (existing tab dropdown selector + tab body) * - optional sticky bottom action shelf, pinned above the bottom tab bar on * mobile (`pb-[calc(56px+env(safe-area-inset-bottom))]` content padding). * * Mobile: the desktop sticky header is hidden because the mobile topbar already * shows the entity name (pushed via `useMobileChrome`). The optional back * button is also enabled on mobile so detail pages get an arrow back to the * list. */ export function DetailPageShell({ entityName, status, children, bottomActions, className, }: { entityName: string; status?: ReactNode; children: ReactNode; bottomActions?: ReactNode; className?: string; }) { const { setChrome } = useMobileChrome(); useEffect(() => { setChrome({ title: entityName, showBackButton: true }); return () => { setChrome({ title: null, showBackButton: false }); }; }, [entityName, setChrome]); return (