import { _ as __nuxt_component_0 } from './nuxt-link-Cq8xZgFP.mjs';
import { defineComponent, withAsyncContext, mergeProps, unref, withCtx, createTextVNode, toDisplayString, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrInterpolate, ssrRenderComponent } from 'vue/server-renderer';
import { u as useFetch } from './fetch-B5NxMLIO.mjs';
import { _ as _export_sfc, u as useI18n, a as useHead } from './server.mjs';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:crypto';
import 'stream';
import 'events';
import 'http';
import 'crypto';
import 'buffer';
import 'zlib';
import 'https';
import 'net';
import 'tls';
import 'url';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'vue-router';
import '@prisma/client';
import '@prisma/adapter-better-sqlite3';
import 'fs';
import 'path';
import 'fs/promises';
import 'child_process';
import 'node:child_process';
import 'node:url';
import '@vue/shared';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';

const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  __ssrInlineRender: true,
  async setup(__props) {
    let __temp, __restore;
    const { t: $t } = useI18n();
    const { data: pipelines, pending } = ([__temp, __restore] = withAsyncContext(() => useFetch("/api/pipelines", "$p7t_x6yV7n")), __temp = await __temp, __restore(), __temp);
    useHead({
      title: "Pipeline Configuration - AutoCode"
    });
    return (_ctx, _push, _parent, _attrs) => {
      const _component_NuxtLink = __nuxt_component_0;
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "pipeline-page" }, _attrs))} data-v-9f6aa041>`);
      if (unref(pending)) {
        _push(`<div class="loading card" data-v-9f6aa041>${ssrInterpolate(unref($t)("app.loading"))}</div>`);
      } else if (!unref(pipelines)?.length) {
        _push(`<div class="empty-state card" data-v-9f6aa041><p data-v-9f6aa041>${ssrInterpolate(unref($t)("pipeline.noColumns"))}</p>`);
        _push(ssrRenderComponent(_component_NuxtLink, {
          to: "/settings/pipeline/new",
          class: "btn btn-primary"
        }, {
          default: withCtx((_, _push2, _parent2, _scopeId) => {
            if (_push2) {
              _push2(` + ${ssrInterpolate(unref($t)("pipeline.new"))}`);
            } else {
              return [
                createTextVNode(" + " + toDisplayString(unref($t)("pipeline.new")), 1)
              ];
            }
          }),
          _: 1
        }, _parent));
        _push(`</div>`);
      } else {
        _push(`<!---->`);
      }
      _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/settings/pipeline/index.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9f6aa041"]]);

export { index as default };
//# sourceMappingURL=index-C0DupdV0.mjs.map
