import { _ as __nuxt_component_0 } from './Card-BkfpdQZ7.mjs';
import { a as __nuxt_component_1 } from './Button-Dgqz5RR8.mjs';
import { _ as __nuxt_component_2, u as useApi } from './useApi-CFWxoIea.mjs';
import { _ as __nuxt_component_3 } from './FormGroup-UXO0FHfr.mjs';
import { _ as __nuxt_component_4 } from './Select-ByGZz9s4.mjs';
import { _ as __nuxt_component_5 } from './Input-ckU7qZlb.mjs';
import { _ as __nuxt_component_6 } from './Badge-2SB8hHdz.mjs';
import { _ as __nuxt_component_7 } from './Modal-KQ_hNOLI.mjs';
import { defineComponent, ref, reactive, computed, mergeProps, withCtx, unref, createTextVNode, createVNode, openBlock, createBlock, createCommentVNode, toDisplayString, Fragment, renderList, isRef, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList } from 'vue/server-renderer';
import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs';
import 'tailwind-merge';
import './selectMenu-B2FUotwL.mjs';
import './server.mjs';
import '../nitro/nitro.mjs';
import 'node:path';
import 'node:module';
import 'node:fs';
import 'node:os';
import 'dotenv';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:crypto';
import 'node:async_hooks';
import 'node:url';
import 'node:net';
import '@iconify/utils';
import 'consola';
import 'vue-router';
import '@vueuse/core';
import '@iconify/vue';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'unhead/plugins';
import './nuxt-link-B3UD8izG.mjs';
import './index-Dy4Tu7MB.mjs';
import '@iconify/utils/lib/css/icon';
import 'perfect-debounce';

const KNOWN_PROVIDER_SELECT_KEY = "PROVIDER";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "config",
  __ssrInlineRender: true,
  setup(__props) {
    const api = useApi();
    const filePath = ref("");
    const fileExists = ref(null);
    const loading = ref(false);
    const loadError = ref("");
    const saving = ref(false);
    const saved = ref(false);
    const savedCount = ref(0);
    const kv = reactive({});
    const original = reactive({});
    const testing = reactive({ provider: false, ai: false });
    const testResults = reactive({
      provider: null,
      ai: null
    });
    const testAgent = ref("");
    const addKeyDialog = ref(false);
    const newKey = ref("");
    const newValue = ref("");
    const newKeyError = ref("");
    const providerOptions = [
      { label: "ClickUp", value: "clickup" },
      { label: "Jira", value: "jira" },
      { label: "Linear", value: "linear" },
      { label: "Monday", value: "monday" },
      { label: "Notion", value: "notion" },
      { label: "Trello", value: "trello" },
      { label: "Local", value: "local" }
    ];
    const VALID_AGENTS = [
      "antigravity",
      "anthropic-sdk",
      "claude",
      "codex",
      "cursor",
      "windsurf"
    ];
    const agentTypeOptions = VALID_AGENTS.map((id) => ({ label: id, value: id }));
    const AGENT_FIELDS = {
      claude: [
        {
          key: "CLAUDE_MODEL",
          help: "Model passed to `claude --model`. Default routes plan\u2192opus and code\u2192sonnet.",
          placeholder: "opusplan"
        }
      ],
      "anthropic-sdk": [
        {
          key: "ANTHROPIC_API_KEY",
          help: "Accepts a single key or comma-separated pool; the runner rotates round-robin.",
          secret: true
        },
        { key: "ANTHROPIC_MODEL", placeholder: "claude-opus-4-6" },
        {
          key: "ANTHROPIC_BASE_URL",
          help: "Optional \u2014 leave blank for default.",
          placeholder: "https://api.anthropic.com"
        },
        {
          key: "ANTHROPIC_SDK_MAX_RETRIES",
          help: "Retries after transient SDK errors. Set 0 to disable. Default: 3.",
          placeholder: "3"
        }
      ],
      windsurf: [
        {
          key: "WINDSURF_TOKEN",
          help: "Required for Docker mode on Windows.",
          secret: true
        },
        {
          key: "WINDSURF_DOCKER_IMAGE",
          help: "Docker image for headless Windsurf on Windows.",
          placeholder: "windsurfinabox"
        },
        {
          key: "WINDSURF_CONFIG_DIR",
          help: "Optional \u2014 defaults to ~/.config/Windsurf."
        }
      ],
      cursor: [],
      codex: [],
      antigravity: []
    };
    const agentCliHelp = {
      cursor: "Uses the `agent` CLI \u2014 no extra env keys.",
      codex: "Uses the `codex` CLI. Set OPENAI_API_KEY or run `codex login`.",
      antigravity: "Uses the `agy` or `antigravity` CLI \u2014 no extra env keys."
    };
    let nextAgentUid = 0;
    const agentBlocks = ref([]);
    const agentTestOptions = computed(
      () => agentBlocks.value.map((b) => ({ label: b.type, value: b.type }))
    );
    const PROVIDER_FIELDS = {
      clickup: [
        { key: "CLICKUP_API_KEY", secret: true },
        { key: "CLICKUP_TEAM_ID" },
        { key: "CLICKUP_TAG", help: "Tag used to scope tasks to this project." },
        { key: "CLICKUP_LIST_ID", help: "Optional \u2014 required to create tasks." },
        { key: "CLICKUP_PENDING_STATUS", placeholder: "pending" },
        { key: "CLICKUP_OPEN_STATUS", placeholder: "open" },
        { key: "CLICKUP_IN_REVIEW_STATUS", placeholder: "review" }
      ],
      jira: [
        { key: "JIRA_BASE_URL", placeholder: "https://mycompany.atlassian.net" },
        { key: "JIRA_EMAIL" },
        { key: "JIRA_API_TOKEN", secret: true },
        { key: "JIRA_PROJECT" },
        { key: "JIRA_LABEL" },
        { key: "JIRA_PENDING_STATUS", placeholder: "To Do" },
        { key: "JIRA_IN_REVIEW_STATUS", placeholder: "In Review" }
      ],
      linear: [
        { key: "LINEAR_API_KEY", secret: true },
        { key: "LINEAR_TEAM_ID" },
        { key: "LINEAR_LABEL" },
        { key: "LINEAR_PENDING_STATUS", placeholder: "Pending" },
        { key: "LINEAR_IN_REVIEW_STATUS", placeholder: "In Review" }
      ],
      monday: [
        { key: "MONDAY_API_TOKEN", secret: true },
        { key: "MONDAY_BOARD_ID" },
        { key: "MONDAY_STATUS_COLUMN_ID", placeholder: "status" },
        { key: "MONDAY_GROUP_ID" }
      ],
      notion: [
        { key: "NOTION_API_KEY", secret: true },
        { key: "NOTION_DATABASE_ID" },
        { key: "NOTION_STATUS_PROPERTY", placeholder: "Status" },
        { key: "NOTION_PENDING_STATUS", placeholder: "pending" },
        { key: "NOTION_IN_REVIEW_STATUS", placeholder: "review" }
      ],
      trello: [
        { key: "TRELLO_API_KEY", secret: true },
        { key: "TRELLO_TOKEN", secret: true },
        { key: "TRELLO_BOARD_ID" },
        { key: "TRELLO_LABEL" },
        { key: "TRELLO_OPEN_LIST", placeholder: "To Do" },
        { key: "TRELLO_PENDING_LIST", placeholder: "Blocked" },
        { key: "TRELLO_IN_PROGRESS_LIST", placeholder: "Doing" },
        { key: "TRELLO_IN_REVIEW_LIST", placeholder: "In Review" }
      ],
      local: []
    };
    const KNOWN_AI_KEYS = [
      "AGENTS",
      "CLAUDE_MODEL",
      "ANTHROPIC_API_KEY",
      "ANTHROPIC_MODEL",
      "ANTHROPIC_BASE_URL",
      "ANTHROPIC_SDK_MAX_RETRIES",
      "WINDSURF_TOKEN",
      "WINDSURF_DOCKER_IMAGE",
      "WINDSURF_CONFIG_DIR"
    ];
    const devNotesModeOptions = [
      { label: "smart", value: "smart" },
      { label: "always", value: "always" }
    ];
    const KNOWN_WORKFLOW_KEYS = [
      "DEV_NOTES_MODE",
      "ASSIGNEE_TAG",
      "AIDEV_TRIGGER_WORD",
      "THINKING_TAG",
      "PLANNING_TAG",
      "ACCEPTED_TAG",
      "DONE_STATUS",
      "AIDEV_COMMENT_PREFIX",
      "AIDEV_HOOKS_PATH",
      "AIDEV_AUTO_COMPRESS",
      "AIDEV_COMPRESS_THRESHOLD",
      "GIT_REMOTE",
      "GITHUB_BASE_BRANCH",
      "GITHUB_REPO"
    ];
    const KNOWN_LOG_KEYS = ["AIDEV_LOG_PATH"];
    const providerFields = computed(() => {
      var _a;
      const provider = (kv.PROVIDER || "clickup").toLowerCase();
      return (_a = PROVIDER_FIELDS[provider]) != null ? _a : [];
    });
    const managedKeys = computed(() => {
      const all = /* @__PURE__ */ new Set([
        KNOWN_PROVIDER_SELECT_KEY,
        ...KNOWN_AI_KEYS,
        ...KNOWN_WORKFLOW_KEYS,
        ...KNOWN_LOG_KEYS
      ]);
      for (const fields of Object.values(PROVIDER_FIELDS)) {
        for (const f of fields) all.add(f.key);
      }
      return all;
    });
    const otherKeys = computed(
      () => Object.keys(kv).filter((k) => !managedKeys.value.has(k)).sort()
    );
    const dirty = computed(() => {
      var _a, _b;
      const a = Object.keys(kv);
      const b = Object.keys(original);
      if (a.length !== b.length) return true;
      for (const k of a) {
        if (((_a = kv[k]) != null ? _a : "") !== ((_b = original[k]) != null ? _b : "")) return true;
      }
      return false;
    });
    function isSecretKey(key) {
      return /(KEY|TOKEN|SECRET|PASSWORD)$/i.test(key);
    }
    function fieldsForAgent(type) {
      var _a;
      return (_a = AGENT_FIELDS[type]) != null ? _a : [];
    }
    function parseAgentBlocks(agentsRaw) {
      const types = agentsRaw.split(",").map((s) => s.trim()).filter(Boolean).filter((t) => VALID_AGENTS.includes(t));
      if (types.length === 0) {
        return [{ uid: nextAgentUid++, type: "claude" }, { uid: nextAgentUid++, type: "cursor" }];
      }
      return types.map((type) => ({ uid: nextAgentUid++, type }));
    }
    function syncAgentsToKv() {
      kv.AGENTS = agentBlocks.value.map((b) => b.type).join(",");
    }
    function addAgent() {
      var _a;
      const used = new Set(agentBlocks.value.map((b) => b.type));
      const next = (_a = VALID_AGENTS.find((a) => !used.has(a))) != null ? _a : "claude";
      agentBlocks.value.push({ uid: nextAgentUid++, type: next });
      syncAgentsToKv();
    }
    function removeAgent(index) {
      if (agentBlocks.value.length <= 1) return;
      agentBlocks.value.splice(index, 1);
      syncAgentsToKv();
    }
    function moveAgent(index, delta) {
      const target = index + delta;
      const item = agentBlocks.value[index];
      if (!item || target < 0 || target >= agentBlocks.value.length) return;
      const blocks = [...agentBlocks.value];
      blocks.splice(index, 1);
      blocks.splice(target, 0, item);
      agentBlocks.value = blocks;
      syncAgentsToKv();
    }
    function applyData(data) {
      var _a, _b, _c, _d;
      filePath.value = data.path;
      fileExists.value = data.exists;
      for (const k of Object.keys(kv)) delete kv[k];
      for (const k of Object.keys(original)) delete original[k];
      const seed = {};
      seed[KNOWN_PROVIDER_SELECT_KEY] = data.values[KNOWN_PROVIDER_SELECT_KEY] || "clickup";
      for (const k of KNOWN_AI_KEYS) seed[k] = (_a = data.values[k]) != null ? _a : "";
      for (const k of KNOWN_WORKFLOW_KEYS) seed[k] = (_b = data.values[k]) != null ? _b : "";
      for (const k of KNOWN_LOG_KEYS) seed[k] = (_c = data.values[k]) != null ? _c : "";
      for (const [k, v] of Object.entries(data.values)) seed[k] = v;
      for (const [k, v] of Object.entries(seed)) {
        kv[k] = v;
        original[k] = v;
      }
      agentBlocks.value = parseAgentBlocks(kv.AGENTS || "");
      syncAgentsToKv();
      const configured = agentBlocks.value.map((b) => b.type);
      if (!testAgent.value || !configured.includes(testAgent.value)) {
        testAgent.value = (_d = configured[0]) != null ? _d : "";
      }
    }
    async function reload() {
      loading.value = true;
      loadError.value = "";
      try {
        const data = await api("/api/config");
        applyData(data);
      } catch (err) {
        loadError.value = err instanceof Error ? err.message : String(err);
      } finally {
        loading.value = false;
      }
    }
    async function save() {
      saving.value = true;
      saved.value = false;
      loadError.value = "";
      try {
        const data = await api("/api/config", {
          method: "PUT",
          body: { values: { ...kv } }
        });
        savedCount.value = Object.keys(data.values).length;
        applyData(data);
        saved.value = true;
        setTimeout(() => saved.value = false, 3e3);
      } catch (err) {
        loadError.value = err instanceof Error ? err.message : String(err);
      } finally {
        saving.value = false;
      }
    }
    async function createDefaults() {
      const defaults = {
        PROVIDER: "clickup",
        AGENTS: "claude,cursor",
        DEV_NOTES_MODE: "smart",
        AIDEV_TRIGGER_WORD: "aidev-continue",
        THINKING_TAG: "thinking",
        PLANNING_TAG: "planning"
      };
      saving.value = true;
      try {
        const data = await api("/api/config", {
          method: "PUT",
          body: { values: defaults }
        });
        applyData(data);
      } catch (err) {
        loadError.value = err instanceof Error ? err.message : String(err);
      } finally {
        saving.value = false;
      }
    }
    async function testProvider() {
      testing.provider = true;
      testResults.provider = null;
      try {
        testResults.provider = await api("/api/config/test", {
          method: "POST",
          body: { provider: true }
        });
      } catch (err) {
        testResults.provider = {
          ok: false,
          message: err instanceof Error ? err.message : String(err)
        };
      } finally {
        testing.provider = false;
      }
    }
    async function testAi() {
      if (!testAgent.value) return;
      testing.ai = true;
      testResults.ai = null;
      try {
        testResults.ai = await api("/api/config/test", {
          method: "POST",
          body: { ai: testAgent.value }
        });
      } catch (err) {
        testResults.ai = {
          ok: false,
          message: err instanceof Error ? err.message : String(err)
        };
      } finally {
        testing.ai = false;
      }
    }
    function removeKey(key) {
      delete kv[key];
    }
    function closeAddKey() {
      addKeyDialog.value = false;
      newKey.value = "";
      newValue.value = "";
      newKeyError.value = "";
    }
    function commitAddKey() {
      const k = newKey.value.trim();
      if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(k)) {
        newKeyError.value = "Key must match [A-Za-z_][A-Za-z0-9_]*";
        return;
      }
      if (k in kv) {
        newKeyError.value = `Key ${k} already exists`;
        return;
      }
      kv[k] = newValue.value;
      closeAddKey();
    }
    return (_ctx, _push, _parent, _attrs) => {
      const _component_UCard = __nuxt_component_0;
      const _component_UButton = __nuxt_component_1;
      const _component_UAlert = __nuxt_component_2;
      const _component_UFormGroup = __nuxt_component_3;
      const _component_USelect = __nuxt_component_4;
      const _component_UInput = __nuxt_component_5;
      const _component_UBadge = __nuxt_component_6;
      const _component_UModal = __nuxt_component_7;
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "config-page" }, _attrs))} data-v-62b03b92>`);
      _push(ssrRenderComponent(_component_UCard, null, {
        header: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="flex items-center justify-between gap-3" data-v-62b03b92${_scopeId}><div data-v-62b03b92${_scopeId}><h1 class="text-lg font-semibold" data-v-62b03b92${_scopeId}>Config</h1><p class="text-xs text-gray-500 mt-1" data-v-62b03b92${_scopeId}><code data-v-62b03b92${_scopeId}>${ssrInterpolate(unref(filePath) || "\u2014")}</code>`);
            if (unref(fileExists) === false) {
              _push2(`<span class="ml-2 text-amber-600" data-v-62b03b92${_scopeId}>not found</span>`);
            } else if (unref(fileExists)) {
              _push2(`<span class="ml-2 text-emerald-600" data-v-62b03b92${_scopeId}>loaded</span>`);
            } else {
              _push2(`<!---->`);
            }
            _push2(`</p></div><div class="flex items-center gap-2" data-v-62b03b92${_scopeId}>`);
            _push2(ssrRenderComponent(_component_UButton, {
              color: "gray",
              variant: "ghost",
              size: "sm",
              loading: unref(loading),
              disabled: unref(loading),
              onClick: reload
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(` Reload `);
                } else {
                  return [
                    createTextVNode(" Reload ")
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UButton, {
              color: "primary",
              size: "sm",
              loading: unref(saving),
              disabled: unref(saving) || !unref(dirty),
              onClick: save
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(` Save changes `);
                } else {
                  return [
                    createTextVNode(" Save changes ")
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`</div></div>`);
          } else {
            return [
              createVNode("div", { class: "flex items-center justify-between gap-3" }, [
                createVNode("div", null, [
                  createVNode("h1", { class: "text-lg font-semibold" }, "Config"),
                  createVNode("p", { class: "text-xs text-gray-500 mt-1" }, [
                    createVNode("code", null, toDisplayString(unref(filePath) || "\u2014"), 1),
                    unref(fileExists) === false ? (openBlock(), createBlock("span", {
                      key: 0,
                      class: "ml-2 text-amber-600"
                    }, "not found")) : unref(fileExists) ? (openBlock(), createBlock("span", {
                      key: 1,
                      class: "ml-2 text-emerald-600"
                    }, "loaded")) : createCommentVNode("", true)
                  ])
                ]),
                createVNode("div", { class: "flex items-center gap-2" }, [
                  createVNode(_component_UButton, {
                    color: "gray",
                    variant: "ghost",
                    size: "sm",
                    loading: unref(loading),
                    disabled: unref(loading),
                    onClick: reload
                  }, {
                    default: withCtx(() => [
                      createTextVNode(" Reload ")
                    ]),
                    _: 1
                  }, 8, ["loading", "disabled"]),
                  createVNode(_component_UButton, {
                    color: "primary",
                    size: "sm",
                    loading: unref(saving),
                    disabled: unref(saving) || !unref(dirty),
                    onClick: save
                  }, {
                    default: withCtx(() => [
                      createTextVNode(" Save changes ")
                    ]),
                    _: 1
                  }, 8, ["loading", "disabled"])
                ])
              ])
            ];
          }
        }),
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            if (unref(loadError)) {
              _push2(ssrRenderComponent(_component_UAlert, {
                color: "red",
                variant: "soft",
                title: unref(loadError),
                class: "mb-4"
              }, null, _parent2, _scopeId));
            } else {
              _push2(`<!---->`);
            }
            if (unref(fileExists) === false) {
              _push2(ssrRenderComponent(_component_UAlert, {
                color: "amber",
                variant: "soft",
                title: ".env.aidev does not exist",
                description: "Press \u201CCreate with defaults\u201D to seed the file with the minimum keys needed to start configuring.",
                class: "mb-4"
              }, {
                actions: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(_component_UButton, {
                      size: "sm",
                      color: "amber",
                      loading: unref(saving),
                      onClick: createDefaults
                    }, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(` Create with defaults `);
                        } else {
                          return [
                            createTextVNode(" Create with defaults ")
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(_component_UButton, {
                        size: "sm",
                        color: "amber",
                        loading: unref(saving),
                        onClick: createDefaults
                      }, {
                        default: withCtx(() => [
                          createTextVNode(" Create with defaults ")
                        ]),
                        _: 1
                      }, 8, ["loading"])
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
            } else {
              _push2(`<!---->`);
            }
            if (unref(saved)) {
              _push2(`<div class="mb-4" data-v-62b03b92${_scopeId}>`);
              _push2(ssrRenderComponent(_component_UAlert, {
                color: "green",
                variant: "soft",
                title: "Saved",
                description: `Wrote ${unref(savedCount)} key(s).`
              }, null, _parent2, _scopeId));
              _push2(`</div>`);
            } else {
              _push2(`<!---->`);
            }
          } else {
            return [
              unref(loadError) ? (openBlock(), createBlock(_component_UAlert, {
                key: 0,
                color: "red",
                variant: "soft",
                title: unref(loadError),
                class: "mb-4"
              }, null, 8, ["title"])) : createCommentVNode("", true),
              unref(fileExists) === false ? (openBlock(), createBlock(_component_UAlert, {
                key: 1,
                color: "amber",
                variant: "soft",
                title: ".env.aidev does not exist",
                description: "Press \u201CCreate with defaults\u201D to seed the file with the minimum keys needed to start configuring.",
                class: "mb-4"
              }, {
                actions: withCtx(() => [
                  createVNode(_component_UButton, {
                    size: "sm",
                    color: "amber",
                    loading: unref(saving),
                    onClick: createDefaults
                  }, {
                    default: withCtx(() => [
                      createTextVNode(" Create with defaults ")
                    ]),
                    _: 1
                  }, 8, ["loading"])
                ]),
                _: 1
              })) : createCommentVNode("", true),
              unref(saved) ? (openBlock(), createBlock("div", {
                key: 2,
                class: "mb-4"
              }, [
                createVNode(_component_UAlert, {
                  color: "green",
                  variant: "soft",
                  title: "Saved",
                  description: `Wrote ${unref(savedCount)} key(s).`
                }, null, 8, ["description"])
              ])) : createCommentVNode("", true)
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(ssrRenderComponent(_component_UCard, { class: "mt-4" }, {
        header: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="flex items-center justify-between gap-3" data-v-62b03b92${_scopeId}><h2 class="text-base font-semibold" data-v-62b03b92${_scopeId}>Task provider</h2>`);
            _push2(ssrRenderComponent(_component_UButton, {
              size: "sm",
              color: "gray",
              variant: "soft",
              loading: unref(testing).provider,
              disabled: unref(testing).provider,
              onClick: testProvider
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(` Test connection `);
                } else {
                  return [
                    createTextVNode(" Test connection ")
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`</div>`);
          } else {
            return [
              createVNode("div", { class: "flex items-center justify-between gap-3" }, [
                createVNode("h2", { class: "text-base font-semibold" }, "Task provider"),
                createVNode(_component_UButton, {
                  size: "sm",
                  color: "gray",
                  variant: "soft",
                  loading: unref(testing).provider,
                  disabled: unref(testing).provider,
                  onClick: testProvider
                }, {
                  default: withCtx(() => [
                    createTextVNode(" Test connection ")
                  ]),
                  _: 1
                }, 8, ["loading", "disabled"])
              ])
            ];
          }
        }),
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="grid gap-4 md:grid-cols-2" data-v-62b03b92${_scopeId}>`);
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "PROVIDER",
              help: "Which task backend aidev should talk to."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_USelect, {
                    modelValue: unref(kv).PROVIDER,
                    "onUpdate:modelValue": ($event) => unref(kv).PROVIDER = $event,
                    options: providerOptions
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_USelect, {
                      modelValue: unref(kv).PROVIDER,
                      "onUpdate:modelValue": ($event) => unref(kv).PROVIDER = $event,
                      options: providerOptions
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`<!--[-->`);
            ssrRenderList(unref(providerFields), (field) => {
              _push2(ssrRenderComponent(_component_UFormGroup, {
                label: field.key,
                help: field.help
              }, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  var _a, _b;
                  if (_push3) {
                    _push3(ssrRenderComponent(_component_UInput, {
                      modelValue: unref(kv)[field.key],
                      "onUpdate:modelValue": ($event) => unref(kv)[field.key] = $event,
                      type: field.secret ? "password" : "text",
                      placeholder: (_a = field.placeholder) != null ? _a : "",
                      autocomplete: "off"
                    }, null, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(_component_UInput, {
                        modelValue: unref(kv)[field.key],
                        "onUpdate:modelValue": ($event) => unref(kv)[field.key] = $event,
                        type: field.secret ? "password" : "text",
                        placeholder: (_b = field.placeholder) != null ? _b : "",
                        autocomplete: "off"
                      }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder"])
                    ];
                  }
                }),
                _: 2
              }, _parent2, _scopeId));
            });
            _push2(`<!--]--></div>`);
            if (unref(testResults).provider) {
              _push2(ssrRenderComponent(_component_UAlert, {
                color: unref(testResults).provider.ok ? "green" : "red",
                variant: "soft",
                title: unref(testResults).provider.ok ? "Provider OK" : "Provider failed",
                description: unref(testResults).provider.message,
                class: "mt-3"
              }, null, _parent2, _scopeId));
            } else {
              _push2(`<!---->`);
            }
          } else {
            return [
              createVNode("div", { class: "grid gap-4 md:grid-cols-2" }, [
                createVNode(_component_UFormGroup, {
                  label: "PROVIDER",
                  help: "Which task backend aidev should talk to."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_USelect, {
                      modelValue: unref(kv).PROVIDER,
                      "onUpdate:modelValue": ($event) => unref(kv).PROVIDER = $event,
                      options: providerOptions
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                (openBlock(true), createBlock(Fragment, null, renderList(unref(providerFields), (field) => {
                  return openBlock(), createBlock(_component_UFormGroup, {
                    key: field.key,
                    label: field.key,
                    help: field.help
                  }, {
                    default: withCtx(() => {
                      var _a;
                      return [
                        createVNode(_component_UInput, {
                          modelValue: unref(kv)[field.key],
                          "onUpdate:modelValue": ($event) => unref(kv)[field.key] = $event,
                          type: field.secret ? "password" : "text",
                          placeholder: (_a = field.placeholder) != null ? _a : "",
                          autocomplete: "off"
                        }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder"])
                      ];
                    }),
                    _: 2
                  }, 1032, ["label", "help"]);
                }), 128))
              ]),
              unref(testResults).provider ? (openBlock(), createBlock(_component_UAlert, {
                key: 0,
                color: unref(testResults).provider.ok ? "green" : "red",
                variant: "soft",
                title: unref(testResults).provider.ok ? "Provider OK" : "Provider failed",
                description: unref(testResults).provider.message,
                class: "mt-3"
              }, null, 8, ["color", "title", "description"])) : createCommentVNode("", true)
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(ssrRenderComponent(_component_UCard, { class: "mt-4" }, {
        header: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="flex items-center justify-between gap-3" data-v-62b03b92${_scopeId}><h2 class="text-base font-semibold" data-v-62b03b92${_scopeId}>AI runners</h2><div class="flex items-center gap-2" data-v-62b03b92${_scopeId}>`);
            _push2(ssrRenderComponent(_component_USelect, {
              modelValue: unref(testAgent),
              "onUpdate:modelValue": ($event) => isRef(testAgent) ? testAgent.value = $event : null,
              options: unref(agentTestOptions),
              size: "sm",
              class: "w-44"
            }, null, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UButton, {
              size: "sm",
              color: "gray",
              variant: "soft",
              loading: unref(testing).ai,
              disabled: unref(testing).ai || !unref(testAgent),
              onClick: testAi
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(` Test ${ssrInterpolate(unref(testAgent) || "agent")}`);
                } else {
                  return [
                    createTextVNode(" Test " + toDisplayString(unref(testAgent) || "agent"), 1)
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`</div></div>`);
          } else {
            return [
              createVNode("div", { class: "flex items-center justify-between gap-3" }, [
                createVNode("h2", { class: "text-base font-semibold" }, "AI runners"),
                createVNode("div", { class: "flex items-center gap-2" }, [
                  createVNode(_component_USelect, {
                    modelValue: unref(testAgent),
                    "onUpdate:modelValue": ($event) => isRef(testAgent) ? testAgent.value = $event : null,
                    options: unref(agentTestOptions),
                    size: "sm",
                    class: "w-44"
                  }, null, 8, ["modelValue", "onUpdate:modelValue", "options"]),
                  createVNode(_component_UButton, {
                    size: "sm",
                    color: "gray",
                    variant: "soft",
                    loading: unref(testing).ai,
                    disabled: unref(testing).ai || !unref(testAgent),
                    onClick: testAi
                  }, {
                    default: withCtx(() => [
                      createTextVNode(" Test " + toDisplayString(unref(testAgent) || "agent"), 1)
                    ]),
                    _: 1
                  }, 8, ["loading", "disabled"])
                ])
              ])
            ];
          }
        }),
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<p class="text-sm text-gray-500 mb-3" data-v-62b03b92${_scopeId}> Agents in fallback order \u2014 first is primary, rest are tried when the previous fails. </p><div class="space-y-3" data-v-62b03b92${_scopeId}><!--[-->`);
            ssrRenderList(unref(agentBlocks), (block, index) => {
              _push2(`<div class="agent-block rounded-lg border border-gray-200 dark:border-gray-700 p-4" data-v-62b03b92${_scopeId}><div class="flex items-center justify-between gap-3 mb-3" data-v-62b03b92${_scopeId}><div class="flex items-center gap-2 min-w-0" data-v-62b03b92${_scopeId}><div class="flex flex-col gap-0.5" data-v-62b03b92${_scopeId}>`);
              _push2(ssrRenderComponent(_component_UButton, {
                size: "xs",
                color: "gray",
                variant: "ghost",
                icon: "i-heroicons-chevron-up",
                disabled: index === 0,
                "aria-label": "Move up",
                onClick: ($event) => moveAgent(index, -1)
              }, null, _parent2, _scopeId));
              _push2(ssrRenderComponent(_component_UButton, {
                size: "xs",
                color: "gray",
                variant: "ghost",
                icon: "i-heroicons-chevron-down",
                disabled: index === unref(agentBlocks).length - 1,
                "aria-label": "Move down",
                onClick: ($event) => moveAgent(index, 1)
              }, null, _parent2, _scopeId));
              _push2(`</div>`);
              _push2(ssrRenderComponent(_component_USelect, {
                modelValue: block.type,
                "onUpdate:modelValue": [($event) => block.type = $event, syncAgentsToKv],
                options: unref(agentTypeOptions),
                class: "w-52"
              }, null, _parent2, _scopeId));
              if (index === 0) {
                _push2(ssrRenderComponent(_component_UBadge, {
                  color: "primary",
                  variant: "subtle",
                  size: "xs"
                }, {
                  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                    if (_push3) {
                      _push3(` primary `);
                    } else {
                      return [
                        createTextVNode(" primary ")
                      ];
                    }
                  }),
                  _: 2
                }, _parent2, _scopeId));
              } else {
                _push2(`<span class="text-xs text-gray-400" data-v-62b03b92${_scopeId}>fallback ${ssrInterpolate(index)}</span>`);
              }
              _push2(`</div>`);
              _push2(ssrRenderComponent(_component_UButton, {
                size: "xs",
                color: "red",
                variant: "ghost",
                icon: "i-heroicons-trash",
                disabled: unref(agentBlocks).length <= 1,
                "aria-label": "Remove agent",
                onClick: ($event) => removeAgent(index)
              }, null, _parent2, _scopeId));
              _push2(`</div>`);
              if (fieldsForAgent(block.type).length > 0) {
                _push2(`<div class="grid gap-4 md:grid-cols-2" data-v-62b03b92${_scopeId}><!--[-->`);
                ssrRenderList(fieldsForAgent(block.type), (field) => {
                  _push2(ssrRenderComponent(_component_UFormGroup, {
                    key: field.key,
                    label: field.key,
                    help: field.help
                  }, {
                    default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                      var _a, _b;
                      if (_push3) {
                        _push3(ssrRenderComponent(_component_UInput, {
                          modelValue: unref(kv)[field.key],
                          "onUpdate:modelValue": ($event) => unref(kv)[field.key] = $event,
                          type: field.secret ? "password" : "text",
                          placeholder: (_a = field.placeholder) != null ? _a : "",
                          autocomplete: "off"
                        }, null, _parent3, _scopeId2));
                      } else {
                        return [
                          createVNode(_component_UInput, {
                            modelValue: unref(kv)[field.key],
                            "onUpdate:modelValue": ($event) => unref(kv)[field.key] = $event,
                            type: field.secret ? "password" : "text",
                            placeholder: (_b = field.placeholder) != null ? _b : "",
                            autocomplete: "off"
                          }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder"])
                        ];
                      }
                    }),
                    _: 2
                  }, _parent2, _scopeId));
                });
                _push2(`<!--]--></div>`);
              } else if (agentCliHelp[block.type]) {
                _push2(`<p class="text-sm text-gray-500" data-v-62b03b92${_scopeId}>${ssrInterpolate(agentCliHelp[block.type])}</p>`);
              } else {
                _push2(`<!---->`);
              }
              _push2(`</div>`);
            });
            _push2(`<!--]-->`);
            _push2(ssrRenderComponent(_component_UButton, {
              size: "sm",
              color: "gray",
              variant: "soft",
              icon: "i-heroicons-plus",
              onClick: addAgent
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(` Add agent `);
                } else {
                  return [
                    createTextVNode(" Add agent ")
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`</div>`);
            if (unref(testResults).ai) {
              _push2(ssrRenderComponent(_component_UAlert, {
                color: unref(testResults).ai.ok ? "green" : "red",
                variant: "soft",
                title: unref(testResults).ai.ok ? "AI runner OK" : "AI runner failed",
                description: unref(testResults).ai.message,
                class: "mt-3"
              }, null, _parent2, _scopeId));
            } else {
              _push2(`<!---->`);
            }
          } else {
            return [
              createVNode("p", { class: "text-sm text-gray-500 mb-3" }, " Agents in fallback order \u2014 first is primary, rest are tried when the previous fails. "),
              createVNode("div", { class: "space-y-3" }, [
                (openBlock(true), createBlock(Fragment, null, renderList(unref(agentBlocks), (block, index) => {
                  return openBlock(), createBlock("div", {
                    key: block.uid,
                    class: "agent-block rounded-lg border border-gray-200 dark:border-gray-700 p-4"
                  }, [
                    createVNode("div", { class: "flex items-center justify-between gap-3 mb-3" }, [
                      createVNode("div", { class: "flex items-center gap-2 min-w-0" }, [
                        createVNode("div", { class: "flex flex-col gap-0.5" }, [
                          createVNode(_component_UButton, {
                            size: "xs",
                            color: "gray",
                            variant: "ghost",
                            icon: "i-heroicons-chevron-up",
                            disabled: index === 0,
                            "aria-label": "Move up",
                            onClick: ($event) => moveAgent(index, -1)
                          }, null, 8, ["disabled", "onClick"]),
                          createVNode(_component_UButton, {
                            size: "xs",
                            color: "gray",
                            variant: "ghost",
                            icon: "i-heroicons-chevron-down",
                            disabled: index === unref(agentBlocks).length - 1,
                            "aria-label": "Move down",
                            onClick: ($event) => moveAgent(index, 1)
                          }, null, 8, ["disabled", "onClick"])
                        ]),
                        createVNode(_component_USelect, {
                          modelValue: block.type,
                          "onUpdate:modelValue": [($event) => block.type = $event, syncAgentsToKv],
                          options: unref(agentTypeOptions),
                          class: "w-52"
                        }, null, 8, ["modelValue", "onUpdate:modelValue", "options"]),
                        index === 0 ? (openBlock(), createBlock(_component_UBadge, {
                          key: 0,
                          color: "primary",
                          variant: "subtle",
                          size: "xs"
                        }, {
                          default: withCtx(() => [
                            createTextVNode(" primary ")
                          ]),
                          _: 1
                        })) : (openBlock(), createBlock("span", {
                          key: 1,
                          class: "text-xs text-gray-400"
                        }, "fallback " + toDisplayString(index), 1))
                      ]),
                      createVNode(_component_UButton, {
                        size: "xs",
                        color: "red",
                        variant: "ghost",
                        icon: "i-heroicons-trash",
                        disabled: unref(agentBlocks).length <= 1,
                        "aria-label": "Remove agent",
                        onClick: ($event) => removeAgent(index)
                      }, null, 8, ["disabled", "onClick"])
                    ]),
                    fieldsForAgent(block.type).length > 0 ? (openBlock(), createBlock("div", {
                      key: 0,
                      class: "grid gap-4 md:grid-cols-2"
                    }, [
                      (openBlock(true), createBlock(Fragment, null, renderList(fieldsForAgent(block.type), (field) => {
                        return openBlock(), createBlock(_component_UFormGroup, {
                          key: field.key,
                          label: field.key,
                          help: field.help
                        }, {
                          default: withCtx(() => {
                            var _a;
                            return [
                              createVNode(_component_UInput, {
                                modelValue: unref(kv)[field.key],
                                "onUpdate:modelValue": ($event) => unref(kv)[field.key] = $event,
                                type: field.secret ? "password" : "text",
                                placeholder: (_a = field.placeholder) != null ? _a : "",
                                autocomplete: "off"
                              }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder"])
                            ];
                          }),
                          _: 2
                        }, 1032, ["label", "help"]);
                      }), 128))
                    ])) : agentCliHelp[block.type] ? (openBlock(), createBlock("p", {
                      key: 1,
                      class: "text-sm text-gray-500"
                    }, toDisplayString(agentCliHelp[block.type]), 1)) : createCommentVNode("", true)
                  ]);
                }), 128)),
                createVNode(_component_UButton, {
                  size: "sm",
                  color: "gray",
                  variant: "soft",
                  icon: "i-heroicons-plus",
                  onClick: addAgent
                }, {
                  default: withCtx(() => [
                    createTextVNode(" Add agent ")
                  ]),
                  _: 1
                })
              ]),
              unref(testResults).ai ? (openBlock(), createBlock(_component_UAlert, {
                key: 0,
                color: unref(testResults).ai.ok ? "green" : "red",
                variant: "soft",
                title: unref(testResults).ai.ok ? "AI runner OK" : "AI runner failed",
                description: unref(testResults).ai.message,
                class: "mt-3"
              }, null, 8, ["color", "title", "description"])) : createCommentVNode("", true)
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(ssrRenderComponent(_component_UCard, { class: "mt-4" }, {
        header: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<h2 class="text-base font-semibold" data-v-62b03b92${_scopeId}>Logging</h2>`);
          } else {
            return [
              createVNode("h2", { class: "text-base font-semibold" }, "Logging")
            ];
          }
        }),
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="grid gap-4 md:grid-cols-2" data-v-62b03b92${_scopeId}>`);
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "AIDEV_LOG_PATH",
              help: "Path to the aidev log file. Defaults to ./aidev.log when blank."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).AIDEV_LOG_PATH,
                    "onUpdate:modelValue": ($event) => unref(kv).AIDEV_LOG_PATH = $event,
                    placeholder: "aidev.log"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_LOG_PATH,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_LOG_PATH = $event,
                      placeholder: "aidev.log"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`</div>`);
          } else {
            return [
              createVNode("div", { class: "grid gap-4 md:grid-cols-2" }, [
                createVNode(_component_UFormGroup, {
                  label: "AIDEV_LOG_PATH",
                  help: "Path to the aidev log file. Defaults to ./aidev.log when blank."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_LOG_PATH,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_LOG_PATH = $event,
                      placeholder: "aidev.log"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                })
              ])
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(ssrRenderComponent(_component_UCard, { class: "mt-4" }, {
        header: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<h2 class="text-base font-semibold" data-v-62b03b92${_scopeId}>Workflow &amp; Git</h2>`);
          } else {
            return [
              createVNode("h2", { class: "text-base font-semibold" }, "Workflow & Git")
            ];
          }
        }),
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="grid gap-4 md:grid-cols-2" data-v-62b03b92${_scopeId}>`);
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "DEV_NOTES_MODE",
              help: "smart \u2014 ask only when unclear; always \u2014 ask before every task."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_USelect, {
                    modelValue: unref(kv).DEV_NOTES_MODE,
                    "onUpdate:modelValue": ($event) => unref(kv).DEV_NOTES_MODE = $event,
                    options: devNotesModeOptions
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_USelect, {
                      modelValue: unref(kv).DEV_NOTES_MODE,
                      "onUpdate:modelValue": ($event) => unref(kv).DEV_NOTES_MODE = $event,
                      options: devNotesModeOptions
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "ASSIGNEE_TAG",
              help: "Optional tag to scope tasks to a specific assignee."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).ASSIGNEE_TAG,
                    "onUpdate:modelValue": ($event) => unref(kv).ASSIGNEE_TAG = $event
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).ASSIGNEE_TAG,
                      "onUpdate:modelValue": ($event) => unref(kv).ASSIGNEE_TAG = $event
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "AIDEV_TRIGGER_WORD",
              help: "Word that resumes a paused agent run."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).AIDEV_TRIGGER_WORD,
                    "onUpdate:modelValue": ($event) => unref(kv).AIDEV_TRIGGER_WORD = $event,
                    placeholder: "aidev-continue"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_TRIGGER_WORD,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_TRIGGER_WORD = $event,
                      placeholder: "aidev-continue"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "THINKING_TAG",
              help: "Tasks with this tag are broken into sub-tasks first."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).THINKING_TAG,
                    "onUpdate:modelValue": ($event) => unref(kv).THINKING_TAG = $event,
                    placeholder: "thinking"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).THINKING_TAG,
                      "onUpdate:modelValue": ($event) => unref(kv).THINKING_TAG = $event,
                      placeholder: "thinking"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "PLANNING_TAG",
              help: "Tasks with this tag are split into sub-tickets."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).PLANNING_TAG,
                    "onUpdate:modelValue": ($event) => unref(kv).PLANNING_TAG = $event,
                    placeholder: "planning"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).PLANNING_TAG,
                      "onUpdate:modelValue": ($event) => unref(kv).PLANNING_TAG = $event,
                      placeholder: "planning"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "ACCEPTED_TAG",
              help: "Tag marking a task as accepted for implementation."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).ACCEPTED_TAG,
                    "onUpdate:modelValue": ($event) => unref(kv).ACCEPTED_TAG = $event,
                    placeholder: "accepted"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).ACCEPTED_TAG,
                      "onUpdate:modelValue": ($event) => unref(kv).ACCEPTED_TAG = $event,
                      placeholder: "accepted"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "DONE_STATUS",
              help: "Provider status treated as done/closed."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).DONE_STATUS,
                    "onUpdate:modelValue": ($event) => unref(kv).DONE_STATUS = $event
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).DONE_STATUS,
                      "onUpdate:modelValue": ($event) => unref(kv).DONE_STATUS = $event
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "AIDEV_COMMENT_PREFIX",
              help: "Prefix for aidev comments on tasks."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).AIDEV_COMMENT_PREFIX,
                    "onUpdate:modelValue": ($event) => unref(kv).AIDEV_COMMENT_PREFIX = $event,
                    placeholder: "[aidev]"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_COMMENT_PREFIX,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_COMMENT_PREFIX = $event,
                      placeholder: "[aidev]"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "AIDEV_HOOKS_PATH",
              help: "Optional hooks module (.ts or .js)."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).AIDEV_HOOKS_PATH,
                    "onUpdate:modelValue": ($event) => unref(kv).AIDEV_HOOKS_PATH = $event,
                    placeholder: ".aidev/aidev.hooks.ts"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_HOOKS_PATH,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_HOOKS_PATH = $event,
                      placeholder: ".aidev/aidev.hooks.ts"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "AIDEV_AUTO_COMPRESS",
              help: "Set false/0/no to disable prompt compression."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).AIDEV_AUTO_COMPRESS,
                    "onUpdate:modelValue": ($event) => unref(kv).AIDEV_AUTO_COMPRESS = $event,
                    placeholder: "true"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_AUTO_COMPRESS,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_AUTO_COMPRESS = $event,
                      placeholder: "true"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "AIDEV_COMPRESS_THRESHOLD",
              help: "Char count that triggers compression."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).AIDEV_COMPRESS_THRESHOLD,
                    "onUpdate:modelValue": ($event) => unref(kv).AIDEV_COMPRESS_THRESHOLD = $event,
                    placeholder: "12000"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_COMPRESS_THRESHOLD,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_COMPRESS_THRESHOLD = $event,
                      placeholder: "12000"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, { label: "GIT_REMOTE" }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).GIT_REMOTE,
                    "onUpdate:modelValue": ($event) => unref(kv).GIT_REMOTE = $event,
                    placeholder: "origin"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).GIT_REMOTE,
                      "onUpdate:modelValue": ($event) => unref(kv).GIT_REMOTE = $event,
                      placeholder: "origin"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, { label: "GITHUB_BASE_BRANCH" }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).GITHUB_BASE_BRANCH,
                    "onUpdate:modelValue": ($event) => unref(kv).GITHUB_BASE_BRANCH = $event,
                    placeholder: "main"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).GITHUB_BASE_BRANCH,
                      "onUpdate:modelValue": ($event) => unref(kv).GITHUB_BASE_BRANCH = $event,
                      placeholder: "main"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(ssrRenderComponent(_component_UFormGroup, {
              label: "GITHUB_REPO",
              help: "owner/repo \u2014 auto-detected when blank."
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(_component_UInput, {
                    modelValue: unref(kv).GITHUB_REPO,
                    "onUpdate:modelValue": ($event) => unref(kv).GITHUB_REPO = $event,
                    placeholder: "owner/repo"
                  }, null, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).GITHUB_REPO,
                      "onUpdate:modelValue": ($event) => unref(kv).GITHUB_REPO = $event,
                      placeholder: "owner/repo"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`</div>`);
          } else {
            return [
              createVNode("div", { class: "grid gap-4 md:grid-cols-2" }, [
                createVNode(_component_UFormGroup, {
                  label: "DEV_NOTES_MODE",
                  help: "smart \u2014 ask only when unclear; always \u2014 ask before every task."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_USelect, {
                      modelValue: unref(kv).DEV_NOTES_MODE,
                      "onUpdate:modelValue": ($event) => unref(kv).DEV_NOTES_MODE = $event,
                      options: devNotesModeOptions
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "ASSIGNEE_TAG",
                  help: "Optional tag to scope tasks to a specific assignee."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).ASSIGNEE_TAG,
                      "onUpdate:modelValue": ($event) => unref(kv).ASSIGNEE_TAG = $event
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "AIDEV_TRIGGER_WORD",
                  help: "Word that resumes a paused agent run."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_TRIGGER_WORD,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_TRIGGER_WORD = $event,
                      placeholder: "aidev-continue"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "THINKING_TAG",
                  help: "Tasks with this tag are broken into sub-tasks first."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).THINKING_TAG,
                      "onUpdate:modelValue": ($event) => unref(kv).THINKING_TAG = $event,
                      placeholder: "thinking"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "PLANNING_TAG",
                  help: "Tasks with this tag are split into sub-tickets."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).PLANNING_TAG,
                      "onUpdate:modelValue": ($event) => unref(kv).PLANNING_TAG = $event,
                      placeholder: "planning"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "ACCEPTED_TAG",
                  help: "Tag marking a task as accepted for implementation."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).ACCEPTED_TAG,
                      "onUpdate:modelValue": ($event) => unref(kv).ACCEPTED_TAG = $event,
                      placeholder: "accepted"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "DONE_STATUS",
                  help: "Provider status treated as done/closed."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).DONE_STATUS,
                      "onUpdate:modelValue": ($event) => unref(kv).DONE_STATUS = $event
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "AIDEV_COMMENT_PREFIX",
                  help: "Prefix for aidev comments on tasks."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_COMMENT_PREFIX,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_COMMENT_PREFIX = $event,
                      placeholder: "[aidev]"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "AIDEV_HOOKS_PATH",
                  help: "Optional hooks module (.ts or .js)."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_HOOKS_PATH,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_HOOKS_PATH = $event,
                      placeholder: ".aidev/aidev.hooks.ts"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "AIDEV_AUTO_COMPRESS",
                  help: "Set false/0/no to disable prompt compression."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_AUTO_COMPRESS,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_AUTO_COMPRESS = $event,
                      placeholder: "true"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "AIDEV_COMPRESS_THRESHOLD",
                  help: "Char count that triggers compression."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).AIDEV_COMPRESS_THRESHOLD,
                      "onUpdate:modelValue": ($event) => unref(kv).AIDEV_COMPRESS_THRESHOLD = $event,
                      placeholder: "12000"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, { label: "GIT_REMOTE" }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).GIT_REMOTE,
                      "onUpdate:modelValue": ($event) => unref(kv).GIT_REMOTE = $event,
                      placeholder: "origin"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, { label: "GITHUB_BASE_BRANCH" }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).GITHUB_BASE_BRANCH,
                      "onUpdate:modelValue": ($event) => unref(kv).GITHUB_BASE_BRANCH = $event,
                      placeholder: "main"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                }),
                createVNode(_component_UFormGroup, {
                  label: "GITHUB_REPO",
                  help: "owner/repo \u2014 auto-detected when blank."
                }, {
                  default: withCtx(() => [
                    createVNode(_component_UInput, {
                      modelValue: unref(kv).GITHUB_REPO,
                      "onUpdate:modelValue": ($event) => unref(kv).GITHUB_REPO = $event,
                      placeholder: "owner/repo"
                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                  ]),
                  _: 1
                })
              ])
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(ssrRenderComponent(_component_UCard, { class: "mt-4" }, {
        header: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="flex items-center justify-between gap-3" data-v-62b03b92${_scopeId}><h2 class="text-base font-semibold" data-v-62b03b92${_scopeId}>Other keys</h2>`);
            _push2(ssrRenderComponent(_component_UButton, {
              size: "xs",
              color: "gray",
              variant: "ghost",
              onClick: ($event) => addKeyDialog.value = true
            }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(` + Add key `);
                } else {
                  return [
                    createTextVNode(" + Add key ")
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`</div>`);
          } else {
            return [
              createVNode("div", { class: "flex items-center justify-between gap-3" }, [
                createVNode("h2", { class: "text-base font-semibold" }, "Other keys"),
                createVNode(_component_UButton, {
                  size: "xs",
                  color: "gray",
                  variant: "ghost",
                  onClick: ($event) => addKeyDialog.value = true
                }, {
                  default: withCtx(() => [
                    createTextVNode(" + Add key ")
                  ]),
                  _: 1
                }, 8, ["onClick"])
              ])
            ];
          }
        }),
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            if (unref(otherKeys).length === 0) {
              _push2(`<p class="text-sm text-gray-500" data-v-62b03b92${_scopeId}> No additional keys. Use \u201CAdd key\u201D to introduce one. </p>`);
            } else {
              _push2(`<div class="grid gap-4 md:grid-cols-2" data-v-62b03b92${_scopeId}><!--[-->`);
              ssrRenderList(unref(otherKeys), (key) => {
                _push2(ssrRenderComponent(_component_UFormGroup, {
                  key,
                  label: key
                }, {
                  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                    if (_push3) {
                      _push3(`<div class="flex items-center gap-2" data-v-62b03b92${_scopeId2}>`);
                      _push3(ssrRenderComponent(_component_UInput, {
                        modelValue: unref(kv)[key],
                        "onUpdate:modelValue": ($event) => unref(kv)[key] = $event,
                        type: isSecretKey(key) ? "password" : "text",
                        autocomplete: "off",
                        class: "flex-1"
                      }, null, _parent3, _scopeId2));
                      _push3(ssrRenderComponent(_component_UButton, {
                        size: "xs",
                        color: "red",
                        variant: "ghost",
                        icon: "i-heroicons-trash",
                        onClick: ($event) => removeKey(key)
                      }, null, _parent3, _scopeId2));
                      _push3(`</div>`);
                    } else {
                      return [
                        createVNode("div", { class: "flex items-center gap-2" }, [
                          createVNode(_component_UInput, {
                            modelValue: unref(kv)[key],
                            "onUpdate:modelValue": ($event) => unref(kv)[key] = $event,
                            type: isSecretKey(key) ? "password" : "text",
                            autocomplete: "off",
                            class: "flex-1"
                          }, null, 8, ["modelValue", "onUpdate:modelValue", "type"]),
                          createVNode(_component_UButton, {
                            size: "xs",
                            color: "red",
                            variant: "ghost",
                            icon: "i-heroicons-trash",
                            onClick: ($event) => removeKey(key)
                          }, null, 8, ["onClick"])
                        ])
                      ];
                    }
                  }),
                  _: 2
                }, _parent2, _scopeId));
              });
              _push2(`<!--]--></div>`);
            }
          } else {
            return [
              unref(otherKeys).length === 0 ? (openBlock(), createBlock("p", {
                key: 0,
                class: "text-sm text-gray-500"
              }, " No additional keys. Use \u201CAdd key\u201D to introduce one. ")) : (openBlock(), createBlock("div", {
                key: 1,
                class: "grid gap-4 md:grid-cols-2"
              }, [
                (openBlock(true), createBlock(Fragment, null, renderList(unref(otherKeys), (key) => {
                  return openBlock(), createBlock(_component_UFormGroup, {
                    key,
                    label: key
                  }, {
                    default: withCtx(() => [
                      createVNode("div", { class: "flex items-center gap-2" }, [
                        createVNode(_component_UInput, {
                          modelValue: unref(kv)[key],
                          "onUpdate:modelValue": ($event) => unref(kv)[key] = $event,
                          type: isSecretKey(key) ? "password" : "text",
                          autocomplete: "off",
                          class: "flex-1"
                        }, null, 8, ["modelValue", "onUpdate:modelValue", "type"]),
                        createVNode(_component_UButton, {
                          size: "xs",
                          color: "red",
                          variant: "ghost",
                          icon: "i-heroicons-trash",
                          onClick: ($event) => removeKey(key)
                        }, null, 8, ["onClick"])
                      ])
                    ]),
                    _: 2
                  }, 1032, ["label"]);
                }), 128))
              ]))
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(ssrRenderComponent(_component_UModal, {
        modelValue: unref(addKeyDialog),
        "onUpdate:modelValue": ($event) => isRef(addKeyDialog) ? addKeyDialog.value = $event : null
      }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(_component_UCard, null, {
              header: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(`<h3 class="text-base font-semibold" data-v-62b03b92${_scopeId2}>Add config key</h3>`);
                } else {
                  return [
                    createVNode("h3", { class: "text-base font-semibold" }, "Add config key")
                  ];
                }
              }),
              footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(`<div class="flex justify-end gap-2" data-v-62b03b92${_scopeId2}>`);
                  _push3(ssrRenderComponent(_component_UButton, {
                    variant: "ghost",
                    color: "gray",
                    onClick: closeAddKey
                  }, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(`Cancel`);
                      } else {
                        return [
                          createTextVNode("Cancel")
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                  _push3(ssrRenderComponent(_component_UButton, {
                    color: "primary",
                    onClick: commitAddKey
                  }, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(`Add`);
                      } else {
                        return [
                          createTextVNode("Add")
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                  _push3(`</div>`);
                } else {
                  return [
                    createVNode("div", { class: "flex justify-end gap-2" }, [
                      createVNode(_component_UButton, {
                        variant: "ghost",
                        color: "gray",
                        onClick: closeAddKey
                      }, {
                        default: withCtx(() => [
                          createTextVNode("Cancel")
                        ]),
                        _: 1
                      }),
                      createVNode(_component_UButton, {
                        color: "primary",
                        onClick: commitAddKey
                      }, {
                        default: withCtx(() => [
                          createTextVNode("Add")
                        ]),
                        _: 1
                      })
                    ])
                  ];
                }
              }),
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(`<div class="space-y-3" data-v-62b03b92${_scopeId2}>`);
                  _push3(ssrRenderComponent(_component_UFormGroup, {
                    label: "Key",
                    help: "Letters, numbers, and underscores. Must start with a letter or underscore."
                  }, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(ssrRenderComponent(_component_UInput, {
                          modelValue: unref(newKey),
                          "onUpdate:modelValue": ($event) => isRef(newKey) ? newKey.value = $event : null,
                          placeholder: "MY_NEW_KEY",
                          autofocus: ""
                        }, null, _parent4, _scopeId3));
                      } else {
                        return [
                          createVNode(_component_UInput, {
                            modelValue: unref(newKey),
                            "onUpdate:modelValue": ($event) => isRef(newKey) ? newKey.value = $event : null,
                            placeholder: "MY_NEW_KEY",
                            autofocus: ""
                          }, null, 8, ["modelValue", "onUpdate:modelValue"])
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                  _push3(ssrRenderComponent(_component_UFormGroup, { label: "Value" }, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(ssrRenderComponent(_component_UInput, {
                          modelValue: unref(newValue),
                          "onUpdate:modelValue": ($event) => isRef(newValue) ? newValue.value = $event : null,
                          autocomplete: "off"
                        }, null, _parent4, _scopeId3));
                      } else {
                        return [
                          createVNode(_component_UInput, {
                            modelValue: unref(newValue),
                            "onUpdate:modelValue": ($event) => isRef(newValue) ? newValue.value = $event : null,
                            autocomplete: "off"
                          }, null, 8, ["modelValue", "onUpdate:modelValue"])
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                  if (unref(newKeyError)) {
                    _push3(`<p class="text-sm text-red-500" data-v-62b03b92${_scopeId2}>${ssrInterpolate(unref(newKeyError))}</p>`);
                  } else {
                    _push3(`<!---->`);
                  }
                  _push3(`</div>`);
                } else {
                  return [
                    createVNode("div", { class: "space-y-3" }, [
                      createVNode(_component_UFormGroup, {
                        label: "Key",
                        help: "Letters, numbers, and underscores. Must start with a letter or underscore."
                      }, {
                        default: withCtx(() => [
                          createVNode(_component_UInput, {
                            modelValue: unref(newKey),
                            "onUpdate:modelValue": ($event) => isRef(newKey) ? newKey.value = $event : null,
                            placeholder: "MY_NEW_KEY",
                            autofocus: ""
                          }, null, 8, ["modelValue", "onUpdate:modelValue"])
                        ]),
                        _: 1
                      }),
                      createVNode(_component_UFormGroup, { label: "Value" }, {
                        default: withCtx(() => [
                          createVNode(_component_UInput, {
                            modelValue: unref(newValue),
                            "onUpdate:modelValue": ($event) => isRef(newValue) ? newValue.value = $event : null,
                            autocomplete: "off"
                          }, null, 8, ["modelValue", "onUpdate:modelValue"])
                        ]),
                        _: 1
                      }),
                      unref(newKeyError) ? (openBlock(), createBlock("p", {
                        key: 0,
                        class: "text-sm text-red-500"
                      }, toDisplayString(unref(newKeyError)), 1)) : createCommentVNode("", true)
                    ])
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
          } else {
            return [
              createVNode(_component_UCard, null, {
                header: withCtx(() => [
                  createVNode("h3", { class: "text-base font-semibold" }, "Add config key")
                ]),
                footer: withCtx(() => [
                  createVNode("div", { class: "flex justify-end gap-2" }, [
                    createVNode(_component_UButton, {
                      variant: "ghost",
                      color: "gray",
                      onClick: closeAddKey
                    }, {
                      default: withCtx(() => [
                        createTextVNode("Cancel")
                      ]),
                      _: 1
                    }),
                    createVNode(_component_UButton, {
                      color: "primary",
                      onClick: commitAddKey
                    }, {
                      default: withCtx(() => [
                        createTextVNode("Add")
                      ]),
                      _: 1
                    })
                  ])
                ]),
                default: withCtx(() => [
                  createVNode("div", { class: "space-y-3" }, [
                    createVNode(_component_UFormGroup, {
                      label: "Key",
                      help: "Letters, numbers, and underscores. Must start with a letter or underscore."
                    }, {
                      default: withCtx(() => [
                        createVNode(_component_UInput, {
                          modelValue: unref(newKey),
                          "onUpdate:modelValue": ($event) => isRef(newKey) ? newKey.value = $event : null,
                          placeholder: "MY_NEW_KEY",
                          autofocus: ""
                        }, null, 8, ["modelValue", "onUpdate:modelValue"])
                      ]),
                      _: 1
                    }),
                    createVNode(_component_UFormGroup, { label: "Value" }, {
                      default: withCtx(() => [
                        createVNode(_component_UInput, {
                          modelValue: unref(newValue),
                          "onUpdate:modelValue": ($event) => isRef(newValue) ? newValue.value = $event : null,
                          autocomplete: "off"
                        }, null, 8, ["modelValue", "onUpdate:modelValue"])
                      ]),
                      _: 1
                    }),
                    unref(newKeyError) ? (openBlock(), createBlock("p", {
                      key: 0,
                      class: "text-sm text-red-500"
                    }, toDisplayString(unref(newKeyError)), 1)) : createCommentVNode("", true)
                  ])
                ]),
                _: 1
              })
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`</div>`);
    };
  }
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/config.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const config = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-62b03b92"]]);

export { config as default };
//# sourceMappingURL=config-QZGfNfGJ.mjs.map
