import Link from "next/link"; import { KeyRound } from "lucide-react"; import type { AccessRequestView } from "@peppa/core"; import type { Translator } from "@peppa/shared/i18n"; import { ago } from "@/components/common"; import { Badge } from "@/components/ui/badge"; import { Card } from "@/components/ui/card"; /** «читать» / «читать и менять». */ export function accessModeText(mode: AccessRequestView["mode"], t: Translator): string { return mode === "write" ? t("читать и менять") : t("только читать"); } export function AccessStatus({ r, t }: { r: AccessRequestView; t: Translator }) { if (r.status === "open") return {t("ждёт вашего решения")}; if (r.status === "granted") return {t("доступ выдан")}; if (r.status === "denied") return {t("отказано")}; return {t("агент отменил запрос")}; } /** PEP-250: «Агенты просят доступ» on «Подключения» — the owner's open requests. */ export function AccessRequestList({ list, t }: { list: AccessRequestView[]; t: Translator }) { return ( ); }