import { t as e } from "../../utils-B7XIe3qq.js";
import * as t from "react";
import { jsx as n } from "react/jsx-runtime";
//#region src/react/primitives/checkbox.tsx
var r = t.forwardRef(({ className: r, onCheckedChange: i, onChange: a, indeterminate: o, ...s }, c) => {
	let l = t.useRef(null);
	t.useEffect(() => {
		l.current && (l.current.indeterminate = o ?? !1);
	}, [o]);
	let u = (e) => {
		a?.(e), i?.(e.target.checked);
	};
	return /* @__PURE__ */ n("input", {
		type: "checkbox",
		className: e("border-border-default h-4 w-4 shrink-0 rounded border", "bg-background-surface text-accent-primary", "focus:ring-accent-primary focus:ring-offset-background-base focus:ring-2 focus:ring-offset-2 focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-50", "accent-accent-primary cursor-pointer", r),
		ref: (e) => {
			l.current = e, typeof c == "function" ? c(e) : c && (c.current = e);
		},
		"aria-disabled": s.disabled || void 0,
		onChange: u,
		...s
	});
});
r.displayName = "Checkbox";
//#endregion
export { r as Checkbox };

//# sourceMappingURL=checkbox.js.map