// Copyright (c) 2026 PowerOn AG
// All rights reserved.
import styles from '../ContentPreview.module.css';

interface ApplicationRendererProps {
  previewUrl: string;
  fileName: string;
  mimeType?: string;
  onError: () => void;
}

export function ApplicationRenderer({ previewUrl, fileName, mimeType, onError }: ApplicationRendererProps) {
  return (
    <iframe
      src={previewUrl}
      className={styles.previewIframe}
      title={`Preview of ${fileName}`}
      data-mime-type={mimeType}
      onError={onError}
      style={{ background: 'white !important' }}
    />
  );
}

