import { a as usePage, i as useForm, n as head_default, o as vue_exports, r as link_default, s as router } from "../ssr.js";
import { n as server_renderer_exports, t } from "./i18n-CXLOYfyq.js";
import { t as MarketingLayout_default } from "./MarketingLayout-B4vwnMD8.js";
//#region resources/js/Pages/Store/Manage.vue?vue&type=script&setup=true&lang.ts
var Manage_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue_exports.defineComponent)({
	__name: "Manage",
	__ssrInlineRender: true,
	props: {
		products: {},
		isOwner: { type: Boolean },
		checkoutEnabled: { type: Boolean },
		stripe: {},
		registryWebhookUrl: {},
		reviewAi: {}
	},
	setup(__props) {
		const props = __props;
		const status = (0, vue_exports.computed)(() => usePage().props.flash?.status);
		const error = (0, vue_exports.computed)(() => usePage().props.flash?.storeError);
		const forms = (0, vue_exports.reactive)(props.isOwner ? {} : Object.fromEntries(props.products.map((p) => [p.slug, {
			pricing: p.free ? "free" : "premium",
			price: p.free ? 9 : p.price ?? 9,
			tagline: p.tagline ?? "",
			description: p.description ?? "",
			saving: false
		}])));
		function save(p) {
			const f = forms[p.slug];
			f.saving = true;
			router.post(`/extensions/${p.slug}/manage`, {
				pricing: f.pricing,
				price: f.price,
				tagline: f.tagline,
				description: f.description
			}, {
				preserveScroll: true,
				onFinish: () => f.saving = false
			});
		}
		const showAdvancedKeys = (0, vue_exports.ref)(false);
		const stripeForm = useForm({
			key: props.stripe?.key ?? "",
			secret: "",
			webhook_secret: ""
		});
		function saveStripe() {
			stripeForm.post("/extensions/manage/stripe", { preserveScroll: true });
		}
		const repo = (0, vue_exports.ref)("");
		const repoPin = (0, vue_exports.ref)("");
		const linking = (0, vue_exports.ref)(false);
		function linkRepo() {
			if (!repo.value.trim()) return;
			linking.value = true;
			router.post("/extensions/manage/link", {
				repo: repo.value.trim(),
				pin: repoPin.value.trim() || null
			}, {
				preserveScroll: true,
				onSuccess: () => {
					repo.value = "";
					repoPin.value = "";
				},
				onFinish: () => linking.value = false
			});
		}
		function refreshRepo(p) {
			router.post(`/extensions/manage/products/${p.id}/refresh`, {}, { preserveScroll: true });
		}
		function uploadFile(p, e) {
			const file = e.target.files?.[0];
			if (!file) return;
			router.post(`/extensions/manage/products/${p.id}/file`, { file }, {
				forceFormData: true,
				preserveScroll: true
			});
		}
		const blank = () => ({
			id: null,
			name: "",
			type: "extension",
			tagline: "",
			description: "",
			package: "",
			version: "1.0.0",
			price_dollars: "19",
			published: true,
			featured: false,
			pinned_version: "",
			source: "manual"
		});
		const editing = (0, vue_exports.ref)(null);
		function openNew() {
			editing.value = blank();
		}
		function openEdit(p) {
			editing.value = {
				...p,
				price_dollars: ((p.price_cents ?? 0) / 100).toString(),
				pinned_version: p.pinnedVersion ?? ""
			};
		}
		function closeEdit() {
			editing.value = null;
		}
		function saveProduct() {
			const e = editing.value;
			const payload = {
				name: e.name,
				type: e.type,
				tagline: e.tagline,
				description: e.description,
				package: e.package,
				version: e.version,
				price_cents: Math.round(parseFloat(e.price_dollars || "0") * 100),
				published: e.published,
				featured: e.featured,
				pinned_version: e.pinned_version || null
			};
			const opts = {
				preserveScroll: true,
				onSuccess: () => closeEdit()
			};
			if (e.id) router.put(`/extensions/manage/products/${e.id}`, payload, opts);
			else router.post("/extensions/manage/products", payload, opts);
		}
		function destroyProduct(p) {
			if (confirm(t("Delete “{name}”? Existing licenses are kept but the product is removed.", { name: p.name }))) router.delete(`/extensions/manage/products/${p.id}`, { preserveScroll: true });
		}
		function generateCovers() {
			router.post("/extensions/manage/covers", {}, { preserveScroll: true });
		}
		function reviewProduct(p) {
			router.post(`/extensions/manage/products/${p.id}/review`, {}, { preserveScroll: true });
		}
		const reviewForm = useForm({
			enabled: props.reviewAi?.enabled ?? true,
			provider: props.reviewAi?.provider ?? "anthropic",
			model: props.reviewAi?.model ?? "",
			base_url: props.reviewAi?.base_url ?? "",
			api_key: ""
		});
		function saveReview() {
			reviewForm.post("/extensions/manage/review-settings", { preserveScroll: true });
		}
		function reviewBadge(r) {
			if (!r) return null;
			if (r.status === "queued" || r.status === "reviewing") return {
				t: t("⏳ reviewing"),
				c: "bg-surface text-ink-muted"
			};
			if (r.rating === "safe") return {
				t: t("✓ safe"),
				c: "bg-emerald-500/15 text-emerald-500"
			};
			if (r.rating === "caution") return {
				t: t("⚠ caution"),
				c: "bg-amber-500/15 text-amber-500"
			};
			if (r.rating === "unsafe") return {
				t: t("⛔ unsafe"),
				c: "bg-red-500/15 text-red-400"
			};
			if (r.status === "error") return {
				t: t("review error"),
				c: "bg-red-500/15 text-red-400"
			};
			return null;
		}
		return (_ctx, _push, _parent, _attrs) => {
			_push(`<!--[-->`);
			_push((0, server_renderer_exports.ssrRenderComponent)((0, vue_exports.unref)(head_default), { title: `${__props.isOwner ? (0, vue_exports.unref)(t)("Store console") : (0, vue_exports.unref)(t)("Manage your extensions")} — Convoro` }, null, _parent));
			_push((0, server_renderer_exports.ssrRenderComponent)(MarketingLayout_default, null, {
				default: (0, vue_exports.withCtx)((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<section class="mx-auto max-w-3xl px-6 py-16"${_scopeId}>`);
						_push((0, server_renderer_exports.ssrRenderComponent)((0, vue_exports.unref)(link_default), {
							href: "/extensions",
							class: "mb-6 inline-flex items-center gap-1.5 text-sm font-semibold text-ink-muted hover:text-ink"
						}, {
							default: (0, vue_exports.withCtx)((_, _push, _parent, _scopeId) => {
								if (_push) _push(`<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"${_scopeId}><path d="M19 12H5M12 19l-7-7 7-7"${_scopeId}></path></svg> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Back to the directory"))}`);
								else return [((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("svg", {
									width: "15",
									height: "15",
									viewBox: "0 0 24 24",
									fill: "none",
									stroke: "currentColor",
									"stroke-width": "2",
									"stroke-linecap": "round",
									"stroke-linejoin": "round"
								}, [(0, vue_exports.createVNode)("path", { d: "M19 12H5M12 19l-7-7 7-7" })])), (0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Back to the directory")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(`<h1 class="text-4xl font-black tracking-tight"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(__props.isOwner ? (0, vue_exports.unref)(t)("Store console") : (0, vue_exports.unref)(t)("Your extensions"))}</h1><p class="mt-3 text-lg text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(__props.isOwner ? (0, vue_exports.unref)(t)("Payments, GitHub publishing, and every listing in the directory.") : (0, vue_exports.unref)(t)("Edit pricing and details for the listings you publish. Changes go live immediately."))}</p>`);
						if (status.value) _push(`<div class="mt-6 rounded-xl border border-emerald-500/30 bg-emerald-500/10 px-4 py-3 text-sm font-medium text-emerald-700 dark:text-emerald-300"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(status.value)}</div>`);
						else _push(`<!---->`);
						if (error.value) _push(`<div class="mt-6 rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm font-medium text-red-600 dark:text-red-300"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(error.value)}</div>`);
						else _push(`<!---->`);
						if (__props.isOwner && __props.stripe) {
							_push(`<!--[--><section class="mt-8 rounded-2xl border border-line bg-surface p-6"${_scopeId}><h2 class="text-sm font-bold uppercase tracking-wide text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Payments (Stripe)"))}</h2>`);
							if (__props.stripe.connectedAccount) _push(`<div class="mt-3 flex flex-wrap items-center gap-3 rounded-xl border border-emerald-500/30 bg-emerald-500/10 p-4"${_scopeId}><span class="grid h-9 w-9 place-items-center rounded-full bg-emerald-500/20 text-emerald-500"${_scopeId}>✓</span><div class="min-w-0"${_scopeId}><div class="text-sm font-semibold text-emerald-600 dark:text-emerald-200"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Stripe connected"))}</div><div class="font-mono text-xs text-emerald-500/80"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(__props.stripe.connectedAccount)}</div></div><a${(0, server_renderer_exports.ssrRenderAttr)("href", `https://dashboard.stripe.com/${__props.stripe.connectedAccount}`)} target="_blank" rel="noopener" class="ml-auto text-sm font-semibold text-emerald-500 hover:underline"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Open dashboard"))}</a><button type="button" class="rounded-lg px-3 py-1.5 text-xs font-semibold text-ink-2 hover:bg-red-500/10 hover:text-red-400"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Disconnect"))}</button></div>`);
							else {
								_push(`<!--[--><p class="mt-1 text-xs text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Connect your Stripe account to take payments — no copy-pasting API keys."))}</p>`);
								if (__props.stripe.canConnect) _push(`<a href="/extensions/manage/stripe/connect" class="mt-3 inline-flex items-center gap-2 rounded-lg bg-[#635bff] px-5 py-2.5 text-sm font-bold text-white hover:bg-[#5249e0]"${_scopeId}><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"${_scopeId}><path d="M13.5 9.6c0-.6.5-.8 1.2-.8 1.1 0 2.5.3 3.6.9V6.3c-1.2-.5-2.4-.7-3.6-.7-2.9 0-4.9 1.5-4.9 4.1 0 4 5.4 3.3 5.4 5 0 .6-.6.9-1.4.9-1.2 0-2.8-.5-4-1.2v3.4c1.4.6 2.7.8 4 .8 3 0 5-1.5 5-4.1 0-4.3-5.3-3.5-5.3-5.1z"${_scopeId}></path></svg> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Connect with Stripe"))}</a>`);
								else _push(`<p class="mt-3 rounded-lg bg-amber-500/10 px-3 py-2 text-xs text-amber-600 dark:text-amber-300"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("To enable “Connect with Stripe”, set"))} <code${_scopeId}>STRIPE_CONNECT_CLIENT_ID</code> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("and"))} <code${_scopeId}>STRIPE_SECRET</code> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("in the server’s"))} <code${_scopeId}>.env</code>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)(", then reload."))}</p>`);
								_push(`<!--]-->`);
							}
							_push(`<div class="mt-5 border-t border-line pt-4"${_scopeId}><p class="text-xs text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Add a webhook in Stripe →"))} <code class="text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(__props.stripe.webhookUrl)}</code> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("(event"))} <code class="text-ink-2"${_scopeId}>checkout.session.completed</code>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)(")."))}</p><button type="button" class="mt-2 text-xs font-semibold text-ink-2 hover:text-ink"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(showAdvancedKeys.value ? (0, vue_exports.unref)(t)("Hide") : (0, vue_exports.unref)(t)("Advanced: enter keys manually"))}</button>`);
							if (showAdvancedKeys.value) {
								_push(`<div class="mt-3 space-y-3"${_scopeId}><div${_scopeId}><label class="block text-sm font-medium text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Publishable key"))}</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(stripeForm).key)} type="text" placeholder="pk_live_…" class="mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}></div><div${_scopeId}><label class="block text-sm font-medium text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Secret key"))} `);
								if (__props.stripe.secretSet) _push(`<span class="text-emerald-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("(set)"))}</span>`);
								else _push(`<!---->`);
								_push(`</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(stripeForm).secret)} type="password"${(0, server_renderer_exports.ssrRenderAttr)("placeholder", __props.stripe.secretSet ? (0, vue_exports.unref)(t)("•••• leave blank to keep") : "sk_live_…")} class="mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}></div><div${_scopeId}><label class="block text-sm font-medium text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Webhook signing secret"))} `);
								if (__props.stripe.webhookSet) _push(`<span class="text-emerald-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("(set)"))}</span>`);
								else _push(`<!---->`);
								_push(`</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(stripeForm).webhook_secret)} type="password"${(0, server_renderer_exports.ssrRenderAttr)("placeholder", __props.stripe.webhookSet ? (0, vue_exports.unref)(t)("•••• leave blank to keep") : "whsec_…")} class="mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}></div><button${(0, server_renderer_exports.ssrIncludeBooleanAttr)((0, vue_exports.unref)(stripeForm).processing) ? " disabled" : ""} class="rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-600"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Save keys"))}</button></div>`);
							} else _push(`<!---->`);
							_push(`</div></section><section class="mt-6 rounded-2xl border border-line bg-surface p-6"${_scopeId}><h2 class="text-sm font-bold uppercase tracking-wide text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Publish from GitHub"))}</h2><p class="mt-1 text-xs text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Link a public GitHub repo with an"))} <code${_scopeId}>extension.json</code> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("at its root — Convoro reads the manifest and lists it. Leave the tag blank to track the latest release (auto-updates); set a tag to pin a fixed version."))}</p><div class="mt-3 flex flex-wrap items-center gap-3"${_scopeId}><input${(0, server_renderer_exports.ssrRenderAttr)("value", repo.value)} type="text"${(0, server_renderer_exports.ssrRenderAttr)("placeholder", (0, vue_exports.unref)(t)("owner/repository"))} class="w-64 rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}><input${(0, server_renderer_exports.ssrRenderAttr)("value", repoPin.value)} type="text"${(0, server_renderer_exports.ssrRenderAttr)("placeholder", (0, vue_exports.unref)(t)("tag (optional, e.g. v1.2.0)"))} class="w-44 rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}><button type="button"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(linking.value || !repo.value.trim()) ? " disabled" : ""} class="rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-600 disabled:opacity-60"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(linking.value ? (0, vue_exports.unref)(t)("Linking…") : (0, vue_exports.unref)(t)("Link repo"))}</button></div>`);
							if (__props.registryWebhookUrl) _push(`<p class="mt-3 border-t border-line pt-3 text-xs text-ink-muted"${_scopeId}><strong class="text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Auto-refresh:"))}</strong> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("add a GitHub webhook (event"))} <code${_scopeId}>release</code>) → <code class="text-ink-2 select-all"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(__props.registryWebhookUrl)}</code> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("to publish new releases instantly. Unpinned items also re-check hourly."))}</p>`);
							else _push(`<!---->`);
							_push(`<p class="mt-3 text-xs text-ink-muted"${_scopeId}><strong class="text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Private repos:"))}</strong> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("install the"))} <strong class="text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Social Login"))}</strong> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("extension, enable GitHub with “Request access to private repositories,” then sign in with GitHub to let the registry read your private repositories."))}</p></section>`);
							if (__props.reviewAi) {
								_push(`<section class="mt-6 rounded-2xl border border-line bg-surface p-6"${_scopeId}><div class="flex items-center gap-2"${_scopeId}><h2 class="text-sm font-bold uppercase tracking-wide text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("AI code review"))}</h2>`);
								if (__props.reviewAi.configured) _push(`<span class="rounded-full bg-emerald-500/15 px-2 py-0.5 text-[11px] font-semibold text-emerald-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("active"))}</span>`);
								else _push(`<span class="rounded-full bg-amber-500/15 px-2 py-0.5 text-[11px] font-semibold text-amber-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("needs API key"))}</span>`);
								_push(`</div><p class="mt-1 text-xs text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Every GitHub extension is auto-audited for security on link + on each new release; the verdict shows on its listing. Uses your configured AI provider (Admin → AI)."))}</p><div class="mt-4 space-y-3"${_scopeId}><label class="flex items-center gap-2 text-sm text-ink-2"${_scopeId}><input type="checkbox"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(Array.isArray((0, vue_exports.unref)(reviewForm).enabled) ? (0, server_renderer_exports.ssrLooseContain)((0, vue_exports.unref)(reviewForm).enabled, null) : (0, vue_exports.unref)(reviewForm).enabled) ? " checked" : ""} class="rounded border-line bg-surface-2 text-primary"${_scopeId}> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Enable automatic reviews"))}</label><div class="flex flex-wrap gap-3"${_scopeId}><select class="rounded-lg border-line bg-surface-2 text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}><option value="anthropic"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(Array.isArray((0, vue_exports.unref)(reviewForm).provider) ? (0, server_renderer_exports.ssrLooseContain)((0, vue_exports.unref)(reviewForm).provider, "anthropic") : (0, server_renderer_exports.ssrLooseEqual)((0, vue_exports.unref)(reviewForm).provider, "anthropic")) ? " selected" : ""}${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Anthropic"))}</option><option value="openai"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(Array.isArray((0, vue_exports.unref)(reviewForm).provider) ? (0, server_renderer_exports.ssrLooseContain)((0, vue_exports.unref)(reviewForm).provider, "openai") : (0, server_renderer_exports.ssrLooseEqual)((0, vue_exports.unref)(reviewForm).provider, "openai")) ? " selected" : ""}${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("OpenAI-compatible"))}</option></select><input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(reviewForm).model)} type="text"${(0, server_renderer_exports.ssrRenderAttr)("placeholder", (0, vue_exports.unref)(t)("model (optional)"))} class="w-48 rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}></div>`);
								if ((0, vue_exports.unref)(reviewForm).provider === "openai") _push(`<input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(reviewForm).base_url)} type="text" placeholder="https://api.openai.com/v1 (or compatible)" class="w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}>`);
								else _push(`<!---->`);
								_push(`<input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(reviewForm).api_key)} type="password"${(0, server_renderer_exports.ssrRenderAttr)("placeholder", __props.reviewAi.configured ? (0, vue_exports.unref)(t)("•••• leave blank to keep") : (0, vue_exports.unref)(t)("API key"))} class="w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}><button${(0, server_renderer_exports.ssrIncludeBooleanAttr)((0, vue_exports.unref)(reviewForm).processing) ? " disabled" : ""} class="rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-600"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Save review settings"))}</button></div></section>`);
							} else _push(`<!---->`);
							_push(`<section class="mt-6 rounded-2xl border border-line bg-surface p-6"${_scopeId}><div class="mb-4 flex items-center"${_scopeId}><h2 class="text-sm font-bold uppercase tracking-wide text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Products"))}</h2><button class="ml-auto rounded-lg border border-line px-3 py-1.5 text-sm font-semibold text-ink-2 hover:bg-surface-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Generate covers"))}</button><button class="ml-3 rounded-lg bg-primary px-3 py-1.5 text-sm font-semibold text-white hover:bg-primary-600"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("+ New product"))}</button></div>`);
							if (!__props.products.length) _push(`<div class="rounded-xl border border-dashed border-line p-8 text-center text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("No products yet."))}</div>`);
							else {
								_push(`<div class="space-y-2.5"${_scopeId}><!--[-->`);
								(0, server_renderer_exports.ssrRenderList)(__props.products, (p) => {
									_push(`<div class="flex flex-wrap items-center gap-3 rounded-xl border border-line bg-surface-2 p-4"${_scopeId}>`);
									if (p.image) _push(`<img${(0, server_renderer_exports.ssrRenderAttr)("src", p.image)}${(0, server_renderer_exports.ssrRenderAttr)("alt", p.name)} class="h-10 w-16 rounded object-cover"${_scopeId}>`);
									else _push(`<div class="grid h-10 w-10 place-items-center rounded-lg bg-primary/15 text-lg"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(p.type === "theme" ? "🎨" : "🧩")}</div>`);
									_push(`<div class="min-w-0 flex-1"${_scopeId}><div class="flex flex-wrap items-center gap-2"${_scopeId}><span class="font-semibold text-ink"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(p.name)}</span>`);
									if (p.status === "pending") _push(`<span class="rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] text-amber-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Submitted · review"))}</span>`);
									else if (!p.published) _push(`<span class="rounded bg-surface px-1.5 py-0.5 text-[11px] text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Draft"))}</span>`);
									else _push(`<!---->`);
									if (p.featured) _push(`<span class="rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] text-amber-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Featured"))}</span>`);
									else _push(`<!---->`);
									if (p.source === "github") _push(`<span class="rounded bg-sky-500/15 px-1.5 py-0.5 text-[11px] text-sky-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("GitHub"))}</span>`);
									else _push(`<!---->`);
									if (p.version) _push(`<span class="rounded bg-surface px-1.5 py-0.5 text-[11px] text-ink-2"${_scopeId}>v${(0, server_renderer_exports.ssrInterpolate)(p.version)}</span>`);
									else _push(`<!---->`);
									if (p.pinnedVersion) _push(`<span class="rounded bg-violet-500/15 px-1.5 py-0.5 text-[11px] text-violet-400"${(0, server_renderer_exports.ssrRenderAttr)("title", (0, vue_exports.unref)(t)("Pinned to {version}", { version: p.pinnedVersion }))}${_scopeId}>📌 ${(0, server_renderer_exports.ssrInterpolate)(p.pinnedVersion)}</span>`);
									else if (p.source === "github") _push(`<span class="rounded bg-emerald-500/15 px-1.5 py-0.5 text-[11px] text-emerald-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("latest"))}</span>`);
									else _push(`<!---->`);
									if (p.hasDownload) _push(`<span class="rounded bg-emerald-500/15 px-1.5 py-0.5 text-[11px] text-emerald-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(p.source === "github" ? (0, vue_exports.unref)(t)("Linked ✓") : (0, vue_exports.unref)(t)("File ✓"))}</span>`);
									else _push(`<!---->`);
									if (reviewBadge(p.review)) _push(`<span class="${(0, server_renderer_exports.ssrRenderClass)([reviewBadge(p.review).c, "rounded px-1.5 py-0.5 text-[11px] font-semibold"])}"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(reviewBadge(p.review).t)}</span>`);
									else _push(`<!---->`);
									_push(`</div><div class="text-xs text-ink-muted"${_scopeId}>\$${(0, server_renderer_exports.ssrInterpolate)(((p.price_cents ?? 0) / 100).toFixed(2))} · ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("{count} sold", { count: p.sales ?? 0 }))} · ${(0, server_renderer_exports.ssrInterpolate)(p.source === "github" ? p.repo : p.package || (0, vue_exports.unref)(t)("no package id"))}`);
									if (p.synced) _push(`<span${_scopeId}> · ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("synced {date}", { date: p.synced }))}</span>`);
									else _push(`<!---->`);
									if (p.submitter) _push(`<span${_scopeId}> · ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("by {name}", { name: p.submitter }))}</span>`);
									else _push(`<!---->`);
									_push(`</div></div>`);
									if (p.source === "github") _push(`<button class="rounded-lg border border-line px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-surface"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Refresh"))}</button>`);
									else _push(`<label class="cursor-pointer rounded-lg border border-line px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-surface"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Upload zip"))}<input type="file" accept=".zip" class="hidden"${_scopeId}></label>`);
									if (__props.reviewAi?.configured && p.hasDownload) _push(`<button class="rounded-lg border border-line px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-surface"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Review"))}</button>`);
									else _push(`<!---->`);
									_push(`<button class="rounded-lg px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-surface"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Edit"))}</button><button class="rounded-lg px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-red-500/10 hover:text-red-400"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Delete"))}</button></div>`);
								});
								_push(`<!--]--></div>`);
							}
							_push(`</section>`);
							if (editing.value) {
								_push(`<div class="fixed inset-0 z-[80] flex items-center justify-center p-4"${_scopeId}><div class="absolute inset-0 bg-black/60"${_scopeId}></div><div class="relative max-h-[88vh] w-full max-w-lg overflow-y-auto rounded-2xl border border-line bg-surface p-6 shadow-2xl"${_scopeId}><h3 class="mb-4 font-bold text-ink"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(editing.value.id ? (0, vue_exports.unref)(t)("Edit product") : (0, vue_exports.unref)(t)("New product"))}</h3><div class="space-y-3"${_scopeId}><div${_scopeId}><label class="block text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Name"))}</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", editing.value.name)} class="mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"${_scopeId}></div><div class="flex gap-3"${_scopeId}><div class="flex-1"${_scopeId}><label class="block text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Type"))}</label><select class="mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"${_scopeId}><option value="extension"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(Array.isArray(editing.value.type) ? (0, server_renderer_exports.ssrLooseContain)(editing.value.type, "extension") : (0, server_renderer_exports.ssrLooseEqual)(editing.value.type, "extension")) ? " selected" : ""}${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Extension"))}</option><option value="theme"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(Array.isArray(editing.value.type) ? (0, server_renderer_exports.ssrLooseContain)(editing.value.type, "theme") : (0, server_renderer_exports.ssrLooseEqual)(editing.value.type, "theme")) ? " selected" : ""}${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Theme"))}</option></select></div><div class="w-28"${_scopeId}><label class="block text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Price (USD)"))}</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", editing.value.price_dollars)} type="number" min="0" step="1" class="mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"${_scopeId}></div><div class="w-24"${_scopeId}><label class="block text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Version"))}</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", editing.value.version)} class="mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"${_scopeId}></div></div><div${_scopeId}><label class="block text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Package id"))} <span class="text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("(the extension id the license unlocks)"))}</span></label><input${(0, server_renderer_exports.ssrRenderAttr)("value", editing.value.package)} placeholder="convoro-group-messages" class="mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}></div>`);
								if (editing.value.source === "github") _push(`<div${_scopeId}><label class="block text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Pin to release tag"))} <span class="text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("(blank = track latest, auto-updates)"))}</span></label><input${(0, server_renderer_exports.ssrRenderAttr)("value", editing.value.pinned_version)} placeholder="v1.2.0" class="mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"${_scopeId}></div>`);
								else _push(`<!---->`);
								_push(`<div${_scopeId}><label class="block text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Tagline"))}</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", editing.value.tagline)} class="mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"${_scopeId}></div><div${_scopeId}><label class="block text-sm text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Description"))}</label><textarea rows="4" class="mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(editing.value.description)}</textarea></div><div class="flex gap-5"${_scopeId}><label class="flex items-center gap-2 text-sm text-ink-2"${_scopeId}><input type="checkbox"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(Array.isArray(editing.value.published) ? (0, server_renderer_exports.ssrLooseContain)(editing.value.published, null) : editing.value.published) ? " checked" : ""} class="rounded border-line bg-surface-2 text-primary"${_scopeId}> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Published"))}</label><label class="flex items-center gap-2 text-sm text-ink-2"${_scopeId}><input type="checkbox"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(Array.isArray(editing.value.featured) ? (0, server_renderer_exports.ssrLooseContain)(editing.value.featured, null) : editing.value.featured) ? " checked" : ""} class="rounded border-line bg-surface-2 text-primary"${_scopeId}> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Featured"))}</label></div></div><div class="mt-5 flex gap-2"${_scopeId}><button class="rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-600"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Save"))}</button><button class="rounded-lg px-3 py-2 text-sm font-semibold text-ink-2 hover:bg-surface-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Cancel"))}</button></div></div></div>`);
							} else _push(`<!---->`);
							_push(`<!--]-->`);
						} else {
							_push(`<!--[-->`);
							if (!__props.products.length) {
								_push(`<div class="mt-10 rounded-2xl border border-dashed border-line p-16 text-center text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("You haven't published any extensions yet."))} `);
								_push((0, server_renderer_exports.ssrRenderComponent)((0, vue_exports.unref)(link_default), {
									href: "/extensions/submit",
									class: "font-semibold text-primary hover:underline"
								}, {
									default: (0, vue_exports.withCtx)((_, _push, _parent, _scopeId) => {
										if (_push) _push(`${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Submit one →"))}`);
										else return [(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Submit one →")), 1)];
									}),
									_: 1
								}, _parent, _scopeId));
								_push(`</div>`);
							} else {
								_push(`<div class="mt-8 space-y-5"${_scopeId}><!--[-->`);
								(0, server_renderer_exports.ssrRenderList)(__props.products, (p) => {
									_push(`<div class="rounded-2xl border border-line bg-surface p-6"${_scopeId}><div class="flex items-center gap-3"${_scopeId}><div class="grid h-11 w-11 place-items-center rounded-xl bg-primary/10 text-xl"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(p.type === "theme" ? "🎨" : "🧩")}</div><div class="min-w-0 flex-1"${_scopeId}><h3 class="truncate font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(p.name)}</h3><span class="${(0, server_renderer_exports.ssrRenderClass)([p.published ? "text-emerald-500" : "text-amber-500", "text-xs font-semibold uppercase tracking-wide"])}"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(p.status === "pending" ? (0, vue_exports.unref)(t)("Pending review") : p.published ? (0, vue_exports.unref)(t)("Live") : (0, vue_exports.unref)(t)("Draft"))}</span></div><a${(0, server_renderer_exports.ssrRenderAttr)("href", `/extensions/${p.slug}`)} class="text-sm font-semibold text-primary hover:underline"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("View →"))}</a></div><div class="mt-5 grid gap-4"${_scopeId}><div${_scopeId}><label class="block text-sm font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Tagline"))}</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", forms[p.slug].tagline)} maxlength="200" class="mt-1.5 w-full rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"${_scopeId}></div><div${_scopeId}><label class="block text-sm font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Description"))}</label><textarea rows="3" class="mt-1.5 w-full rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(forms[p.slug].description)}</textarea></div><div${_scopeId}><label class="block text-sm font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Pricing"))}</label><div class="mt-2 flex flex-wrap items-center gap-3"${_scopeId}><div class="flex rounded-xl border border-line p-0.5"${_scopeId}><button type="button" class="${(0, server_renderer_exports.ssrRenderClass)([forms[p.slug].pricing === "free" ? "bg-primary text-white" : "text-ink-2", "rounded-lg px-4 py-1.5 text-sm font-semibold"])}"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Free"))}</button><button type="button" class="${(0, server_renderer_exports.ssrRenderClass)([forms[p.slug].pricing === "premium" ? "bg-primary text-white" : "text-ink-2", "rounded-lg px-4 py-1.5 text-sm font-semibold"])}"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Premium"))}</button></div>`);
									if (forms[p.slug].pricing === "premium") _push(`<div class="flex items-center gap-1.5"${_scopeId}><span class="text-ink-muted"${_scopeId}>\$</span><input${(0, server_renderer_exports.ssrRenderAttr)("value", forms[p.slug].price)} type="number" min="1" max="9999" step="1" class="w-28 rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"${_scopeId}><span class="text-sm text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("one-time"))}</span></div>`);
									else _push(`<!---->`);
									_push(`</div>`);
									if (forms[p.slug].pricing === "premium" && !__props.checkoutEnabled) _push(`<p class="mt-2 rounded-lg bg-amber-500/10 px-3 py-2 text-xs text-amber-600 dark:text-amber-300"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Payments aren't live on this store yet — buyers can't check out until the store owner connects Stripe."))}</p>`);
									else _push(`<!---->`);
									_push(`</div></div><div class="mt-4 border-t border-line pt-4"${_scopeId}><button type="button"${(0, server_renderer_exports.ssrIncludeBooleanAttr)(forms[p.slug].saving) ? " disabled" : ""} class="rounded-c bg-primary px-5 py-2.5 text-sm font-bold text-white hover:bg-primary-600 disabled:opacity-60"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)(forms[p.slug].saving ? (0, vue_exports.unref)(t)("Saving…") : (0, vue_exports.unref)(t)("Save changes"))}</button></div></div>`);
								});
								_push(`<!--]--></div>`);
							}
							_push(`<!--]-->`);
						}
						_push(`</section>`);
					} else return [(0, vue_exports.createVNode)("section", { class: "mx-auto max-w-3xl px-6 py-16" }, [
						(0, vue_exports.createVNode)((0, vue_exports.unref)(link_default), {
							href: "/extensions",
							class: "mb-6 inline-flex items-center gap-1.5 text-sm font-semibold text-ink-muted hover:text-ink"
						}, {
							default: (0, vue_exports.withCtx)(() => [((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("svg", {
								width: "15",
								height: "15",
								viewBox: "0 0 24 24",
								fill: "none",
								stroke: "currentColor",
								"stroke-width": "2",
								"stroke-linecap": "round",
								"stroke-linejoin": "round"
							}, [(0, vue_exports.createVNode)("path", { d: "M19 12H5M12 19l-7-7 7-7" })])), (0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Back to the directory")), 1)]),
							_: 1
						}),
						(0, vue_exports.createVNode)("h1", { class: "text-4xl font-black tracking-tight" }, (0, vue_exports.toDisplayString)(__props.isOwner ? (0, vue_exports.unref)(t)("Store console") : (0, vue_exports.unref)(t)("Your extensions")), 1),
						(0, vue_exports.createVNode)("p", { class: "mt-3 text-lg text-ink-2" }, (0, vue_exports.toDisplayString)(__props.isOwner ? (0, vue_exports.unref)(t)("Payments, GitHub publishing, and every listing in the directory.") : (0, vue_exports.unref)(t)("Edit pricing and details for the listings you publish. Changes go live immediately.")), 1),
						status.value ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
							key: 0,
							class: "mt-6 rounded-xl border border-emerald-500/30 bg-emerald-500/10 px-4 py-3 text-sm font-medium text-emerald-700 dark:text-emerald-300"
						}, (0, vue_exports.toDisplayString)(status.value), 1)) : (0, vue_exports.createCommentVNode)("", true),
						error.value ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
							key: 1,
							class: "mt-6 rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm font-medium text-red-600 dark:text-red-300"
						}, (0, vue_exports.toDisplayString)(error.value), 1)) : (0, vue_exports.createCommentVNode)("", true),
						__props.isOwner && __props.stripe ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)(vue_exports.Fragment, { key: 2 }, [
							(0, vue_exports.createVNode)("section", { class: "mt-8 rounded-2xl border border-line bg-surface p-6" }, [
								(0, vue_exports.createVNode)("h2", { class: "text-sm font-bold uppercase tracking-wide text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Payments (Stripe)")), 1),
								__props.stripe.connectedAccount ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
									key: 0,
									class: "mt-3 flex flex-wrap items-center gap-3 rounded-xl border border-emerald-500/30 bg-emerald-500/10 p-4"
								}, [
									(0, vue_exports.createVNode)("span", { class: "grid h-9 w-9 place-items-center rounded-full bg-emerald-500/20 text-emerald-500" }, "✓"),
									(0, vue_exports.createVNode)("div", { class: "min-w-0" }, [(0, vue_exports.createVNode)("div", { class: "text-sm font-semibold text-emerald-600 dark:text-emerald-200" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Stripe connected")), 1), (0, vue_exports.createVNode)("div", { class: "font-mono text-xs text-emerald-500/80" }, (0, vue_exports.toDisplayString)(__props.stripe.connectedAccount), 1)]),
									(0, vue_exports.createVNode)("a", {
										href: `https://dashboard.stripe.com/${__props.stripe.connectedAccount}`,
										target: "_blank",
										rel: "noopener",
										class: "ml-auto text-sm font-semibold text-emerald-500 hover:underline"
									}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Open dashboard")), 9, ["href"]),
									(0, vue_exports.createVNode)("button", {
										type: "button",
										onClick: ($event) => (0, vue_exports.unref)(router).post("/extensions/manage/stripe/disconnect", {}, { preserveScroll: true }),
										class: "rounded-lg px-3 py-1.5 text-xs font-semibold text-ink-2 hover:bg-red-500/10 hover:text-red-400"
									}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Disconnect")), 9, ["onClick"])
								])) : ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)(vue_exports.Fragment, { key: 1 }, [(0, vue_exports.createVNode)("p", { class: "mt-1 text-xs text-ink-muted" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Connect your Stripe account to take payments — no copy-pasting API keys.")), 1), __props.stripe.canConnect ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("a", {
									key: 0,
									href: "/extensions/manage/stripe/connect",
									class: "mt-3 inline-flex items-center gap-2 rounded-lg bg-[#635bff] px-5 py-2.5 text-sm font-bold text-white hover:bg-[#5249e0]"
								}, [((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("svg", {
									width: "16",
									height: "16",
									viewBox: "0 0 24 24",
									fill: "currentColor"
								}, [(0, vue_exports.createVNode)("path", { d: "M13.5 9.6c0-.6.5-.8 1.2-.8 1.1 0 2.5.3 3.6.9V6.3c-1.2-.5-2.4-.7-3.6-.7-2.9 0-4.9 1.5-4.9 4.1 0 4 5.4 3.3 5.4 5 0 .6-.6.9-1.4.9-1.2 0-2.8-.5-4-1.2v3.4c1.4.6 2.7.8 4 .8 3 0 5-1.5 5-4.1 0-4.3-5.3-3.5-5.3-5.1z" })])), (0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Connect with Stripe")), 1)])) : ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("p", {
									key: 1,
									class: "mt-3 rounded-lg bg-amber-500/10 px-3 py-2 text-xs text-amber-600 dark:text-amber-300"
								}, [
									(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("To enable “Connect with Stripe”, set")) + " ", 1),
									(0, vue_exports.createVNode)("code", null, "STRIPE_CONNECT_CLIENT_ID"),
									(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("and")) + " ", 1),
									(0, vue_exports.createVNode)("code", null, "STRIPE_SECRET"),
									(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("in the server’s")) + " ", 1),
									(0, vue_exports.createVNode)("code", null, ".env"),
									(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)(", then reload.")), 1)
								]))], 64)),
								(0, vue_exports.createVNode)("div", { class: "mt-5 border-t border-line pt-4" }, [
									(0, vue_exports.createVNode)("p", { class: "text-xs text-ink-muted" }, [
										(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Add a webhook in Stripe →")) + " ", 1),
										(0, vue_exports.createVNode)("code", { class: "text-ink-2" }, (0, vue_exports.toDisplayString)(__props.stripe.webhookUrl), 1),
										(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("(event")) + " ", 1),
										(0, vue_exports.createVNode)("code", { class: "text-ink-2" }, "checkout.session.completed"),
										(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)(").")), 1)
									]),
									(0, vue_exports.createVNode)("button", {
										type: "button",
										class: "mt-2 text-xs font-semibold text-ink-2 hover:text-ink",
										onClick: ($event) => showAdvancedKeys.value = !showAdvancedKeys.value
									}, (0, vue_exports.toDisplayString)(showAdvancedKeys.value ? (0, vue_exports.unref)(t)("Hide") : (0, vue_exports.unref)(t)("Advanced: enter keys manually")), 9, ["onClick"]),
									showAdvancedKeys.value ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
										key: 0,
										class: "mt-3 space-y-3"
									}, [
										(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm font-medium text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Publishable key")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
											"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(stripeForm).key = $event,
											type: "text",
											placeholder: "pk_live_…",
											class: "mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
										}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, (0, vue_exports.unref)(stripeForm).key]])]),
										(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm font-medium text-ink-2" }, [(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Secret key")) + " ", 1), __props.stripe.secretSet ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 0,
											class: "text-emerald-500"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("(set)")), 1)) : (0, vue_exports.createCommentVNode)("", true)]), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
											"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(stripeForm).secret = $event,
											type: "password",
											placeholder: __props.stripe.secretSet ? (0, vue_exports.unref)(t)("•••• leave blank to keep") : "sk_live_…",
											class: "mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
										}, null, 8, ["onUpdate:modelValue", "placeholder"]), [[vue_exports.vModelText, (0, vue_exports.unref)(stripeForm).secret]])]),
										(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm font-medium text-ink-2" }, [(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Webhook signing secret")) + " ", 1), __props.stripe.webhookSet ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 0,
											class: "text-emerald-500"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("(set)")), 1)) : (0, vue_exports.createCommentVNode)("", true)]), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
											"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(stripeForm).webhook_secret = $event,
											type: "password",
											placeholder: __props.stripe.webhookSet ? (0, vue_exports.unref)(t)("•••• leave blank to keep") : "whsec_…",
											class: "mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
										}, null, 8, ["onUpdate:modelValue", "placeholder"]), [[vue_exports.vModelText, (0, vue_exports.unref)(stripeForm).webhook_secret]])]),
										(0, vue_exports.createVNode)("button", {
											onClick: saveStripe,
											disabled: (0, vue_exports.unref)(stripeForm).processing,
											class: "rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-600"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Save keys")), 9, ["disabled"])
									])) : (0, vue_exports.createCommentVNode)("", true)
								])
							]),
							(0, vue_exports.createVNode)("section", { class: "mt-6 rounded-2xl border border-line bg-surface p-6" }, [
								(0, vue_exports.createVNode)("h2", { class: "text-sm font-bold uppercase tracking-wide text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Publish from GitHub")), 1),
								(0, vue_exports.createVNode)("p", { class: "mt-1 text-xs text-ink-muted" }, [
									(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Link a public GitHub repo with an")) + " ", 1),
									(0, vue_exports.createVNode)("code", null, "extension.json"),
									(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("at its root — Convoro reads the manifest and lists it. Leave the tag blank to track the latest release (auto-updates); set a tag to pin a fixed version.")), 1)
								]),
								(0, vue_exports.createVNode)("div", { class: "mt-3 flex flex-wrap items-center gap-3" }, [
									(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => repo.value = $event,
										type: "text",
										placeholder: (0, vue_exports.unref)(t)("owner/repository"),
										class: "w-64 rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue", "placeholder"]), [[vue_exports.vModelText, repo.value]]),
									(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => repoPin.value = $event,
										type: "text",
										placeholder: (0, vue_exports.unref)(t)("tag (optional, e.g. v1.2.0)"),
										class: "w-44 rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue", "placeholder"]), [[vue_exports.vModelText, repoPin.value]]),
									(0, vue_exports.createVNode)("button", {
										type: "button",
										disabled: linking.value || !repo.value.trim(),
										onClick: linkRepo,
										class: "rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-600 disabled:opacity-60"
									}, (0, vue_exports.toDisplayString)(linking.value ? (0, vue_exports.unref)(t)("Linking…") : (0, vue_exports.unref)(t)("Link repo")), 9, ["disabled"])
								]),
								__props.registryWebhookUrl ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("p", {
									key: 0,
									class: "mt-3 border-t border-line pt-3 text-xs text-ink-muted"
								}, [
									(0, vue_exports.createVNode)("strong", { class: "text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Auto-refresh:")), 1),
									(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("add a GitHub webhook (event")) + " ", 1),
									(0, vue_exports.createVNode)("code", null, "release"),
									(0, vue_exports.createTextVNode)(") → "),
									(0, vue_exports.createVNode)("code", { class: "text-ink-2 select-all" }, (0, vue_exports.toDisplayString)(__props.registryWebhookUrl), 1),
									(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("to publish new releases instantly. Unpinned items also re-check hourly.")), 1)
								])) : (0, vue_exports.createCommentVNode)("", true),
								(0, vue_exports.createVNode)("p", { class: "mt-3 text-xs text-ink-muted" }, [
									(0, vue_exports.createVNode)("strong", { class: "text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Private repos:")), 1),
									(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("install the")) + " ", 1),
									(0, vue_exports.createVNode)("strong", { class: "text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Social Login")), 1),
									(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("extension, enable GitHub with “Request access to private repositories,” then sign in with GitHub to let the registry read your private repositories.")), 1)
								])
							]),
							__props.reviewAi ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("section", {
								key: 0,
								class: "mt-6 rounded-2xl border border-line bg-surface p-6"
							}, [
								(0, vue_exports.createVNode)("div", { class: "flex items-center gap-2" }, [(0, vue_exports.createVNode)("h2", { class: "text-sm font-bold uppercase tracking-wide text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("AI code review")), 1), __props.reviewAi.configured ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
									key: 0,
									class: "rounded-full bg-emerald-500/15 px-2 py-0.5 text-[11px] font-semibold text-emerald-500"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("active")), 1)) : ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
									key: 1,
									class: "rounded-full bg-amber-500/15 px-2 py-0.5 text-[11px] font-semibold text-amber-500"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("needs API key")), 1))]),
								(0, vue_exports.createVNode)("p", { class: "mt-1 text-xs text-ink-muted" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Every GitHub extension is auto-audited for security on link + on each new release; the verdict shows on its listing. Uses your configured AI provider (Admin → AI).")), 1),
								(0, vue_exports.createVNode)("div", { class: "mt-4 space-y-3" }, [
									(0, vue_exports.createVNode)("label", { class: "flex items-center gap-2 text-sm text-ink-2" }, [(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										type: "checkbox",
										"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(reviewForm).enabled = $event,
										class: "rounded border-line bg-surface-2 text-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelCheckbox, (0, vue_exports.unref)(reviewForm).enabled]]), (0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Enable automatic reviews")), 1)]),
									(0, vue_exports.createVNode)("div", { class: "flex flex-wrap gap-3" }, [(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("select", {
										"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(reviewForm).provider = $event,
										class: "rounded-lg border-line bg-surface-2 text-sm text-ink focus:border-primary focus:ring-primary"
									}, [(0, vue_exports.createVNode)("option", { value: "anthropic" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Anthropic")), 1), (0, vue_exports.createVNode)("option", { value: "openai" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("OpenAI-compatible")), 1)], 8, ["onUpdate:modelValue"]), [[vue_exports.vModelSelect, (0, vue_exports.unref)(reviewForm).provider]]), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(reviewForm).model = $event,
										type: "text",
										placeholder: (0, vue_exports.unref)(t)("model (optional)"),
										class: "w-48 rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue", "placeholder"]), [[vue_exports.vModelText, (0, vue_exports.unref)(reviewForm).model]])]),
									(0, vue_exports.unref)(reviewForm).provider === "openai" ? (0, vue_exports.withDirectives)(((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("input", {
										key: 0,
										"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(reviewForm).base_url = $event,
										type: "text",
										placeholder: "https://api.openai.com/v1 (or compatible)",
										class: "w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"])), [[vue_exports.vModelText, (0, vue_exports.unref)(reviewForm).base_url]]) : (0, vue_exports.createCommentVNode)("", true),
									(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(reviewForm).api_key = $event,
										type: "password",
										placeholder: __props.reviewAi.configured ? (0, vue_exports.unref)(t)("•••• leave blank to keep") : (0, vue_exports.unref)(t)("API key"),
										class: "w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue", "placeholder"]), [[vue_exports.vModelText, (0, vue_exports.unref)(reviewForm).api_key]]),
									(0, vue_exports.createVNode)("button", {
										onClick: saveReview,
										disabled: (0, vue_exports.unref)(reviewForm).processing,
										class: "rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-600"
									}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Save review settings")), 9, ["disabled"])
								])
							])) : (0, vue_exports.createCommentVNode)("", true),
							(0, vue_exports.createVNode)("section", { class: "mt-6 rounded-2xl border border-line bg-surface p-6" }, [(0, vue_exports.createVNode)("div", { class: "mb-4 flex items-center" }, [
								(0, vue_exports.createVNode)("h2", { class: "text-sm font-bold uppercase tracking-wide text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Products")), 1),
								(0, vue_exports.createVNode)("button", {
									onClick: generateCovers,
									class: "ml-auto rounded-lg border border-line px-3 py-1.5 text-sm font-semibold text-ink-2 hover:bg-surface-2"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Generate covers")), 1),
								(0, vue_exports.createVNode)("button", {
									onClick: openNew,
									class: "ml-3 rounded-lg bg-primary px-3 py-1.5 text-sm font-semibold text-white hover:bg-primary-600"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("+ New product")), 1)
							]), !__props.products.length ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
								key: 0,
								class: "rounded-xl border border-dashed border-line p-8 text-center text-sm text-ink-2"
							}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("No products yet.")), 1)) : ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
								key: 1,
								class: "space-y-2.5"
							}, [((0, vue_exports.openBlock)(true), (0, vue_exports.createBlock)(vue_exports.Fragment, null, (0, vue_exports.renderList)(__props.products, (p) => {
								return (0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
									key: p.id,
									class: "flex flex-wrap items-center gap-3 rounded-xl border border-line bg-surface-2 p-4"
								}, [
									p.image ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("img", {
										key: 0,
										src: p.image,
										alt: p.name,
										class: "h-10 w-16 rounded object-cover"
									}, null, 8, ["src", "alt"])) : ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
										key: 1,
										class: "grid h-10 w-10 place-items-center rounded-lg bg-primary/15 text-lg"
									}, (0, vue_exports.toDisplayString)(p.type === "theme" ? "🎨" : "🧩"), 1)),
									(0, vue_exports.createVNode)("div", { class: "min-w-0 flex-1" }, [(0, vue_exports.createVNode)("div", { class: "flex flex-wrap items-center gap-2" }, [
										(0, vue_exports.createVNode)("span", { class: "font-semibold text-ink" }, (0, vue_exports.toDisplayString)(p.name), 1),
										p.status === "pending" ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 0,
											class: "rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] text-amber-500"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Submitted · review")), 1)) : !p.published ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 1,
											class: "rounded bg-surface px-1.5 py-0.5 text-[11px] text-ink-2"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Draft")), 1)) : (0, vue_exports.createCommentVNode)("", true),
										p.featured ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 2,
											class: "rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] text-amber-500"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Featured")), 1)) : (0, vue_exports.createCommentVNode)("", true),
										p.source === "github" ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 3,
											class: "rounded bg-sky-500/15 px-1.5 py-0.5 text-[11px] text-sky-500"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("GitHub")), 1)) : (0, vue_exports.createCommentVNode)("", true),
										p.version ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 4,
											class: "rounded bg-surface px-1.5 py-0.5 text-[11px] text-ink-2"
										}, "v" + (0, vue_exports.toDisplayString)(p.version), 1)) : (0, vue_exports.createCommentVNode)("", true),
										p.pinnedVersion ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 5,
											class: "rounded bg-violet-500/15 px-1.5 py-0.5 text-[11px] text-violet-400",
											title: (0, vue_exports.unref)(t)("Pinned to {version}", { version: p.pinnedVersion })
										}, "📌 " + (0, vue_exports.toDisplayString)(p.pinnedVersion), 9, ["title"])) : p.source === "github" ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 6,
											class: "rounded bg-emerald-500/15 px-1.5 py-0.5 text-[11px] text-emerald-500"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("latest")), 1)) : (0, vue_exports.createCommentVNode)("", true),
										p.hasDownload ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 7,
											class: "rounded bg-emerald-500/15 px-1.5 py-0.5 text-[11px] text-emerald-500"
										}, (0, vue_exports.toDisplayString)(p.source === "github" ? (0, vue_exports.unref)(t)("Linked ✓") : (0, vue_exports.unref)(t)("File ✓")), 1)) : (0, vue_exports.createCommentVNode)("", true),
										reviewBadge(p.review) ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", {
											key: 8,
											class: ["rounded px-1.5 py-0.5 text-[11px] font-semibold", reviewBadge(p.review).c]
										}, (0, vue_exports.toDisplayString)(reviewBadge(p.review).t), 3)) : (0, vue_exports.createCommentVNode)("", true)
									]), (0, vue_exports.createVNode)("div", { class: "text-xs text-ink-muted" }, [
										(0, vue_exports.createTextVNode)("$" + (0, vue_exports.toDisplayString)(((p.price_cents ?? 0) / 100).toFixed(2)) + " · " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("{count} sold", { count: p.sales ?? 0 })) + " · " + (0, vue_exports.toDisplayString)(p.source === "github" ? p.repo : p.package || (0, vue_exports.unref)(t)("no package id")), 1),
										p.synced ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", { key: 0 }, " · " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("synced {date}", { date: p.synced })), 1)) : (0, vue_exports.createCommentVNode)("", true),
										p.submitter ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("span", { key: 1 }, " · " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("by {name}", { name: p.submitter })), 1)) : (0, vue_exports.createCommentVNode)("", true)
									])]),
									p.source === "github" ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("button", {
										key: 2,
										onClick: ($event) => refreshRepo(p),
										class: "rounded-lg border border-line px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-surface"
									}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Refresh")), 9, ["onClick"])) : ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("label", {
										key: 3,
										class: "cursor-pointer rounded-lg border border-line px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-surface"
									}, [(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Upload zip")), 1), (0, vue_exports.createVNode)("input", {
										type: "file",
										accept: ".zip",
										class: "hidden",
										onChange: (e) => uploadFile(p, e)
									}, null, 40, ["onChange"])])),
									__props.reviewAi?.configured && p.hasDownload ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("button", {
										key: 4,
										onClick: ($event) => reviewProduct(p),
										class: "rounded-lg border border-line px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-surface"
									}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Review")), 9, ["onClick"])) : (0, vue_exports.createCommentVNode)("", true),
									(0, vue_exports.createVNode)("button", {
										onClick: ($event) => openEdit(p),
										class: "rounded-lg px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-surface"
									}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Edit")), 9, ["onClick"]),
									(0, vue_exports.createVNode)("button", {
										onClick: ($event) => destroyProduct(p),
										class: "rounded-lg px-2.5 py-1.5 text-xs font-semibold text-ink-2 hover:bg-red-500/10 hover:text-red-400"
									}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Delete")), 9, ["onClick"])
								]);
							}), 128))]))]),
							editing.value ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
								key: 1,
								class: "fixed inset-0 z-[80] flex items-center justify-center p-4"
							}, [(0, vue_exports.createVNode)("div", {
								class: "absolute inset-0 bg-black/60",
								onClick: closeEdit
							}), (0, vue_exports.createVNode)("div", { class: "relative max-h-[88vh] w-full max-w-lg overflow-y-auto rounded-2xl border border-line bg-surface p-6 shadow-2xl" }, [
								(0, vue_exports.createVNode)("h3", { class: "mb-4 font-bold text-ink" }, (0, vue_exports.toDisplayString)(editing.value.id ? (0, vue_exports.unref)(t)("Edit product") : (0, vue_exports.unref)(t)("New product")), 1),
								(0, vue_exports.createVNode)("div", { class: "space-y-3" }, [
									(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Name")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => editing.value.name = $event,
										class: "mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, editing.value.name]])]),
									(0, vue_exports.createVNode)("div", { class: "flex gap-3" }, [
										(0, vue_exports.createVNode)("div", { class: "flex-1" }, [(0, vue_exports.createVNode)("label", { class: "block text-sm text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Type")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("select", {
											"onUpdate:modelValue": ($event) => editing.value.type = $event,
											class: "mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"
										}, [(0, vue_exports.createVNode)("option", { value: "extension" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Extension")), 1), (0, vue_exports.createVNode)("option", { value: "theme" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Theme")), 1)], 8, ["onUpdate:modelValue"]), [[vue_exports.vModelSelect, editing.value.type]])]),
										(0, vue_exports.createVNode)("div", { class: "w-28" }, [(0, vue_exports.createVNode)("label", { class: "block text-sm text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Price (USD)")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
											"onUpdate:modelValue": ($event) => editing.value.price_dollars = $event,
											type: "number",
											min: "0",
											step: "1",
											class: "mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"
										}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, editing.value.price_dollars]])]),
										(0, vue_exports.createVNode)("div", { class: "w-24" }, [(0, vue_exports.createVNode)("label", { class: "block text-sm text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Version")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
											"onUpdate:modelValue": ($event) => editing.value.version = $event,
											class: "mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"
										}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, editing.value.version]])])
									]),
									(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm text-ink-2" }, [(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Package id")) + " ", 1), (0, vue_exports.createVNode)("span", { class: "text-ink-muted" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("(the extension id the license unlocks)")), 1)]), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => editing.value.package = $event,
										placeholder: "convoro-group-messages",
										class: "mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, editing.value.package]])]),
									editing.value.source === "github" ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", { key: 0 }, [(0, vue_exports.createVNode)("label", { class: "block text-sm text-ink-2" }, [(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Pin to release tag")) + " ", 1), (0, vue_exports.createVNode)("span", { class: "text-ink-muted" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("(blank = track latest, auto-updates)")), 1)]), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => editing.value.pinned_version = $event,
										placeholder: "v1.2.0",
										class: "mt-1 w-full rounded-lg border-line bg-surface-2 font-mono text-sm text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, editing.value.pinned_version]])])) : (0, vue_exports.createCommentVNode)("", true),
									(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Tagline")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => editing.value.tagline = $event,
										class: "mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, editing.value.tagline]])]),
									(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm text-ink-2" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Description")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("textarea", {
										"onUpdate:modelValue": ($event) => editing.value.description = $event,
										rows: "4",
										class: "mt-1 w-full rounded-lg border-line bg-surface-2 text-ink focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, editing.value.description]])]),
									(0, vue_exports.createVNode)("div", { class: "flex gap-5" }, [(0, vue_exports.createVNode)("label", { class: "flex items-center gap-2 text-sm text-ink-2" }, [(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										type: "checkbox",
										"onUpdate:modelValue": ($event) => editing.value.published = $event,
										class: "rounded border-line bg-surface-2 text-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelCheckbox, editing.value.published]]), (0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Published")), 1)]), (0, vue_exports.createVNode)("label", { class: "flex items-center gap-2 text-sm text-ink-2" }, [(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										type: "checkbox",
										"onUpdate:modelValue": ($event) => editing.value.featured = $event,
										class: "rounded border-line bg-surface-2 text-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelCheckbox, editing.value.featured]]), (0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Featured")), 1)])])
								]),
								(0, vue_exports.createVNode)("div", { class: "mt-5 flex gap-2" }, [(0, vue_exports.createVNode)("button", {
									onClick: saveProduct,
									class: "rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-600"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Save")), 1), (0, vue_exports.createVNode)("button", {
									onClick: closeEdit,
									class: "rounded-lg px-3 py-2 text-sm font-semibold text-ink-2 hover:bg-surface-2"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Cancel")), 1)])
							])])) : (0, vue_exports.createCommentVNode)("", true)
						], 64)) : ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)(vue_exports.Fragment, { key: 3 }, [!__props.products.length ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
							key: 0,
							class: "mt-10 rounded-2xl border border-dashed border-line p-16 text-center text-ink-muted"
						}, [(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("You haven't published any extensions yet.")) + " ", 1), (0, vue_exports.createVNode)((0, vue_exports.unref)(link_default), {
							href: "/extensions/submit",
							class: "font-semibold text-primary hover:underline"
						}, {
							default: (0, vue_exports.withCtx)(() => [(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Submit one →")), 1)]),
							_: 1
						})])) : ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
							key: 1,
							class: "mt-8 space-y-5"
						}, [((0, vue_exports.openBlock)(true), (0, vue_exports.createBlock)(vue_exports.Fragment, null, (0, vue_exports.renderList)(__props.products, (p) => {
							return (0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
								key: p.slug,
								class: "rounded-2xl border border-line bg-surface p-6"
							}, [
								(0, vue_exports.createVNode)("div", { class: "flex items-center gap-3" }, [
									(0, vue_exports.createVNode)("div", { class: "grid h-11 w-11 place-items-center rounded-xl bg-primary/10 text-xl" }, (0, vue_exports.toDisplayString)(p.type === "theme" ? "🎨" : "🧩"), 1),
									(0, vue_exports.createVNode)("div", { class: "min-w-0 flex-1" }, [(0, vue_exports.createVNode)("h3", { class: "truncate font-bold" }, (0, vue_exports.toDisplayString)(p.name), 1), (0, vue_exports.createVNode)("span", { class: ["text-xs font-semibold uppercase tracking-wide", p.published ? "text-emerald-500" : "text-amber-500"] }, (0, vue_exports.toDisplayString)(p.status === "pending" ? (0, vue_exports.unref)(t)("Pending review") : p.published ? (0, vue_exports.unref)(t)("Live") : (0, vue_exports.unref)(t)("Draft")), 3)]),
									(0, vue_exports.createVNode)("a", {
										href: `/extensions/${p.slug}`,
										class: "text-sm font-semibold text-primary hover:underline"
									}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("View →")), 9, ["href"])
								]),
								(0, vue_exports.createVNode)("div", { class: "mt-5 grid gap-4" }, [
									(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm font-bold" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Tagline")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => forms[p.slug].tagline = $event,
										maxlength: "200",
										class: "mt-1.5 w-full rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, forms[p.slug].tagline]])]),
									(0, vue_exports.createVNode)("div", null, [(0, vue_exports.createVNode)("label", { class: "block text-sm font-bold" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Description")), 1), (0, vue_exports.withDirectives)((0, vue_exports.createVNode)("textarea", {
										"onUpdate:modelValue": ($event) => forms[p.slug].description = $event,
										rows: "3",
										class: "mt-1.5 w-full rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[vue_exports.vModelText, forms[p.slug].description]])]),
									(0, vue_exports.createVNode)("div", null, [
										(0, vue_exports.createVNode)("label", { class: "block text-sm font-bold" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Pricing")), 1),
										(0, vue_exports.createVNode)("div", { class: "mt-2 flex flex-wrap items-center gap-3" }, [(0, vue_exports.createVNode)("div", { class: "flex rounded-xl border border-line p-0.5" }, [(0, vue_exports.createVNode)("button", {
											type: "button",
											onClick: ($event) => forms[p.slug].pricing = "free",
											class: ["rounded-lg px-4 py-1.5 text-sm font-semibold", forms[p.slug].pricing === "free" ? "bg-primary text-white" : "text-ink-2"]
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Free")), 11, ["onClick"]), (0, vue_exports.createVNode)("button", {
											type: "button",
											onClick: ($event) => forms[p.slug].pricing = "premium",
											class: ["rounded-lg px-4 py-1.5 text-sm font-semibold", forms[p.slug].pricing === "premium" ? "bg-primary text-white" : "text-ink-2"]
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Premium")), 11, ["onClick"])]), forms[p.slug].pricing === "premium" ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
											key: 0,
											class: "flex items-center gap-1.5"
										}, [
											(0, vue_exports.createVNode)("span", { class: "text-ink-muted" }, "$"),
											(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
												"onUpdate:modelValue": ($event) => forms[p.slug].price = $event,
												type: "number",
												min: "1",
												max: "9999",
												step: "1",
												class: "w-28 rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"
											}, null, 8, ["onUpdate:modelValue"]), [[
												vue_exports.vModelText,
												forms[p.slug].price,
												void 0,
												{ number: true }
											]]),
											(0, vue_exports.createVNode)("span", { class: "text-sm text-ink-muted" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("one-time")), 1)
										])) : (0, vue_exports.createCommentVNode)("", true)]),
										forms[p.slug].pricing === "premium" && !__props.checkoutEnabled ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("p", {
											key: 0,
											class: "mt-2 rounded-lg bg-amber-500/10 px-3 py-2 text-xs text-amber-600 dark:text-amber-300"
										}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Payments aren't live on this store yet — buyers can't check out until the store owner connects Stripe.")), 1)) : (0, vue_exports.createCommentVNode)("", true)
									])
								]),
								(0, vue_exports.createVNode)("div", { class: "mt-4 border-t border-line pt-4" }, [(0, vue_exports.createVNode)("button", {
									type: "button",
									disabled: forms[p.slug].saving,
									onClick: ($event) => save(p),
									class: "rounded-c bg-primary px-5 py-2.5 text-sm font-bold text-white hover:bg-primary-600 disabled:opacity-60"
								}, (0, vue_exports.toDisplayString)(forms[p.slug].saving ? (0, vue_exports.unref)(t)("Saving…") : (0, vue_exports.unref)(t)("Save changes")), 9, ["disabled", "onClick"])])
							]);
						}), 128))]))], 64))
					])];
				}),
				_: 1
			}, _parent));
			_push(`<!--]-->`);
		};
	}
});
//#endregion
//#region resources/js/Pages/Store/Manage.vue
var _sfc_setup = Manage_vue_vue_type_script_setup_true_lang_default.setup;
Manage_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
	const ssrContext = (0, vue_exports.useSSRContext)();
	(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/Pages/Store/Manage.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
var Manage_default = Manage_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { Manage_default as default };
