import { jsx as r } from "react/jsx-runtime";
import { c as s } from "../../../index-UgeK3A8s.js";
import { cn as a } from "../../../lib/utils.js";
const o = s(
  "group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 has-data-[slot=alert-action]:pr-18 *:[svg:not([class*='size-'])]:size-4 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current",
  {
    variants: {
      variant: {
        default: "bg-card text-card-foreground",
        destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
        warning: "border-warning *:[svg]:text-warning"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
function c({
  className: t,
  variant: e,
  ...n
}) {
  return /* @__PURE__ */ r(
    "div",
    {
      className: a(o({ variant: e }), t),
      "data-slot": "alert",
      role: "alert",
      ...n
    }
  );
}
function u({ className: t, ...e }) {
  return /* @__PURE__ */ r(
    "div",
    {
      className: a(
        "font-heading font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
        t
      ),
      "data-slot": "alert-title",
      ...e
    }
  );
}
function g({
  className: t,
  ...e
}) {
  return /* @__PURE__ */ r(
    "div",
    {
      className: a(
        "text-balance text-muted-foreground text-sm md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
        t
      ),
      "data-slot": "alert-description",
      ...e
    }
  );
}
function v({ className: t, ...e }) {
  return /* @__PURE__ */ r(
    "div",
    {
      className: a("absolute top-2 right-2", t),
      "data-slot": "alert-action",
      ...e
    }
  );
}
export {
  c as Alert,
  v as AlertAction,
  g as AlertDescription,
  u as AlertTitle
};
