import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { StatusIcon } from "./StatusIcon.js";
export function loadingStateLabel(model) {
    const message = model.message.trim() || "Working";
    const subtitle = model.subtitle?.trim();
    return subtitle ? `${message} - ${subtitle}` : message;
}
export function LoadingState(props) {
    return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(StatusIcon, { state: "loading", withSpace: true }), _jsx(Text, { bold: props.bold, dimColor: props.dim, children: props.message })] }), props.subtitle && _jsx(Text, { color: "gray", children: props.subtitle })] }));
}
