export interface RecentActivitySettings {
    itemCount: number // 5, 10, 15
}

export interface TopProductsSettings {
    itemCount: number // 3, 5, 10
    showRevenue: boolean
}

export interface OverviewSettings {
    showChange: boolean // Show % change from previous period
}

export interface RevenueChartSettings {
    days: number // 7, 14, 30
    showComparison: boolean
}

export interface LowStockSettings {
    threshold: number // Show items with stock below this
    itemCount: number
}

export interface RecentCustomersSettings {
    itemCount: number
    showSpent: boolean
}

export interface PendingChatsSettings {
    showPreview: boolean
}

export type WidgetSettings =
    | { type: "quick-actions" }
    | { type: "overview"; settings: OverviewSettings }
    | { type: "recent-activity"; settings: RecentActivitySettings }
    | { type: "top-products"; settings: TopProductsSettings }
    | { type: "revenue-chart"; settings: RevenueChartSettings }
    | { type: "low-stock"; settings: LowStockSettings }
    | { type: "recent-customers"; settings: RecentCustomersSettings }
    | { type: "pending-chats"; settings: PendingChatsSettings }

export interface WidgetConfig {
    id: string
    title: string
    visible: boolean
    order: number
    colSpan?: number
    settings?: Record<string, any>
}

export interface TopProduct {
    id: string;
    name: string;
    price: number | number[];
    image: string;
    count: number;
    revenue: number;
    unitType?: string;
    currentStock?: number;
}
