"use client"; import { useStore } from "@/lib/store"; import { useT } from "@/lib/i18n"; import { TemplatePicker } from "./template-picker"; import { ExportMenu } from "./export-menu"; import { LayoutModeToggle } from "./layout-mode-toggle"; import { DeployControl } from "./deploy-control"; export function Toolbar({ iframeRef, onOpenAgentPicker, onOpenSettings, onRequestConfigureDeploy, deployConfigRev, }: { iframeRef: React.MutableRefObject; onOpenAgentPicker: () => void; onOpenSettings: () => void; onRequestConfigureDeploy: () => void; deployConfigRev: number; }) { const agent = useStore((s) => s.selectedAgent); const agents = useStore((s) => s.agents); const agentModels = useStore((s) => s.agentModels); const t = useT(); const agentInfo = agents.find((a) => a.id === agent); const model = agent ? agentModels[agent] ?? "default" : "default"; return (
); } function HistoryToggle() { const open = useStore((s) => s.historyPaneOpen); const setOpen = useStore((s) => s.setHistoryPaneOpen); const t = useT(); return ( ); } function CommunityLinks() { const t = useT(); const linkCls = "grid h-9 w-9 place-items-center rounded-full border text-[var(--ink-soft)] transition-all hover:border-[var(--ink)]/30 hover:text-[var(--ink)]"; const linkStyle = { background: "var(--surface)", borderColor: "var(--line)" }; const githubLabel = t("community.starOnGitHub"); const discordLabel = t("community.joinDiscord"); return (
); } function Brand() { const t = useT(); return (
H
HTML Anything
{t("brand.subtitle")}
); }