"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.toast = void 0;
/**
 * Safe sonner export that works in both frontend and backend
 * In frontend: exports the actual toast function
 * In backend: exports a no-op function
 */

// Define a type for the toast function

let toast = exports.toast = void 0;

// Environment detection
const isFrontend = typeof window !== 'undefined' || typeof global !== 'undefined' && global.navigator || typeof process !== 'undefined' && process.env.NODE_ENV === 'development' && typeof document !== 'undefined';
if (isFrontend) {
  try {
    // Try to import the actual sonner
    const sonnerModule = require('./sonner');
    exports.toast = toast = sonnerModule.toast;
  } catch (e) {
    // Fallback to no-op if import fails
    exports.toast = toast = () => {};
  }
} else {
  // Backend environment - no-op function
  exports.toast = toast = () => {};
}
//# sourceMappingURL=sonner-safe.js.map