"use client" import { Children, type ReactNode } from "react" import { cn } from "@/lib/utils" function MasonryStack({ children }: { children: ReactNode }) { return (
{children}
) } export function AutomationTabMasonry({ columns, children, className, }: { columns: 1 | 2 children: ReactNode className?: string }) { const items = Children.toArray(children).filter(Boolean) if (columns === 1) { return (
{children}
) } const left = items.filter((_, index) => index % 2 === 0) const right = items.filter((_, index) => index % 2 === 1) return (
{items.map((child, index) => (
{child}
))}
{left.map((child, index) => (
{child}
))}
{right.map((child, index) => (
{child}
))}
) }