"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    Toast: function() {
        return Toast;
    },
    ToastAction: function() {
        return ToastAction;
    },
    ToastClose: function() {
        return ToastClose;
    },
    ToastDescription: function() {
        return ToastDescription;
    },
    ToastProvider: function() {
        return ToastProvider;
    },
    ToastTitle: function() {
        return ToastTitle;
    },
    ToastViewport: function() {
        return ToastViewport;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
const _reacttoast = /*#__PURE__*/ _interop_require_wildcard(require("@radix-ui/react-toast"));
const _classvarianceauthority = require("class-variance-authority");
const _lucidereact = require("lucide-react");
const _css = require("../utils/css");
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
const ToastProvider = _reacttoast.Provider;
const ToastViewport = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttoast.Viewport, {
        ref: ref,
        className: (0, _css.cn)("orderly-fixed orderly-top-0 orderly-z-[100] orderly-flex orderly-max-h-screen orderly-w-full orderly-flex-col-reverse orderly-p-4 sm:orderly-bottom-0 sm:orderly-right-0 sm:orderly-top-auto sm:orderly-flex-col desktop:orderly-max-w-[420px]", className),
        ...props
    }));
ToastViewport.displayName = _reacttoast.Viewport.displayName;
const toastVariants = (0, _classvarianceauthority.cva)("orderly-group orderly-pointer-events-auto orderly-relative orderly-flex orderly-w-full orderly-items-center orderly-justify-between orderly-space-x-2 orderly-overflow-hidden orderly-rounded orderly-border orderly-p-4 orderly-pr-6 orderly-shadow-lg orderly-transition-all data-[swipe=cancel]:orderly-translate-x-0 data-[swipe=end]:orderly-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:orderly-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:orderly-transition-none data-[state=open]:orderly-animate-in data-[state=closed]:orderly-animate-out data-[swipe=end]:orderly-animate-out data-[state=closed]:orderly-fade-out-80 data-[state=closed]:orderly-slide-out-to-right-full data-[state=open]:orderly-slide-in-from-top-full data-[state=open]:sm:orderly-slide-in-from-bottom-full", {
    variants: {
        variant: {
            default: "orderly-border orderly-bg-base-700 orderly-text-foreground",
            destructive: "orderly-destructive orderly-group orderly-border-destructive orderly-bg-destructive orderly-text-destructive-foreground"
        }
    },
    defaultVariants: {
        variant: "default"
    }
});
const Toast = /*#__PURE__*/ _react.forwardRef(({ className, variant, ...props }, ref)=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttoast.Root, {
        ref: ref,
        className: (0, _css.cn)(toastVariants({
            variant
        }), className),
        ...props
    });
});
Toast.displayName = _reacttoast.Root.displayName;
const ToastAction = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttoast.Action, {
        ref: ref,
        className: (0, _css.cn)("orderly-inline-flex orderly-h-8 orderly-shrink-0 orderly-items-center orderly-justify-center orderly-rounded orderly-border orderly-bg-transparent orderly-px-3 orderly-text-3xs orderly-font-medium orderly-transition-colors hover:orderly-bg-secondary focus:orderly-outline-none focus:orderly-ring-1 focus:orderly-ring-ring disabled:orderly-pointer-events-none disabled:orderly-opacity-50 group-[.destructive]:orderly-border-muted/40 group-[.destructive]:hover:orderly-border-destructive/30 group-[.destructive]:hover:orderly-bg-destructive group-[.destructive]:hover:orderly-text-destructive-foreground group-[.destructive]:focus:orderly-ring-destructive", className),
        ...props
    }));
ToastAction.displayName = _reacttoast.Action.displayName;
const ToastClose = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttoast.Close, {
        ref: ref,
        className: (0, _css.cn)("orderly-absolute orderly-right-1 orderly-top-1 orderly-rounded orderly-p-1 orderly-text-foreground/50 orderly-opacity-0 orderly-transition-opacity hover:orderly-text-foreground focus:orderly-opacity-100 focus:orderly-outline-none focus:orderly-ring-1 group-hover:orderly-opacity-100 group-[.destructive]:orderly-text-red-300 group-[.destructive]:hover:orderly-text-red-50 group-[.destructive]:focus:orderly-ring-red-400 group-[.destructive]:focus:orderly-ring-offset-red-600", className),
        "toast-close": "",
        ...props,
        children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_lucidereact.X, {
            className: "orderly-h-4 orderly-w-4"
        })
    }));
ToastClose.displayName = _reacttoast.Close.displayName;
const ToastTitle = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttoast.Title, {
        ref: ref,
        className: (0, _css.cn)("orderly-text-3xs orderly-font-semibold [&+div]:orderly-text-4xs", className),
        ...props
    }));
ToastTitle.displayName = _reacttoast.Title.displayName;
const ToastDescription = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttoast.Description, {
        ref: ref,
        className: (0, _css.cn)("orderly-text-3xs orderly-opacity-90", className),
        ...props
    }));
ToastDescription.displayName = _reacttoast.Description.displayName;

//# sourceMappingURL=toast.js.map