"use client" import * as React from "react" import { Group, Stack, Title, Text, ActionIcon, Tabs, Box } from "@mantine/core" import { IconChevronLeft } from "@tabler/icons-react" interface TabItem { label: string value: string icon?: React.ReactNode disabled?: boolean } interface PageHeaderProps { title: string subtitle?: string actions?: React.ReactNode onBack?: () => void tabs?: TabItem[] activeTab?: string onTabChange?: (value: string) => void badge?: React.ReactNode sticky?: boolean } function PageHeader({ title, subtitle, actions, onBack, tabs, activeTab, onTabChange, badge, sticky = false, }: PageHeaderProps) { return ( {onBack && ( )} {title} {badge} {subtitle && {subtitle}} {actions && {actions}} {tabs && tabs.length > 0 && ( v && onTabChange?.(v)} style={{ marginBottom: 'calc(-1 * var(--mantine-spacing-md))' }}> {tabs.map((tab) => ( {tab.label} ))} )} ) } interface SimplePageHeaderProps { title: string description?: string children?: React.ReactNode } function SimplePageHeader({ title, description, children }: SimplePageHeaderProps) { return ( {title} {description && {description}} {children && {children}} ) } export { PageHeader, SimplePageHeader }