import { cva } from 'class-variance-authority';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsxs, 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));
}
var inlineTipVariants = cva(
  "flex items-center gap-3 overflow-hidden rounded-sm border px-3 py-2.5 text-sm shadow-[0_1px_2px_0_rgba(0,0,0,0.05)] shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.1)]",
  {
    variants: {
      variant: {
        default: "border-border bg-(--inline-tip-default-bg)",
        info: "border-transparent bg-(--inline-tip-info-bg)",
        success: "border-transparent bg-(--inline-tip-success-bg)",
        warning: "border-transparent bg-(--inline-tip-warning-bg)",
        error: "border-transparent bg-(--inline-tip-error-bg)"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
var indicatorVariants = cva("w-1 shrink-0 self-stretch rounded-full", {
  variants: {
    variant: {
      default: "bg-(--inline-tip-default-accent)",
      info: "bg-(--inline-tip-info-accent)",
      success: "bg-(--inline-tip-success-accent)",
      warning: "bg-(--inline-tip-warning-accent)",
      error: "bg-(--inline-tip-error-accent)"
    }
  },
  defaultVariants: {
    variant: "default"
  }
});
var titleVariants = cva("font-medium", {
  variants: {
    variant: {
      default: "text-(--inline-tip-default-title)",
      info: "text-(--inline-tip-info-title)",
      success: "text-(--inline-tip-success-title)",
      warning: "text-(--inline-tip-warning-title)",
      error: "text-(--inline-tip-error-title)"
    }
  },
  defaultVariants: {
    variant: "default"
  }
});
var VARIANT_TITLES = {
  default: "Pro Tip:",
  info: "Info:",
  success: "Success:",
  warning: "Warning:",
  error: "Error:"
};
function InlineTip(_a) {
  var _b = _a, {
    className,
    variant = "default",
    title,
    children
  } = _b, props = __objRest(_b, [
    "className",
    "variant",
    "title",
    "children"
  ]);
  const displayTitle = title != null ? title : VARIANT_TITLES[variant];
  return /* @__PURE__ */ jsxs(
    "div",
    __spreadProps(__spreadValues({
      "data-slot": "inline-tip",
      className: cn(inlineTipVariants({ variant, className })),
      role: "status"
    }, props), {
      children: [
        /* @__PURE__ */ jsx("div", { className: "flex items-center self-stretch py-1", children: /* @__PURE__ */ jsx("div", { className: cn(indicatorVariants({ variant })) }) }),
        /* @__PURE__ */ jsxs("p", { className: "min-w-0 flex-1 leading-5 text-(--theme-text-secondary)", children: [
          /* @__PURE__ */ jsx("span", { className: cn(titleVariants({ variant })), children: displayTitle }),
          " ",
          children
        ] })
      ]
    })
  );
}

export { InlineTip, inlineTipVariants };
//# sourceMappingURL=inline-tip.js.map
//# sourceMappingURL=inline-tip.js.map