import { t as useAuth } from "./useAuth-CmhDlqZz.js";
import { t as Modal_default } from "./Modal-DV_58cLt.js";
import { Head, useForm, usePage } from "@inertiajs/vue3";
import { computed, createVNode, defineComponent, mergeProps, ref, unref, useSSRContext, withCtx } from "vue";
import { ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrRenderAttr, ssrRenderAttrs, ssrRenderComponent, ssrRenderDynamicModel, ssrRenderList } from "vue/server-renderer";
import { AlertCircle, Cpu, Database, Eye, EyeOff, Lock, Mail, ShieldCheck, Zap } from "lucide-vue-next";
//#region resources/js/Pages/Auth/Login.vue?vue&type=script&setup=true&lang.ts
var Login_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
	__name: "Login",
	__ssrInlineRender: true,
	props: {
		canResetPassword: { type: Boolean },
		status: {}
	},
	setup(__props) {
		const { settings } = useAuth();
		const form = useForm({
			email: "",
			password: "",
			remember: false
		});
		const showPassword = ref(false);
		const isForgotPasswordModalOpen = ref(false);
		const page = usePage();
		const isDemoMode = computed(() => page.props.is_demo_mode);
		return (_ctx, _push, _parent, _attrs) => {
			_push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-screen w-full flex bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 font-sans antialiased overflow-hidden" }, _attrs))}>`);
			_push(ssrRenderComponent(unref(Head), { title: "Welcome Back - Sign In" }, null, _parent));
			_push(`<div class="hidden lg:flex lg:w-1/2 relative flex-col justify-between p-12 bg-gradient-to-br from-[#3a2215] via-[#543220] to-[#8c5a3c] dark:from-[#1b0d06] dark:via-[#2b160b] dark:to-[#3e2011] border-r border-slate-200/10 dark:border-slate-800/20 overflow-hidden"><div class="absolute inset-0 bg-[linear-gradient(to_right,rgba(255,255,255,0.08)_1px,transparent_1px),linear-gradient(to_bottom,rgba(255,255,255,0.08)_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_50%,#000_70%,transparent_100%)] opacity-70"></div><div class="relative z-10 flex items-center gap-3">`);
			if (unref(settings)().site_logo) _push(`<div class="h-11 w-11 rounded-lg bg-white/10 border-white/20 border p-1.5 flex items-center justify-center flex-shrink-0 shadow-sm"><img${ssrRenderAttr("src", unref(settings)().site_logo ?? void 0)} alt="Logo" class="max-h-full max-w-full object-contain"></div>`);
			else _push(`<div class="h-12 w-12 rounded-lg bg-white/10 border-white/20 border flex items-center justify-center flex-shrink-0 text-red-600 font-bold text-lg shadow-sm"><span>${ssrInterpolate(unref(settings)().site_name?.charAt(0) ?? "L")}</span></div>`);
			_push(`<span class="font-extrabold text-lg tracking-wider text-white uppercase leading-none">${ssrInterpolate(unref(settings)().site_name)}</span></div><div class="relative z-10 space-y-8 my-auto"><div class="space-y-4 max-w-lg"><div class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold bg-white/10 text-white/90 border border-white/20">`);
			_push(ssrRenderComponent(unref(Zap), { class: "h-3.5 w-3.5 text-red-300" }, null, _parent));
			_push(`<span>Sistem POS Coffee Shop</span></div><h1 class="text-4xl font-extrabold tracking-tight text-white leading-[1.15]"> Kelola Penjualan &amp; Stok Outlet dengan <span class="text-red-200">Mudah.</span></h1><p class="text-red-100/70 text-sm leading-relaxed"> Sistem POS modern berbasis web yang terintegrasi dengan manajemen inventaris otomatis resep (BOM) secara real-time untuk UMKM kopi. </p></div><div class="grid grid-cols-2 gap-x-8 gap-y-4 max-w-md"><div class="flex items-center gap-3"><div class="h-8 w-8 rounded-lg bg-white/5 border border-white/10 flex items-center justify-center text-red-200">`);
			_push(ssrRenderComponent(unref(ShieldCheck), { class: "h-4.5 w-4.5" }, null, _parent));
			_push(`</div><span class="text-xs font-medium text-white/80">Real-time BOM Stock</span></div><div class="flex items-center gap-3"><div class="h-8 w-8 rounded-lg bg-white/5 border border-white/10 flex items-center justify-center text-red-200">`);
			_push(ssrRenderComponent(unref(Zap), { class: "h-4.5 w-4.5" }, null, _parent));
			_push(`</div><span class="text-xs font-medium text-white/80">Multi-Outlet Control</span></div><div class="flex items-center gap-3"><div class="h-8 w-8 rounded-lg bg-white/5 border border-white/10 flex items-center justify-center text-red-200">`);
			_push(ssrRenderComponent(unref(Cpu), { class: "h-4.5 w-4.5" }, null, _parent));
			_push(`</div><span class="text-xs font-medium text-white/80">Taxes &amp; Service Settings</span></div><div class="flex items-center gap-3"><div class="h-8 w-8 rounded-lg bg-white/5 border border-white/10 flex items-center justify-center text-red-200">`);
			_push(ssrRenderComponent(unref(Database), { class: "h-4.5 w-4.5" }, null, _parent));
			_push(`</div><span class="text-xs font-medium text-white/80">Consolidated Reports &amp; Voids</span></div></div></div><div class="relative z-10 text-xs text-white/40"><span>© 2026 CafePOS. All rights reserved.</span></div></div><div class="w-full lg:w-1/2 flex items-center justify-center p-6 sm:p-12 relative"><div class="absolute top-6 left-6 lg:hidden flex items-center gap-2.5">`);
			if (unref(settings)().site_logo) _push(`<div class="h-8 w-8 rounded-lg bg-white p-1 flex items-center justify-center flex-shrink-0 shadow-sm"><img${ssrRenderAttr("src", unref(settings)().site_logo ?? void 0)} alt="Logo" class="max-h-full max-w-full object-contain"></div>`);
			else _push(`<div class="h-8 w-8 rounded-lg bg-white flex items-center justify-center flex-shrink-0 text-red-600 font-bold text-md shadow-sm"><span>${ssrInterpolate(unref(settings)().site_name?.charAt(0) ?? "L")}</span></div>`);
			_push(`<span class="font-extrabold text-sm tracking-wider uppercase text-slate-900 dark:text-white leading-none">${ssrInterpolate(unref(settings)().site_name)}</span></div><div class="w-full max-w-md bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800/80 rounded-2xl p-8 shadow-xl shadow-slate-100/50 dark:shadow-none space-y-6"><div class="space-y-1"><h2 class="text-2xl font-bold tracking-tight text-slate-900 dark:text-white">Welcome Back</h2><p class="text-xs text-slate-500 dark:text-slate-400">Enter your credentials to access your dashboard</p></div>`);
			if (__props.status) _push(`<div class="p-3 bg-emerald-50 dark:bg-emerald-950/20 border border-emerald-200 dark:border-emerald-900/40 rounded-lg text-xs font-medium text-emerald-600 dark:text-emerald-400">${ssrInterpolate(__props.status)}</div>`);
			else _push(`<!---->`);
			_push(`<form class="space-y-4"><div class="space-y-1.5"><label for="email" class="text-xs font-semibold text-slate-700 dark:text-slate-300">Email Address</label><div class="relative flex items-center"><span class="absolute left-3.5 text-slate-400 dark:text-slate-600">`);
			_push(ssrRenderComponent(unref(Mail), { class: "h-4.5 w-4.5" }, null, _parent));
			_push(`</span><input id="email"${ssrRenderAttr("value", unref(form).email)} type="email" required autofocus autocomplete="username" class="w-full pl-12 pr-3.5 py-2.5 rounded-lg border border-slate-200 dark:border-slate-800 bg-transparent text-sm text-slate-900 dark:text-slate-100 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-red-500/20 focus:border-red-500 transition-all" placeholder="name@example.com"></div>`);
			if (unref(form).errors.email) {
				_push(`<p class="text-[11px] text-rose-600 flex items-center gap-1 mt-1 font-medium">`);
				_push(ssrRenderComponent(unref(AlertCircle), { class: "h-3.5 w-3.5" }, null, _parent));
				_push(` ${ssrInterpolate(unref(form).errors.email)}</p>`);
			} else _push(`<!---->`);
			_push(`</div><div class="space-y-1.5 relative"><label for="password" class="text-xs font-semibold text-slate-700 dark:text-slate-300">Password</label><div class="relative flex items-center"><span class="absolute left-3.5 text-slate-400 dark:text-slate-600">`);
			_push(ssrRenderComponent(unref(Lock), { class: "h-4.5 w-4.5" }, null, _parent));
			_push(`</span><input id="password"${ssrRenderDynamicModel(showPassword.value ? "text" : "password", unref(form).password, null)}${ssrRenderAttr("type", showPassword.value ? "text" : "password")} required autocomplete="current-password" class="w-full pl-12 pr-10 py-2.5 rounded-lg border border-slate-200 dark:border-slate-800 bg-transparent text-sm text-slate-900 dark:text-slate-100 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-red-500/20 focus:border-red-500 transition-all" placeholder="Password"><button type="button" tabindex="-1" class="absolute right-3.5 text-slate-400 dark:text-slate-600 hover:text-slate-600 dark:hover:text-slate-400 cursor-pointer focus:outline-none">`);
			if (showPassword.value) _push(ssrRenderComponent(unref(EyeOff), { class: "h-4.5 w-4.5" }, null, _parent));
			else _push(ssrRenderComponent(unref(Eye), { class: "h-4.5 w-4.5" }, null, _parent));
			_push(`</button></div>`);
			if (__props.canResetPassword) _push(`<button type="button" class="absolute top-0 right-0 text-xs font-medium text-red-600 dark:text-red-400 hover:underline focus:outline-none bg-transparent border-0 cursor-pointer"> Forgot password? </button>`);
			else _push(`<!---->`);
			if (unref(form).errors.password) {
				_push(`<p class="text-[11px] text-rose-600 flex items-center gap-1 mt-1 font-medium">`);
				_push(ssrRenderComponent(unref(AlertCircle), { class: "h-3.5 w-3.5" }, null, _parent));
				_push(` ${ssrInterpolate(unref(form).errors.password)}</p>`);
			} else _push(`<!---->`);
			_push(`</div><div class="flex items-center"><input id="remember"${ssrIncludeBooleanAttr(Array.isArray(unref(form).remember) ? ssrLooseContain(unref(form).remember, null) : unref(form).remember) ? " checked" : ""} type="checkbox" class="h-4 w-4 rounded border-slate-300 dark:border-slate-800 text-red-600 focus:ring-red-500 focus:ring-offset-0 bg-transparent"><label for="remember" class="ml-2 text-xs text-slate-500 dark:text-slate-400 font-medium select-none cursor-pointer"> Remember me </label></div><button type="submit"${ssrIncludeBooleanAttr(unref(form).processing) ? " disabled" : ""} class="w-full py-2.5 bg-[#8c5a3c] hover:bg-[#734a31] text-white font-bold rounded-lg text-sm transition-all focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 disabled:opacity-50 cursor-pointer flex items-center justify-center shadow-md shadow-[#8c5a3c]/10 hover:shadow-[#8c5a3c]/25"><span>${ssrInterpolate(unref(form).processing ? "Signing In..." : "Sign In")}</span></button></form>`);
			if (isDemoMode.value) {
				_push(`<div class="rounded-xl border border-[#8c5a3c]/20 bg-[#8c5a3c]/5 p-4 space-y-3"><p class="text-xs font-bold text-[#8c5a3c] dark:text-[#a06d4e] flex items-center gap-1.5">`);
				_push(ssrRenderComponent(unref(ShieldCheck), { class: "h-3.5 w-3.5 shrink-0" }, null, _parent));
				_push(` Akun Demo — Klik untuk mengisi otomatis: </p><div class="grid grid-cols-2 gap-2"><!--[-->`);
				ssrRenderList([
					{
						role: "Super Admin",
						email: "superadmin@example.com",
						password: "password"
					},
					{
						role: "Admin",
						email: "admin@example.com",
						password: "password"
					},
					{
						role: "Owner",
						email: "owner@example.com",
						password: "password"
					},
					{
						role: "Kasir Kemang",
						email: "cashier@example.com",
						password: "password"
					},
					{
						role: "Kitchen Kemang",
						email: "kitchen@example.com",
						password: "password"
					}
				], (account) => {
					_push(`<div class="bg-white dark:bg-slate-900 border border-[#8c5a3c]/10 dark:border-slate-800 rounded-lg px-2.5 py-1.5 cursor-pointer hover:border-[#8c5a3c] dark:hover:border-[#8c5a3c] transition-colors group flex flex-col justify-between"><div><p class="text-[10px] font-bold text-slate-700 dark:text-slate-200 leading-tight font-sans">${ssrInterpolate(account.role)}</p><p class="text-[9px] text-slate-400 font-mono mt-0.5 truncate">${ssrInterpolate(account.email)}</p></div><span class="text-[9px] font-mono font-semibold text-[#8c5a3c] dark:text-[#a06d4e] bg-[#8c5a3c]/5 dark:bg-slate-800 px-1.5 py-0.5 rounded border border-[#8c5a3c]/10 dark:border-slate-800 mt-1 self-start"> Pass: ${ssrInterpolate(account.password)}</span></div>`);
				});
				_push(`<!--]--></div></div>`);
			} else _push(`<!---->`);
			_push(`<p class="text-[10px] text-center text-slate-400 dark:text-slate-600 leading-normal"> By signing in, you agree to our <a href="#" class="hover:underline font-semibold">Terms of Service</a> and <a href="#" class="hover:underline font-semibold">Privacy Policy</a>. </p></div></div>`);
			_push(ssrRenderComponent(Modal_default, {
				show: isForgotPasswordModalOpen.value,
				onClose: ($event) => isForgotPasswordModalOpen.value = false,
				"max-width": "sm"
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div class="p-6 space-y-4"${_scopeId}><div class="flex items-center gap-2.5 text-red-600 dark:text-red-400"${_scopeId}>`);
						_push(ssrRenderComponent(unref(AlertCircle), { class: "h-5 w-5 flex-shrink-0" }, null, _parent, _scopeId));
						_push(`<h4 class="text-base font-bold"${_scopeId}>Lupa Kata Sandi?</h4></div><p class="text-xs text-slate-600 dark:text-slate-400 leading-relaxed font-bold"${_scopeId}> Silakan hubungi administrator outlet Anda untuk menyetel ulang kata sandi Anda. </p><div class="flex items-center justify-end"${_scopeId}><button class="px-4 py-1.5 bg-red-600 hover:bg-red-500 text-white rounded-lg text-xs font-semibold transition-all cursor-pointer border-0"${_scopeId}> Tutup </button></div></div>`);
					} else return [createVNode("div", { class: "p-6 space-y-4" }, [
						createVNode("div", { class: "flex items-center gap-2.5 text-red-600 dark:text-red-400" }, [createVNode(unref(AlertCircle), { class: "h-5 w-5 flex-shrink-0" }), createVNode("h4", { class: "text-base font-bold" }, "Lupa Kata Sandi?")]),
						createVNode("p", { class: "text-xs text-slate-600 dark:text-slate-400 leading-relaxed font-bold" }, " Silakan hubungi administrator outlet Anda untuk menyetel ulang kata sandi Anda. "),
						createVNode("div", { class: "flex items-center justify-end" }, [createVNode("button", {
							onClick: ($event) => isForgotPasswordModalOpen.value = false,
							class: "px-4 py-1.5 bg-red-600 hover:bg-red-500 text-white rounded-lg text-xs font-semibold transition-all cursor-pointer border-0"
						}, " Tutup ", 8, ["onClick"])])
					])];
				}),
				_: 1
			}, _parent));
			_push(`</div>`);
		};
	}
});
//#endregion
//#region resources/js/Pages/Auth/Login.vue
var _sfc_setup = Login_vue_vue_type_script_setup_true_lang_default.setup;
Login_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
	const ssrContext = useSSRContext();
	(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/Pages/Auth/Login.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
var Login_default = Login_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { Login_default as default };
