type CategoryTabsProps = {
  selectedCategory: string;
  onCategoryChange: (category: string) => void;
};

const categories = [
  "SEMUA",
  "POLRI",
  "MAHKAMAH AGUNG",
  "DPR",
  "MPR",
  "KEJAKSAAN AGUNG",
  "KPK",
  "PUPR",
  "BSKDN",
  "BUMN",
  "KPU",
];

export default function CategoryTabs({
  selectedCategory,
  onCategoryChange,
}: CategoryTabsProps) {
  return (
    <div className="flex flex-wrap gap-2 overflow-x-auto">
      {categories.map((cat, idx) => (
        <button
          key={idx}
          onClick={() => onCategoryChange(cat)}
          className={`px-4 py-1 text-sm rounded font-medium border ${
            selectedCategory === cat
              ? "bg-[#C6A455] text-white"
              : "bg-white text-gray-800"
          }`}
        >
          {cat}
        </button>
      ))}
    </div>
  );
}
