import { Fragment, capitalize, computed, createBlock, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
import { RouterLink } from "vue-router";
//#region src/v2/features/collection/components/Tabs.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1 = { class: "flex w-full gap-2 border-b pl-1.5 md:ml-1.5 md:pl-0" };
var _hoisted_2 = ["href", "onClick"];
var Tabs_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	__name: "Tabs",
	props: { type: {} },
	setup(__props) {
		/** Different routes for workspace vs document */
		const routes = computed(() => {
			if (__props.type === "workspace") return [
				"environment",
				"cookies",
				"settings"
			];
			if (__props.type === "operation") return [
				"overview",
				"servers",
				"authentication",
				"editor"
			];
			return [
				"overview",
				"servers",
				"authentication",
				"environment",
				"cookies",
				"settings"
			];
		});
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(routes.value, (route) => {
				return openBlock(), createBlock(unref(RouterLink), {
					key: route,
					custom: "",
					to: { name: `${__props.type}.${route}` }
				}, {
					default: withCtx(({ isActive, href, navigate }) => [createElementVNode("a", {
						class: "-ml-2 flex h-10 cursor-pointer items-center px-2 text-center text-sm font-medium whitespace-nowrap no-underline -outline-offset-1 has-[:focus-visible]:outline",
						href,
						onClick: navigate
					}, [createElementVNode("span", { class: normalizeClass(["flex-center hover:text-c-1 h-full border-b", isActive ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent"]) }, toDisplayString(capitalize(route)), 3)], 8, _hoisted_2)]),
					_: 2
				}, 1032, ["to"]);
			}), 128))]);
		};
	}
});
//#endregion
export { Tabs_vue_vue_type_script_setup_true_lang_default as default };

//# sourceMappingURL=Tabs.vue.script.js.map