import { Spinner } from "./Spinner";
import "./LoadingState.css";

/** Inline loading block for a section of a page. */
export function LoadingState({ label = "Loading…" }) {
    return (
        <div className="dw-loading">
            <Spinner size={18} />
            <span>{label}</span>
        </div>
    );
}

/** Full-viewport loader — app boot, auth check, route-level suspense. */
export function FullPageLoader({ label = "Loading DocWeave…" }) {
    return (
        <div className="dw-loading dw-loading--full">
            <Spinner size={20} />
            <span>{label}</span>
        </div>
    );
}
