import { n as cn } from "./utils-DXzSsU1e.js";
import { createBlock, defineComponent, mergeModels, normalizeClass, openBlock, renderSlot, unref, useModel, withCtx } from "vue";
import { Toggle } from "reka-ui";
import { cva } from "class-variance-authority";
//#endregion
//#region src/components/ui/toggle/Toggle.vue
var Toggle_default = /* @__PURE__ */ defineComponent({
	__name: "Toggle",
	props: /* @__PURE__ */ mergeModels({
		defaultPressed: { type: Boolean },
		disabled: { type: Boolean },
		asChild: { type: Boolean },
		as: {},
		name: {},
		required: { type: Boolean },
		variant: {},
		size: {},
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] }
	}, {
		"pressed": {
			type: Boolean,
			default: void 0
		},
		"pressedModifiers": {}
	}),
	emits: ["update:pressed"],
	setup(__props) {
		const props = __props;
		const pressed = useModel(__props, "pressed");
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(Toggle), {
				modelValue: pressed.value,
				"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => pressed.value = $event),
				"default-value": __props.defaultPressed,
				disabled: __props.disabled,
				"as-child": __props.asChild,
				as: __props.as ?? "button",
				name: __props.name,
				required: __props.required,
				class: normalizeClass(unref(cn)(unref(toggleVariants)({
					variant: __props.variant,
					size: __props.size
				}), props.class))
			}, {
				default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
					pressed: pressed.value ?? false,
					disabled: __props.disabled ?? false
				})]),
				_: 3
			}, 8, [
				"modelValue",
				"default-value",
				"disabled",
				"as-child",
				"as",
				"name",
				"required",
				"class"
			]);
		};
	}
});
//#endregion
//#region src/components/ui/toggle/index.ts
var toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
	variants: {
		variant: {
			default: "bg-transparent",
			outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
		},
		size: {
			default: "h-10 px-3",
			sm: "h-9 px-2.5",
			lg: "h-11 px-5"
		}
	},
	defaultVariants: {
		variant: "default",
		size: "default"
	}
});
//#endregion
export { Toggle_default as n, toggleVariants as t };

//# sourceMappingURL=toggle-BHqEMGeO.js.map