import { Card } from "@/shared/ui/Card.jsx";
import { SegmentControl } from "@/shared/ui/SegmentControl.jsx";
import { LineChart } from "./LineChart.jsx";

export function ChartCard({ colorToken, compact = false, series, title }) {
  return (
    <Card className={`chart-card ${compact ? "chart-card--compact" : ""}`}>
      <div className="card-head">
        <div className="card-title">{title}</div>
        <SegmentControl />
      </div>
      <LineChart colorToken={colorToken} series={series} />
    </Card>
  );
}
