"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { cn } from "@stigmer/theme";
/**
 * Accessible checkbox for row/card selection and "select all" headers.
 *
 * Uses a native `<input type="checkbox">` with the `indeterminate`
 * property set via ref for proper browser + screen reader support.
 */
export function SelectionCheckbox({ checked, indeterminate = false, onChange, "aria-label": ariaLabel, className, }) {
    return (_jsx("input", { type: "checkbox", role: "checkbox", checked: checked, ref: (el) => {
            if (el)
                el.indeterminate = indeterminate;
        }, onChange: (e) => onChange(e.target.checked), "aria-label": ariaLabel, className: cn("size-3.5 shrink-0 cursor-pointer rounded border border-input accent-primary", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1", className) }));
}
//# sourceMappingURL=SelectionCheckbox.js.map