import { o as u } from "./rolldown-runtime.js";
import { i as l, t as h } from "./vendor/react.js";
import { t as m } from "./dist.js";
import { t as b } from "./utils.js";
var x = /* @__PURE__ */ u(l(), 1), r = h(), c = m("pointer-events-none inline-flex items-center justify-center select-none font-sans font-medium", {
  variants: {
    variant: {
      default: "bg-muted text-muted-foreground border border-border rounded-sm shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.1),0_1px_0_0_rgba(255,255,255,0.15)] dark:shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.25),0_1px_0_0_rgba(255,255,255,0.04)]",
      ghost: "bg-transparent text-muted-foreground",
      outline: "bg-transparent border border-border text-muted-foreground rounded-sm shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.06)] dark:shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.2)]",
      solid: "bg-card/60 border border-border text-muted-foreground rounded shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.1),0_1px_0_0_rgba(255,255,255,0.15)] dark:shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.25),0_1px_0_0_rgba(255,255,255,0.04)]",
      tooltip: "bg-background/20 text-background dark:bg-background/10 rounded-sm",
      footer: "bg-background border border-border text-quaternary-foreground rounded-md shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.06),0_1px_0_0_rgba(255,255,255,0.1)] dark:shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.2),0_1px_0_0_rgba(255,255,255,0.03)]"
    },
    size: {
      xs: "h-4 min-w-4 px-0.5 text-[10px]",
      sm: "h-5 min-w-5 px-1 text-xs",
      md: "h-6 min-w-6 px-1.5 text-sm",
      lg: "h-7 min-w-7 px-2 text-sm"
    }
  },
  defaultVariants: {
    variant: "default",
    size: "sm"
  }
}), f = m("inline-flex items-center", {
  variants: { gap: {
    none: "gap-0",
    xs: "gap-0.5",
    sm: "gap-1",
    md: "gap-1.5",
    lg: "gap-2"
  } },
  defaultVariants: { gap: "sm" }
}), p = x.forwardRef(({ className: e, variant: t, size: s, icon: a, iconAfter: d, children: o, ..._ }, n) => /* @__PURE__ */ (0, r.jsxs)("kbd", {
  ref: n,
  "data-slot": "kbd",
  className: b(c({
    variant: t,
    size: s
  }), e),
  ..._,
  children: [
    a && /* @__PURE__ */ (0, r.jsx)("span", {
      "aria-hidden": "true",
      className: "shrink-0 [&_svg:not([class*='size-'])]:size-3",
      children: a
    }),
    o,
    d && /* @__PURE__ */ (0, r.jsx)("span", {
      "aria-hidden": "true",
      className: "shrink-0 [&_svg:not([class*='size-'])]:size-3",
      children: d
    })
  ]
}));
p.displayName = "Kbd";
var g = x.forwardRef(({ className: e, gap: t, ...s }, a) => /* @__PURE__ */ (0, r.jsx)("span", {
  ref: a,
  "data-slot": "kbd-group",
  className: b(f({ gap: t }), e),
  ...s
}));
g.displayName = "KbdGroup";
var w = x.forwardRef(({ keys: e, separator: t, className: s, variant: a, size: d, ...o }, _) => t ? /* @__PURE__ */ (0, r.jsx)(g, {
  ref: _,
  gap: "xs",
  className: s,
  children: e.map((n, i) => /* @__PURE__ */ (0, r.jsxs)(x.Fragment, { children: [/* @__PURE__ */ (0, r.jsx)(p, {
    variant: a,
    size: d,
    ...o,
    children: n
  }), i < e.length - 1 && /* @__PURE__ */ (0, r.jsx)("span", {
    className: "text-muted-foreground text-xs",
    children: t
  })] }, i))
}) : /* @__PURE__ */ (0, r.jsx)(g, {
  ref: _,
  gap: "xs",
  className: s,
  children: e.map((n, i) => /* @__PURE__ */ (0, r.jsx)(p, {
    variant: a,
    size: d,
    ...o,
    children: n
  }, i))
}));
w.displayName = "Shortcut";
export {
  p as t
};

//# sourceMappingURL=Kbd.js.map