import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import { Box, Text } from "ink";
import { useTheme } from "../theme/theme.js";
import { presentDuration, presentError, presentQueued, presentStepDone, presentStylePack, presentUpdateNotice, } from "./presentation.js";
export function StylePackRow({ item }) {
    const theme = useTheme();
    const presentation = presentStylePack(item);
    return (_jsx(Box, { paddingLeft: 1, flexShrink: 1, children: _jsxs(Box, { flexShrink: 1, flexDirection: "column", borderStyle: "round", borderColor: theme.language, paddingX: 1, children: [_jsxs(Text, { wrap: "wrap", children: [_jsx(Text, { color: theme.language, bold: true, children: "◆ " }), _jsx(Text, { color: theme.language, bold: true, children: presentation.headerLabel })] }), _jsx(Text, { color: theme.text, bold: true, wrap: "wrap", children: presentation.names })] }) }, item.id));
}
export function ErrorRow({ item }) {
    const theme = useTheme();
    const presentation = presentError(item);
    return (_jsxs(Box, { flexDirection: "row", paddingLeft: 1, flexShrink: 1, children: [_jsx(Box, { width: 2, flexShrink: 0, children: _jsx(Text, { color: theme.error, bold: true, children: presentation.glyph }) }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [_jsx(Text, { color: theme.error, wrap: "wrap", children: presentation.headline }), presentation.message && (_jsx(Text, { color: theme.textDim, wrap: "wrap", children: presentation.message })), _jsx(Text, { color: theme.textDim, wrap: "wrap", children: presentation.guidance })] })] }, item.id));
}
export function UpdateNoticeRow({ item }) {
    const theme = useTheme();
    const presentation = presentUpdateNotice(item);
    return (_jsx(Box, { paddingLeft: 1, flexShrink: 1, children: _jsx(Box, { flexShrink: 1, borderStyle: "round", borderColor: theme.commandColor, paddingX: 1, children: _jsx(Text, { color: theme.commandColor, bold: true, wrap: "wrap", children: presentation.text }) }) }, item.id));
}
export function StepDoneRow({ item }) {
    const theme = useTheme();
    const presentation = presentStepDone(item);
    return (_jsx(Box, { paddingLeft: 1, flexShrink: 1, children: _jsxs(Text, { wrap: "wrap", children: [_jsx(Text, { color: theme.planPrimary, bold: true, children: presentation.glyph }), _jsx(Text, { color: theme.planPrimary, bold: true, children: presentation.text }), presentation.description ? (_jsx(Text, { color: theme.accent, children: presentation.description })) : null] }) }, item.id));
}
export function QueuedRow({ item }) {
    const theme = useTheme();
    const presentation = presentQueued(item);
    return (_jsxs(Box, { flexDirection: "row", paddingLeft: 1, flexShrink: 1, children: [_jsx(Box, { width: 2, flexShrink: 0, children: _jsx(Text, { color: theme.warning, bold: true, children: presentation.glyph }) }), _jsx(Box, { flexDirection: "column", flexGrow: 1, children: _jsxs(Text, { color: theme.text, wrap: "wrap", children: [_jsx(Text, { color: theme.textDim, children: presentation.label }), presentation.text, presentation.suffix] }) })] }, item.id));
}
export function DurationRow({ item }) {
    const theme = useTheme();
    const presentation = presentDuration(item);
    return (_jsx(Box, { paddingLeft: 1, children: _jsxs(Text, { color: theme.textDim, children: [presentation.glyph, presentation.text] }) }, item.id));
}
//# sourceMappingURL=MiscRows.js.map