2026-01-12 16:00:53 +01:00
|
|
|
import { HelpCircle } from "lucide-react";
|
|
|
|
|
import Link from "next/link";
|
2026-01-20 15:30:25 +01:00
|
|
|
import { useTranslation } from "~/providers/I18nProvider";
|
2026-01-12 16:00:53 +01:00
|
|
|
import {
|
|
|
|
|
ExpandableScreen,
|
|
|
|
|
ExpandableScreenContent,
|
|
|
|
|
ExpandableScreenTrigger,
|
|
|
|
|
} from "./expandable_screen";
|
|
|
|
|
import { Button } from "./ui/button";
|
|
|
|
|
import { Separator } from "./ui/separator";
|
|
|
|
|
|
|
|
|
|
export const ComeFunziona = () => {
|
2026-01-20 15:30:25 +01:00
|
|
|
const { t } = useTranslation();
|
2026-01-12 16:00:53 +01:00
|
|
|
return (
|
|
|
|
|
<ExpandableScreen
|
|
|
|
|
contentRadius="14px"
|
|
|
|
|
layoutId="cta-card"
|
|
|
|
|
triggerRadius="100px"
|
|
|
|
|
>
|
|
|
|
|
<ExpandableScreenTrigger className="w-full">
|
2026-01-22 16:09:50 +01:00
|
|
|
<Button className="w-full text-lg md:text-base lg:text-lg" size="xl">
|
2026-01-16 15:47:38 +01:00
|
|
|
<HelpCircle />
|
2026-01-20 15:30:25 +01:00
|
|
|
<span>{t.come_funziona_guida.title}</span>
|
2026-01-12 16:00:53 +01:00
|
|
|
</Button>
|
|
|
|
|
</ExpandableScreenTrigger>
|
|
|
|
|
|
2026-01-22 16:09:50 +01:00
|
|
|
<ExpandableScreenContent className="bg-primary text-primary-foreground">
|
2026-01-12 16:00:53 +01:00
|
|
|
<div className="h-full space-y-6 p-6 py-12 sm:space-y-16 sm:px-10">
|
2026-01-20 15:30:25 +01:00
|
|
|
{t.come_funziona_guida.features.map((text, index) => (
|
2026-01-12 16:00:53 +01:00
|
|
|
// biome-ignore lint/suspicious/noArrayIndexKey: <ok>
|
|
|
|
|
<div className="space-y-6" key={index}>
|
|
|
|
|
<div className="space-y-2">
|
|
|
|
|
<h2 className="font-semibold text-4xl">{text.title}</h2>
|
|
|
|
|
{text.parts.map((p, i) => {
|
|
|
|
|
return typeof p === "object" ? (
|
|
|
|
|
<Link
|
|
|
|
|
className="text-2xl underline after:content-['_↗'] hover:text-secondary"
|
|
|
|
|
href={p.href}
|
|
|
|
|
// biome-ignore lint/suspicious/noArrayIndexKey: <ok>
|
|
|
|
|
key={`${index}-link-${i}`}
|
|
|
|
|
>
|
|
|
|
|
{p.text}
|
|
|
|
|
</Link>
|
|
|
|
|
) : (
|
|
|
|
|
<p
|
|
|
|
|
className="text-2xl"
|
|
|
|
|
// biome-ignore lint/suspicious/noArrayIndexKey: <ok>
|
|
|
|
|
key={`${index}-${i}`}
|
|
|
|
|
>
|
|
|
|
|
{p}
|
|
|
|
|
</p>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
<Separator />
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</ExpandableScreenContent>
|
|
|
|
|
</ExpandableScreen>
|
|
|
|
|
);
|
|
|
|
|
};
|