"use client"; import * as React from "react"; import { isStatementLocale, type StatementLocale } from "@accessibit/types"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "../ui/select"; import { useMessages } from "../context"; import { cn } from "../lib/cn"; /** * The statement page's language as a select: the one in the card "Pubblica * sul tuo sito", under its label "Lingua". It drives the same page-level * state as the preview's switch and the tabs of the free text, so it is the * page's one language shown once more, not a setting of its own. * * It never changes what gets published. All three languages are generated on * every save; this only moves what the page shows you — the text being * written, the preview, and the direct link in the embed card. * * The trigger carries the label's own word as its name ("Lingua"): the label * beside it is tied to it too, and the two say the same. */ export function StatementLanguageSelect({ value, onChange, locales, size = "default", id, className, disabled, }: { value: StatementLocale; onChange: (locale: StatementLocale) => void; /** Offered languages, in display order. */ locales: readonly StatementLocale[]; size?: "sm" | "default"; id?: string; className?: string; disabled?: boolean; }) { const messages = useMessages(); const statementDict = messages.statement; return ( ); }