import { a as usePage, i as useForm, n as head_default, o as vue_exports, r as link_default } 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/Submit.vue?vue&type=script&setup=true&lang.ts
var Submit_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue_exports.defineComponent)({
	__name: "Submit",
	__ssrInlineRender: true,
	props: { checkoutEnabled: { type: Boolean } },
	setup(__props) {
		const error = (0, vue_exports.computed)(() => usePage().props.flash?.storeError);
		const form = useForm({
			repo: "",
			pricing: "free",
			price: 9,
			email: ""
		});
		function submit() {
			form.post("/extensions/submit", { preserveScroll: true });
		}
		return (_ctx, _push, _parent, _attrs) => {
			_push(`<!--[-->`);
			_push((0, server_renderer_exports.ssrRenderComponent)((0, vue_exports.unref)(head_default), { title: (0, vue_exports.unref)(t)("Submit your extension — {brand}", { brand: "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-2xl 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)((0, vue_exports.unref)(t)("Submit your extension or theme"))}</h1><p class="mt-3 text-lg text-ink-2"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Convoro has a built-in, Packagist-style registry. Link a"))} <strong${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("public GitHub repo"))}</strong> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("with an"))} <code class="rounded bg-surface-2 px-1.5 py-0.5 text-sm"${_scopeId}>extension.json</code> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("at its root and a tagged release. We read your manifest, list it in the directory, and one-click installs pull straight from your GitHub releases."))}</p>`);
						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(`<!---->`);
						_push(`<form class="mt-8 space-y-6 rounded-2xl border border-line bg-surface p-6"${_scopeId}><div${_scopeId}><label class="block text-sm font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("GitHub repository"))}</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(form).repo)} type="text"${(0, server_renderer_exports.ssrRenderAttr)("placeholder", (0, vue_exports.unref)(t)("your-name/your-extension or https://github.com/…"))} class="mt-1.5 w-full rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"${_scopeId}>`);
						if ((0, vue_exports.unref)(form).errors.repo) _push(`<p class="mt-1 text-xs text-red-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(form).errors.repo)}</p>`);
						else _push(`<!---->`);
						_push(`<p class="mt-1 text-xs text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Must be public, with"))} <code${_scopeId}>extension.json</code> ${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("at the root. We pull the latest release tag."))}</p></div><div${_scopeId}><label class="block text-sm font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Listing type"))}</label><div class="mt-2 grid grid-cols-2 gap-3"${_scopeId}><button type="button" class="${(0, server_renderer_exports.ssrRenderClass)([(0, vue_exports.unref)(form).pricing === "free" ? "border-primary bg-primary/5" : "border-line hover:bg-surface-2", "rounded-xl border p-4 text-left transition"])}"${_scopeId}><div class="font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Free"))}</div><div class="text-xs text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Listed instantly after review. Installs in one click."))}</div></button><button type="button" class="${(0, server_renderer_exports.ssrRenderClass)([(0, vue_exports.unref)(form).pricing === "premium" ? "border-primary bg-primary/5" : "border-line hover:bg-surface-2", "rounded-xl border p-4 text-left transition"])}"${_scopeId}><div class="font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Premium"))}</div><div class="text-xs text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Sells through the Convoro store with a license key."))}</div></button></div></div>`);
						if ((0, vue_exports.unref)(form).pricing === "premium") {
							_push(`<div${_scopeId}><label class="block text-sm font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Price (USD)"))}</label><div class="mt-1.5 flex items-center gap-2"${_scopeId}><span class="text-ink-muted"${_scopeId}>\$</span><input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(form).price)} type="number" min="1" max="9999" step="1" class="w-32 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>`);
							if ((0, vue_exports.unref)(form).errors.price) _push(`<p class="mt-1 text-xs text-red-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(form).errors.price)}</p>`);
							else _push(`<!---->`);
							if (!__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 — your premium listing will be held until checkout is enabled."))}</p>`);
							else _push(`<!---->`);
							_push(`</div>`);
						} else _push(`<!---->`);
						_push(`<div${_scopeId}><label class="block text-sm font-bold"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Your email"))}</label><input${(0, server_renderer_exports.ssrRenderAttr)("value", (0, vue_exports.unref)(form).email)} type="email"${(0, server_renderer_exports.ssrRenderAttr)("placeholder", (0, vue_exports.unref)(t)("you@example.com"))} class="mt-1.5 w-full rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"${_scopeId}>`);
						if ((0, vue_exports.unref)(form).errors.email) _push(`<p class="mt-1 text-xs text-red-500"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(form).errors.email)}</p>`);
						else _push(`<!---->`);
						_push(`<p class="mt-1 text-xs text-ink-muted"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("We'll use this to reach you about your listing and (for premium) payouts."))}</p></div><div class="flex items-center gap-4 border-t border-line pt-5"${_scopeId}><button type="submit"${(0, server_renderer_exports.ssrIncludeBooleanAttr)((0, vue_exports.unref)(form).processing) ? " disabled" : ""} class="rounded-c bg-primary px-6 py-2.5 text-sm font-bold text-white hover:bg-primary-600 disabled:opacity-60"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(form).processing ? (0, vue_exports.unref)(t)("Submitting…") : (0, vue_exports.unref)(t)("Submit for review"))}</button><a href="/docs/extensions.html" class="text-sm font-semibold text-primary hover:underline"${_scopeId}>${(0, server_renderer_exports.ssrInterpolate)((0, vue_exports.unref)(t)("Read the build guide →"))}</a></div></form></section>`);
					} else return [(0, vue_exports.createVNode)("section", { class: "mx-auto max-w-2xl 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)((0, vue_exports.unref)(t)("Submit your extension or theme")), 1),
						(0, vue_exports.createVNode)("p", { class: "mt-3 text-lg text-ink-2" }, [
							(0, vue_exports.createTextVNode)((0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Convoro has a built-in, Packagist-style registry. Link a")) + " ", 1),
							(0, vue_exports.createVNode)("strong", null, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("public GitHub repo")), 1),
							(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("with an")) + " ", 1),
							(0, vue_exports.createVNode)("code", { class: "rounded bg-surface-2 px-1.5 py-0.5 text-sm" }, "extension.json"),
							(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("at its root and a tagged release. We read your manifest, list it in the directory, and one-click installs pull straight from your GitHub releases.")), 1)
						]),
						error.value ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", {
							key: 0,
							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),
						(0, vue_exports.createVNode)("form", {
							class: "mt-8 space-y-6 rounded-2xl border border-line bg-surface p-6",
							onSubmit: (0, vue_exports.withModifiers)(submit, ["prevent"])
						}, [
							(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)("GitHub repository")), 1),
								(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
									"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(form).repo = $event,
									type: "text",
									placeholder: (0, vue_exports.unref)(t)("your-name/your-extension or https://github.com/…"),
									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", "placeholder"]), [[vue_exports.vModelText, (0, vue_exports.unref)(form).repo]]),
								(0, vue_exports.unref)(form).errors.repo ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("p", {
									key: 0,
									class: "mt-1 text-xs text-red-500"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(form).errors.repo), 1)) : (0, vue_exports.createCommentVNode)("", true),
								(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)("Must be public, with")) + " ", 1),
									(0, vue_exports.createVNode)("code", null, "extension.json"),
									(0, vue_exports.createTextVNode)(" " + (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("at the root. We pull the latest release tag.")), 1)
								])
							]),
							(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)("Listing type")), 1), (0, vue_exports.createVNode)("div", { class: "mt-2 grid grid-cols-2 gap-3" }, [(0, vue_exports.createVNode)("button", {
								type: "button",
								onClick: ($event) => (0, vue_exports.unref)(form).pricing = "free",
								class: ["rounded-xl border p-4 text-left transition", (0, vue_exports.unref)(form).pricing === "free" ? "border-primary bg-primary/5" : "border-line hover:bg-surface-2"]
							}, [(0, vue_exports.createVNode)("div", { class: "font-bold" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Free")), 1), (0, vue_exports.createVNode)("div", { class: "text-xs text-ink-muted" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Listed instantly after review. Installs in one click.")), 1)], 10, ["onClick"]), (0, vue_exports.createVNode)("button", {
								type: "button",
								onClick: ($event) => (0, vue_exports.unref)(form).pricing = "premium",
								class: ["rounded-xl border p-4 text-left transition", (0, vue_exports.unref)(form).pricing === "premium" ? "border-primary bg-primary/5" : "border-line hover:bg-surface-2"]
							}, [(0, vue_exports.createVNode)("div", { class: "font-bold" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Premium")), 1), (0, vue_exports.createVNode)("div", { class: "text-xs text-ink-muted" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Sells through the Convoro store with a license key.")), 1)], 10, ["onClick"])])]),
							(0, vue_exports.unref)(form).pricing === "premium" ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("div", { key: 0 }, [
								(0, vue_exports.createVNode)("label", { class: "block text-sm font-bold" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Price (USD)")), 1),
								(0, vue_exports.createVNode)("div", { class: "mt-1.5 flex items-center gap-2" }, [
									(0, vue_exports.createVNode)("span", { class: "text-ink-muted" }, "$"),
									(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
										"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(form).price = $event,
										type: "number",
										min: "1",
										max: "9999",
										step: "1",
										class: "w-32 rounded-lg border-line bg-surface-2 text-sm focus:border-primary focus:ring-primary"
									}, null, 8, ["onUpdate:modelValue"]), [[
										vue_exports.vModelText,
										(0, vue_exports.unref)(form).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.unref)(form).errors.price ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("p", {
									key: 0,
									class: "mt-1 text-xs text-red-500"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(form).errors.price), 1)) : (0, vue_exports.createCommentVNode)("", true),
								!__props.checkoutEnabled ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("p", {
									key: 1,
									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 — your premium listing will be held until checkout is enabled.")), 1)) : (0, vue_exports.createCommentVNode)("", true)
							])) : (0, vue_exports.createCommentVNode)("", true),
							(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)("Your email")), 1),
								(0, vue_exports.withDirectives)((0, vue_exports.createVNode)("input", {
									"onUpdate:modelValue": ($event) => (0, vue_exports.unref)(form).email = $event,
									type: "email",
									placeholder: (0, vue_exports.unref)(t)("you@example.com"),
									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", "placeholder"]), [[vue_exports.vModelText, (0, vue_exports.unref)(form).email]]),
								(0, vue_exports.unref)(form).errors.email ? ((0, vue_exports.openBlock)(), (0, vue_exports.createBlock)("p", {
									key: 0,
									class: "mt-1 text-xs text-red-500"
								}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(form).errors.email), 1)) : (0, vue_exports.createCommentVNode)("", true),
								(0, vue_exports.createVNode)("p", { class: "mt-1 text-xs text-ink-muted" }, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("We'll use this to reach you about your listing and (for premium) payouts.")), 1)
							]),
							(0, vue_exports.createVNode)("div", { class: "flex items-center gap-4 border-t border-line pt-5" }, [(0, vue_exports.createVNode)("button", {
								type: "submit",
								disabled: (0, vue_exports.unref)(form).processing,
								class: "rounded-c bg-primary px-6 py-2.5 text-sm font-bold text-white hover:bg-primary-600 disabled:opacity-60"
							}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(form).processing ? (0, vue_exports.unref)(t)("Submitting…") : (0, vue_exports.unref)(t)("Submit for review")), 9, ["disabled"]), (0, vue_exports.createVNode)("a", {
								href: "/docs/extensions.html",
								class: "text-sm font-semibold text-primary hover:underline"
							}, (0, vue_exports.toDisplayString)((0, vue_exports.unref)(t)("Read the build guide →")), 1)])
						], 32)
					])];
				}),
				_: 1
			}, _parent));
			_push(`<!--]-->`);
		};
	}
});
//#endregion
//#region resources/js/Pages/Store/Submit.vue
var _sfc_setup = Submit_vue_vue_type_script_setup_true_lang_default.setup;
Submit_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/Submit.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
var Submit_default = Submit_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { Submit_default as default };
