import { jsx, jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { getProviderLabel, getAvailableProviders } from "../provider-config.js";
function ProviderSelector({
  selectedIndex,
  isEditing
}) {
  const providers = getAvailableProviders();
  return /* @__PURE__ */ jsxs(
    Box,
    {
      flexDirection: "column",
      borderStyle: "round",
      borderColor: "green",
      paddingX: 1,
      marginTop: 1,
      children: [
        /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsx(Text, { bold: true, color: "green", children: isEditing ? "Edit Custom Model" : "Add Custom Model" }) }),
        /* @__PURE__ */ jsx(Text, { bold: true, children: "Select Provider:" }),
        /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginTop: 1, children: providers.map((provider, index) => /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(
          Text,
          {
            color: index === selectedIndex ? "cyan" : "gray",
            bold: index === selectedIndex,
            children: [
              index === selectedIndex ? "\u276F " : "  ",
              getProviderLabel(provider)
            ]
          }
        ) }, provider)) }),
        /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: "\u2191\u2193 navigate \u2022 Enter select \u2022 Esc cancel" }) })
      ]
    }
  );
}
var ProviderSelector_default = ProviderSelector;
export {
  ProviderSelector,
  ProviderSelector_default as default
};
