// Copyright: © 2026 TWWIM UG. All rights reserved. (www.twwim.com)
/**
 * PluginSettingsLoadError — red panel shown when the settings query fails.
 *
 * @layer Presentation
 */

import type { TFunction } from '../lib/constants';

interface PluginSettingsLoadErrorProps {
  error: Error;
  t: TFunction;
}

export function PluginSettingsLoadError({
  error,
  t,
}: PluginSettingsLoadErrorProps) {
  return (
    <div className="p-8">
      <div className="bg-red-50 border border-red-200 rounded-lg p-6">
        <p className="text-red-800 font-medium">
          {t('tenants.pluginSettings.loadFailedTitle')}
        </p>
        <p className="text-red-700 text-sm mt-1">{error.message}</p>
      </div>
    </div>
  );
}
