import { jsx, jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { StyledBox, StyledRow, StyledListItem } from "./StyledBox.js";
function LogConfigBox({ data }) {
  return /* @__PURE__ */ jsxs(StyledBox, { title: "Logging Configuration", children: [
    /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
      /* @__PURE__ */ jsx(StyledRow, { label: "Current level", value: data.currentLevel, valueColor: "green" }),
      data.logFile ? /* @__PURE__ */ jsx(StyledRow, { label: "Log file", value: data.logFile }) : null
    ] }),
    /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
      /* @__PURE__ */ jsx(Text, { color: "gray", children: "Available levels (least to most verbose):" }),
      data.availableLevels.map((level) => {
        const isCurrent = level === data.currentLevel;
        return /* @__PURE__ */ jsx(
          StyledListItem,
          {
            icon: isCurrent ? ">" : " ",
            text: level,
            isActive: isCurrent
          },
          level
        );
      })
    ] }),
    /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: "Use /log <level> to change level" }) })
  ] });
}
export {
  LogConfigBox
};
