"use client";
import { jsx } from 'react/jsx-runtime';
import { ErrorPlaceholder } from './error-placeholder.mjs';
import { usePluginOverrides } from '@btst/stack/context';
import { BLOG_LOCALIZATION } from '../../localization/index.mjs';

function DefaultError({ error }) {
  const { localization } = usePluginOverrides("blog", {
    localization: BLOG_LOCALIZATION
  });
  const title = localization.BLOG_GENERIC_ERROR_TITLE;
  const message = process.env.NODE_ENV === "production" ? localization.BLOG_GENERIC_ERROR_MESSAGE : error?.message ?? localization.BLOG_GENERIC_ERROR_MESSAGE;
  return /* @__PURE__ */ jsx(ErrorPlaceholder, { title, message });
}

export { DefaultError };
