2025-04-27 13:03:00 -04:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
import { cn } from "@app/lib/cn";
|
2025-05-25 17:41:38 +03:00
|
|
|
import { useTranslations } from "next-intl";
|
2025-04-27 13:03:00 -04:00
|
|
|
|
|
|
|
type ProfessionalContentOverlayProps = {
|
|
|
|
children: React.ReactNode;
|
|
|
|
isProfessional?: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export function ProfessionalContentOverlay({
|
|
|
|
children,
|
|
|
|
isProfessional = false
|
|
|
|
}: ProfessionalContentOverlayProps) {
|
2025-05-25 17:41:38 +03:00
|
|
|
const t = useTranslations();
|
|
|
|
|
2025-04-27 13:03:00 -04:00
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className={cn(
|
|
|
|
"relative",
|
|
|
|
isProfessional && "opacity-60 pointer-events-none"
|
|
|
|
)}
|
|
|
|
>
|
|
|
|
{isProfessional && (
|
|
|
|
<div className="absolute inset-0 flex items-center justify-center bg-background/80 z-50">
|
|
|
|
<div className="text-center p-6 bg-primary/10 rounded-lg">
|
|
|
|
<h3 className="text-lg font-semibold mb-2">
|
2025-05-25 17:41:38 +03:00
|
|
|
{t('licenseTierProfessionalRequired')}
|
2025-04-27 13:03:00 -04:00
|
|
|
</h3>
|
|
|
|
<p className="text-muted-foreground">
|
2025-05-25 17:41:38 +03:00
|
|
|
{t('licenseTierProfessionalRequiredDescription')}
|
2025-04-27 13:03:00 -04:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|