/** @param {{ label?: string }} props */ export function LoadingSurface({ label = "불러오는 중" }) { return (
); } /** @param {{ title?: string, action?: React.ReactNode }} props */ export function EmptySurface({ title = "표시할 항목이 없습니다.", action }) { return (

{title}

{action}
); } /** * @param {{ * userMessageKey: string, * action: "retry" | "reauth" | "navigate" | "reload-once" | * "contact-support" | "none", * onAction?: () => void * }} props */ export function TerminalErrorSurface({ userMessageKey, action, onAction }) { return (

{userMessageKey}

{action !== "none" && ( )}
); } /** * @param {{ * state: ReturnType, * children?: React.ReactNode, * onAction?: () => void * }} props */ export function AsyncSurface({ state, children, onAction }) { if (state.base === "initial-loading") return ; if (state.base === "empty") return ; if (state.base === "terminal-error" && state.failure) { return ( ); } return (
{state.indicator && (

{state.indicator}

)} {children}
); }