/**
* Reusable page-level feedback components.
*
* Three shared building blocks for consistent data-loading UI across all pages:
*
* - {@link PageLoading} — Centred `Spinner` for full-region loading states.
* - {@link PageError} — `MessageBar` with an error message and a retry button.
* - {@link PageEmpty} — Centred neutral message for zero-result states.
*/
import {
Button,
MessageBar,
MessageBarActions,
MessageBarBody,
MessageBarTitle,
Spinner,
Text,
makeStyles,
tokens,
} from "@fluentui/react-components";
import { ArrowClockwiseRegular } from "@fluentui/react-icons";
// ---------------------------------------------------------------------------
// Styles
// ---------------------------------------------------------------------------
const useStyles = makeStyles({
centred: {
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
minHeight: "120px",
gap: tokens.spacingVerticalM,
padding: tokens.spacingVerticalL,
},
emptyText: {
color: tokens.colorNeutralForeground3,
textAlign: "center",
},
});
// ---------------------------------------------------------------------------
// PageLoading
// ---------------------------------------------------------------------------
export interface PageLoadingProps {
/** Short description shown next to the spinner. */
label?: string;
}
/**
* Full-region loading indicator using a Fluent UI `Spinner`.
*
* @example
* ```tsx
* if (loading) return