"use client";
import { Radio } from '@base-ui/react/radio';
import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsx } from 'react/jsx-runtime';

var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function RadioGroup(_a) {
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
  return /* @__PURE__ */ jsx(
    RadioGroup$1,
    __spreadValues({
      "data-slot": "radio-group",
      className: cn("grid w-full gap-2", className)
    }, props)
  );
}
function RadioGroupItem(_a) {
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
  return /* @__PURE__ */ jsx(
    Radio.Root,
    __spreadProps(__spreadValues({
      "data-slot": "radio-group-item",
      className: cn(
        "group/radio-group-item relative inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full outline-none touch-manipulation",
        "focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
        className
      )
    }, props), {
      children: /* @__PURE__ */ jsx(
        "span",
        {
          "aria-hidden": true,
          className: cn(
            "relative flex aspect-square size-4 shrink-0 items-center justify-center overflow-hidden rounded-full border border-input bg-background transition-colors outline-none",
            "dark:bg-input/30",
            "group-focus-visible/radio-group-item:ring-4 group-focus-visible/radio-group-item:ring-ring/50 group-focus-visible/radio-group-item:ring-offset-1 group-focus-visible/radio-group-item:ring-offset-background",
            "group-focus-visible/radio-group-item:border-ring",
            "group-disabled/radio-group-item:cursor-not-allowed group-disabled/radio-group-item:opacity-50",
            "group-aria-invalid/radio-group-item:border-destructive group-aria-invalid/radio-group-item:ring-3 group-aria-invalid/radio-group-item:ring-destructive/20",
            "group-aria-invalid/radio-group-item:group-data-checked/radio-group-item:border-primary",
            "dark:group-aria-invalid/radio-group-item:border-destructive/50 dark:group-aria-invalid/radio-group-item:ring-destructive/40",
            "group-data-unchecked/radio-group-item:group-hover/radio-group-item:border-input-hover group-data-unchecked/radio-group-item:group-hover/radio-group-item:bg-accent/50",
            "dark:group-data-unchecked/radio-group-item:group-hover/radio-group-item:border-input-hover dark:group-data-unchecked/radio-group-item:group-hover/radio-group-item:bg-accent/30",
            "group-disabled/radio-group-item:group-hover/radio-group-item:border-input group-disabled/radio-group-item:group-hover/radio-group-item:bg-transparent",
            "group-data-checked/radio-group-item:border-primary group-data-checked/radio-group-item:bg-primary group-data-checked/radio-group-item:text-primary-foreground",
            "group-data-checked/radio-group-item:group-hover/radio-group-item:border-[var(--primary-hover)] group-data-checked/radio-group-item:group-hover/radio-group-item:bg-[var(--primary-hover)]",
            "dark:group-data-checked/radio-group-item:bg-primary"
          ),
          children: /* @__PURE__ */ jsx(
            Radio.Indicator,
            {
              "data-slot": "radio-group-indicator",
              className: "flex size-4 items-center justify-center",
              children: /* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
            }
          )
        }
      )
    })
  );
}

export { RadioGroup, RadioGroupItem };
//# sourceMappingURL=radio-group.js.map
//# sourceMappingURL=radio-group.js.map