"use client";
'use strict';

const jsxRuntime = require('react/jsx-runtime');
const errorPlaceholder = require('./error-placeholder.cjs');
const context = require('@btst/stack/context');
const index = require('../../localization/index.cjs');

function DefaultError({ error }) {
  const { localization } = context.usePluginOverrides("ai-chat", {
    localization: index.AI_CHAT_LOCALIZATION
  });
  const title = localization?.CHAT_GENERIC_ERROR_TITLE ?? index.AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_TITLE;
  const message = process.env.NODE_ENV === "production" ? localization?.CHAT_GENERIC_ERROR_MESSAGE ?? index.AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_MESSAGE : (error instanceof Error ? error.message : void 0) ?? localization?.CHAT_GENERIC_ERROR_MESSAGE ?? index.AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_MESSAGE;
  return /* @__PURE__ */ jsxRuntime.jsx(errorPlaceholder.ErrorPlaceholder, { title, message });
}

exports.DefaultError = DefaultError;
