"use client";
import { useState } from "react";
import { CheckboxGroup, CheckboxItem } from "@/registry/radix/checkbox-group";
const items = ["작업 알림","검토 요청","일정 변경","주간 소식","월간 회고"];
export default function AuthorCheckboxVariant() {
  const [checked, setChecked] = useState<Set<number>>(new Set([]));
  return <CheckboxGroup className="w-80 max-w-full" checkedIndices={checked}>{items.map((label, index) => <CheckboxItem key={label} index={index} label={label} checked={checked.has(index)} onToggle={() => setChecked(previous => { const next = new Set(previous); if (next.has(index)) next.delete(index); else next.add(index); return next; })} />)}</CheckboxGroup>;
}
