import { jsx, jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { useTerminalSize } from "../../../hooks/useTerminalSize.js";
function StyledBox({ title, titleColor = "cyan", children }) {
  const { columns } = useTerminalSize();
  return /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 1, width: columns, children: /* @__PURE__ */ jsxs(
    Box,
    {
      flexDirection: "column",
      borderStyle: "round",
      borderColor: "gray",
      paddingX: 1,
      paddingY: 0,
      children: [
        /* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { bold: true, color: titleColor, children: title }) }),
        children
      ]
    }
  ) });
}
function StyledSection({ title, icon, children }) {
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
    /* @__PURE__ */ jsxs(Text, { bold: true, children: [
      icon && `${icon} `,
      title
    ] }),
    /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginLeft: 2, children })
  ] });
}
function StyledRow({ label, value, valueColor = "cyan" }) {
  return /* @__PURE__ */ jsxs(Box, { children: [
    /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
      label,
      ": "
    ] }),
    /* @__PURE__ */ jsx(Text, { color: valueColor, children: value })
  ] });
}
function StyledListItem({ icon, text, isActive, dimmed }) {
  const textProps = {};
  if (isActive) {
    textProps.color = "green";
    textProps.bold = true;
  }
  if (dimmed) {
    textProps.color = "gray";
  }
  return /* @__PURE__ */ jsxs(Box, { children: [
    icon && /* @__PURE__ */ jsxs(Text, { ...textProps, children: [
      icon,
      " "
    ] }),
    /* @__PURE__ */ jsx(Text, { ...textProps, children: text })
  ] });
}
export {
  StyledBox,
  StyledListItem,
  StyledRow,
  StyledSection
};
