import { siteConfig } from "@/lib/site-config";
import { Mock3DPlaceholder } from "./Mock3DPlaceholder";
import { VirtualTourEmbed } from "./VirtualTourEmbed";

type Props = {
  embedUrl: string | null | undefined;
  title: string;
  videoTourUrl?: string | null;
  className?: string;
};

export function VirtualTourBlock({
  embedUrl,
  title,
  videoTourUrl = siteConfig.videoTourUrl,
  className,
}: Props) {
  if (embedUrl) {
    return <VirtualTourEmbed src={embedUrl} title={title} className={className} />;
  }
  return (
    <Mock3DPlaceholder
      videoTourUrl={videoTourUrl}
      className={className}
      label="Virtual tour — demo preview"
    />
  );
}
