"use client"

import * as React from "react"
import { ReportRange, RevenueSlice } from "./types"
import { ReportsRevenueDonutChart } from "./reports-revenue-donut-chart"

interface RevenueByIndustryChartProps {
    data: RevenueSlice[]
    range: ReportRange
    compact?: boolean
}

export const RevenueByIndustryChart = React.memo(function RevenueByIndustryChart({
    data,
    range,
    compact,
}: RevenueByIndustryChartProps) {
    return (
        <ReportsRevenueDonutChart
            data={data}
            range={range}
            title="Revenue by Industry"
            subtitleSuffix="Top industries ($M)"
            emptyMessage="No industry breakdown"
            emptyDescription="Closed-won lead revenue with an industry (or Unassigned) appears here."
            compact={compact}
        />
    )
})
