import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
export function PermissionRiskCallout(props) {
    const model = permissionRiskModel(props.state);
    return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: model.color, children: model.title }), _jsx(Text, { color: "gray", children: model.detail })] }));
}
export function permissionRiskModel(state) {
    if (state.allowShell && state.allowBrowser) {
        return {
            level: "high",
            title: "High trust mode",
            detail: "Shell and browser control are both enabled. Use this only in trusted local projects.",
            color: "yellow",
        };
    }
    if (state.allowShell) {
        return {
            level: "medium",
            title: "Shell enabled",
            detail: "Local commands can run builds, tests, and scripts from the selected project.",
            color: "yellow",
        };
    }
    if (state.allowBrowser) {
        return {
            level: "medium",
            title: "Browser enabled",
            detail: "Browser/CDP actions can inspect and interact with configured pages.",
            color: "yellow",
        };
    }
    return {
        level: "low",
        title: "Safe profile",
        detail: "Shell and browser control are off; file and validation workflows remain available.",
        color: "green",
    };
}
