import { cn } from "../../utils/cn.mjs";
import { cva } from "class-variance-authority";
import { jsx, jsxs } from "react/jsx-runtime";

//#region src/components/Input/Checkbox.tsx
const checkboxVariants = cva("", {
	variants: {
		variant: { default: [
			"pointer rounded border-2 bg-input-background text-input-text shadow-none outline-0 transition-all",
			"border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]",
			"checked:border-checkbox-checked-border checked:bg-checkbox-checked",
			"disabled:opacity-50"
		] },
		size: {
			sm: "size-4",
			md: "size-5",
			lg: "size-6"
		},
		color: {
			primary: "accent-primary",
			secondary: "accent-secondary",
			destructive: "accent-destructive",
			neutral: "accent-neutral",
			light: "accent-light",
			text: "accent-text",
			dark: "accent-dark",
			error: "accent-error",
			success: "accent-success",
			custom: "accent-custom"
		},
		validationStyleEnabled: {
			disabled: "",
			enabled: "valid:border-success invalid:border-error"
		}
	},
	defaultVariants: {
		variant: "default",
		color: "primary",
		validationStyleEnabled: "disabled",
		size: "md"
	}
});
let CheckboxSize = /* @__PURE__ */ function(CheckboxSize$1) {
	CheckboxSize$1["SM"] = "sm";
	CheckboxSize$1["MD"] = "md";
	CheckboxSize$1["LG"] = "lg";
	return CheckboxSize$1;
}({});
let CheckboxColor = /* @__PURE__ */ function(CheckboxColor$1) {
	CheckboxColor$1["PRIMARY"] = "primary";
	CheckboxColor$1["SECONDARY"] = "secondary";
	CheckboxColor$1["DESTRUCTIVE"] = "destructive";
	CheckboxColor$1["NEUTRAL"] = "neutral";
	CheckboxColor$1["LIGHT"] = "light";
	CheckboxColor$1["TEXT"] = "text";
	CheckboxColor$1["DARK"] = "dark";
	CheckboxColor$1["ERROR"] = "error";
	CheckboxColor$1["SUCCESS"] = "success";
	CheckboxColor$1["CUSTOM"] = "custom";
	return CheckboxColor$1;
}({});
const Input = ({ validationStyleEnabled = false, label, size, color, name, variant, className, labelClassName,...props }) => /* @__PURE__ */ jsx("input", {
	type: "checkbox",
	className: checkboxVariants({
		variant,
		size,
		color,
		validationStyleEnabled: validationStyleEnabled ? "enabled" : "disabled",
		className
	}),
	...props
});
const Checkbox = (props) => {
	const { label, name, id } = props;
	return label ? /* @__PURE__ */ jsxs("label", {
		htmlFor: id ?? name,
		className: cn("flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm", props.labelClassName),
		children: [/* @__PURE__ */ jsx(Input, {
			id: id ?? name,
			...props
		}), label]
	}) : /* @__PURE__ */ jsx(Input, {
		id: id ?? name,
		...props
	});
};

//#endregion
export { Checkbox, CheckboxColor, CheckboxSize, checkboxVariants };
//# sourceMappingURL=Checkbox.mjs.map