import { useState } from "react";
import { Link } from "react-router";
import { useSWRConfig } from "swr";
import { PlusIcon } from "@heroicons/react/16/solid";
import type { SecretMetadata } from "@qltysh/fabro-api-client";
import { ApiError, apiData, secretsApi } from "../lib/api-client";
import { useSecrets } from "../lib/queries";
import { queryKeys } from "../lib/query-keys";
import {
Badge,
Panel,
PanelSkeleton,
SettingsPageIntro,
} from "../components/settings-panel";
import { COMPACT_SECONDARY_BUTTON_CLASS, ConfirmDialog } from "../components/ui";
import { useToast } from "../components/toast";
import { formatAbsoluteTs, formatRelativeTime } from "../lib/format";
export function meta() {
return [{ title: "Secrets — Fabro" }];
}
const DESCRIPTION =
"Secrets are values stored on this Fabro server and made available to workflow runs. Values are write-only — they can be replaced or deleted, but never read back through the UI.";
export default function SettingsSecrets() {
const query = useSecrets();
return (