"use client";

import React from "react";
import JobAnalytics from "./JobAnalytics";
import type { JobRow } from "@/lib/api/types/job.types";

interface Props { jobs: JobRow[]; stageFilter?: string; }

export default function JobAnalyticsInline({ jobs, stageFilter }: Props) {
  return (
    <div style={{ marginBottom: "20px", padding: "16px", backgroundColor: "#f0fdfa", borderRadius: "12px", border: "1px solid #99f6e4" }}>
      <div style={{ display: "flex", alignItems: "center", gap: "8px", marginBottom: "16px" }}>
        <span style={{ fontSize: "16px" }}>📊</span>
        <h2 style={{ margin: 0, fontSize: "14px", fontWeight: 700, color: "#0f766e" }}>Job Analytics</h2>
        <span style={{ marginLeft: "auto", fontSize: "12px", color: "#6b7280" }}>{jobs.length} jobs</span>
      </div>
      <JobAnalytics jobs={jobs} stageFilter={stageFilter} />
    </div>
  );
}
