"use client"; import React from "react"; import Link from "next/link"; import { ChevronLeft } from "lucide-react"; interface PageLayoutProps { /** Título principal de la página */ title: string; /** Descripción/subtítulo opcional */ description?: string; /** Acciones que van a la derecha del título (botones, etc.) */ actions?: React.ReactNode; /** Componente de navegación secundaria (ej: pestañas del editor) */ navigation?: React.ReactNode; /** Link de "volver atrás" — mostrar solo cuando sea necesario */ backHref?: string; backLabel?: string; /** Contenido principal de la página */ children: React.ReactNode; /** Ancho máximo del contenedor: 'default' (max-w-7xl) o 'narrow' (max-w-5xl) */ maxWidth?: "default" | "narrow" | "wide"; } const MAX_WIDTH_CLASS = { default: "max-w-7xl", narrow: "max-w-5xl", wide: "max-w-screen-2xl", }; /** * Componente de layout estándar para todas las páginas del Studio. * Garantiza: mismo padding superior, misma jerarquía tipográfica, mismo max-width. */ export default function PageLayout({ title, description, actions, navigation, backHref, backLabel = "Volver", children, maxWidth = "default", }: PageLayoutProps) { const containerClass = MAX_WIDTH_CLASS[maxWidth]; return (
{description}
)}