"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([0,1,2,3]));
  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>;
}
