import React from "react";
import clsx from "clsx";
import { Divider } from "../../components/Divider";
import { PageGrid, PageGridRow, PageGridCol } from "../../components/PageGrid";
import { ButtonGroup } from "../ButtonGroup/ButtonGroup";
import type {
CarouselFeaturedBackground,
CarouselFeaturedProps,
CarouselSlide,
} from "../CarouselFeatured/CarouselFeatured";
/**
* Props for a single panel in the PanelStack component.
* Same shape as a CarouselFeatured slide.
*/
export type PanelStackPanel = CarouselSlide;
/**
* Background color options for PanelStack.
* Same variants as CarouselFeatured; each adapts to light/dark mode.
*/
export type PanelStackBackground = CarouselFeaturedBackground;
/**
* Props for the PanelStack pattern component.
* Matches CarouselFeatured, minus carousel-only behavior.
*/
export interface PanelStackProps extends CarouselFeaturedProps {
/** Array of panels to display. Same shape as CarouselFeatured slides. */
slides: readonly CarouselSlide[];
/** Background color variant. Defaults to 'grey'. */
background?: PanelStackBackground;
}
/**
* PanelStack Pattern Component
*
* Statically stacks featured panels vertically using the same two-column
* slide layout as CarouselFeatured (image left / content right on desktop;
* content top / image bottom on tablet and mobile). There is no carousel
* track, navigation, or other interaction.
*
* @example
* ```tsx
*
* ```
*/
export const PanelStack = React.forwardRef(
(props, ref) => {
const { slides, background = "grey", className, children, ...rest } = props;
if (slides.length === 0) {
console.warn("PanelStack: No slides provided");
return null;
}
return (
{slides.map((slide, index) => (