import { useSearchParams } from "react-router-dom";
import type { CurrentUser } from "../api/client";
import ViewTabs from "../components/ViewTabs";
import Backups from "./Backups";
import PbsBackup from "./PbsBackup";
/**
* The Proxmox backups, on one page with a tab for each view: **Backup coverage** (is every guest in a backup job, and when was it last backed up) and **Proxmox Backup Server** (its datastores,
* what is stored and whether it verifies). The second is `?view=pbs`; `/pbs` goes there, so a link or a favourite made before they were one page still works.
*/
export default function BackupsHub({ user }: { user: CurrentUser }) {
const [params] = useSearchParams();
const view = params.get("view") === "pbs" ? "pbs" : "coverage";
const tabs = (
);
return view === "pbs" ? : ;
}