import { jsxs, jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import { Alert, AlertTitle, AlertDescription } from './primitives/Alert.js';
import { c as cn } from './utils-BJnb9o5c.js';
import { r as renderIcon } from './renderIcon-C6twJSqH.js';
import { c as createLucideIcon } from './createLucideIcon-C8ycilSN.js';
import { T as TriangleAlert } from './triangle-alert-C434HydH.js';
import { I as Info } from './info-BlwkmMZr.js';

/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */


const __iconNode$1 = [
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
];
const CircleAlert = createLucideIcon("circle-alert", __iconNode$1);

/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */


const __iconNode = [
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
];
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode);

const VARIANT_CONFIG = {
  info: {
    container: "border border-info-border bg-info text-info-foreground",
    icon: Info
  },
  warning: {
    container: "border border-warning-border bg-warning text-warning-foreground",
    icon: TriangleAlert
  },
  danger: {
    container: "border border-error-border bg-error text-error-foreground",
    icon: CircleAlert
  },
  success: {
    container: "border border-success-border bg-success text-success-foreground",
    icon: CircleCheckBig
  }
};

const Callout = forwardRef(
  ({ variant = "info", icon, title, children, className, ...otherProps }, ref) => {
    const config = VARIANT_CONFIG[variant];
    const resolvedIcon = icon ?? config.icon;
    return /* @__PURE__ */ jsxs(
      Alert,
      {
        ref,
        className: cn(config.container, className),
        ...otherProps,
        children: [
          renderIcon(resolvedIcon, "size-4 shrink-0"),
          title && /* @__PURE__ */ jsx(AlertTitle, { className: "font-semibold", children: title }),
          children && /* @__PURE__ */ jsx(AlertDescription, { className: "text-current", children })
        ]
      }
    );
  }
);
Callout.displayName = "Callout";

export { Callout as C };
//# sourceMappingURL=Callout-NVYmCwJL.js.map
