Files
service-finder/frontend_admin/.output/server/chunks/build/edit-Db3uK3sd.mjs
2026-07-01 02:27:38 +00:00

256 lines
26 KiB
JavaScript

import { defineComponent, computed, ref, reactive, createVNode, resolveDynamicComponent, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderClass, ssrRenderVNode, ssrRenderAttr, ssrIncludeBooleanAttr, ssrRenderComponent } from 'vue/server-renderer';
import { useRoute, useRouter } from 'vue-router';
import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs';
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
__name: "TreeNode",
__ssrInlineRender: true,
props: {
node: {},
selectedIds: {},
expandedIds: {}
},
emits: ["toggle", "toggle-expand"],
setup(__props) {
return (_ctx, _push, _parent, _attrs) => {
var _a;
const _component_TreeNode = _sfc_main$1;
_push(`<div${ssrRenderAttrs(_attrs)}><div class="flex items-center gap-2 py-1"><button class="text-slate-500 hover:text-slate-300 transition w-4 h-4 flex items-center justify-center"><svg class="${ssrRenderClass([__props.expandedIds.has(__props.node.id) ? "rotate-90" : "", "w-3 h-3 transition-transform"])}" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg></button><label class="flex items-center gap-2 cursor-pointer flex-1"><input type="checkbox"${ssrIncludeBooleanAttr(__props.selectedIds.includes(__props.node.id)) ? " checked" : ""} class="w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50"><span class="text-sm text-slate-300">${ssrInterpolate(__props.node.name_hu || __props.node.name_en || __props.node.key)}</span><span class="text-xs text-slate-500">(Szint ${ssrInterpolate(__props.node.level)})</span></label></div>`);
if (__props.expandedIds.has(__props.node.id) && ((_a = __props.node.children) == null ? void 0 : _a.length)) {
_push(`<div class="ml-6 border-l border-slate-700 pl-3"><!--[-->`);
ssrRenderList(__props.node.children, (child) => {
_push(`<div>`);
_push(ssrRenderComponent(_component_TreeNode, {
node: child,
"selected-ids": __props.selectedIds,
"expanded-ids": __props.expandedIds,
onToggle: (id) => _ctx.$emit("toggle", id),
onToggleExpand: (id) => _ctx.$emit("toggle-expand", id)
}, null, _parent));
_push(`</div>`);
});
_push(`<!--]--></div>`);
} else {
_push(`<!---->`);
}
_push(`</div>`);
};
}
});
const _sfc_setup$1 = _sfc_main$1.setup;
_sfc_main$1.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/TreeNode.vue");
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "edit",
__ssrInlineRender: true,
setup(__props) {
const VEHICLE_CLASSES = [
{ key: "car", label: "Szem\xE9lyaut\xF3" },
{ key: "motorcycle", label: "Motorker\xE9kp\xE1r" },
{ key: "truck", label: "Teheraut\xF3" },
{ key: "hgv", label: "Neh\xE9zg\xE9pj\xE1rm\u0171 (HGV)" },
{ key: "light_commercial", label: "Kishaszonj\xE1rm\u0171" },
{ key: "personal", label: "Szem\xE9lyes" },
{ key: "boat", label: "Cs\xF3nak/V\xEDzi" },
{ key: "other", label: "Egy\xE9b" }
];
const route = useRoute();
useRouter();
computed(() => Number(route.params.id));
const loading = ref(true);
const error = ref(false);
const provider = ref(null);
const saveLoading = ref(false);
const toast = ref(null);
const activeTab = ref("basic");
const tabs = [
{ key: "basic", label: "Alapadatok & Kapcsolat", icon: "svg" },
{ key: "matrix", label: "Szolg\xE1ltat\xE1sok & J\xE1rm\u0171vek", icon: "svg" },
{ key: "location", label: "Helysz\xEDn & Lok\xE1ci\xF3", icon: "svg" }
];
const categoryTree = ref([]);
const treeLoading = ref(false);
const expandedNodes = ref(/* @__PURE__ */ new Set());
const brandInput = ref("");
const propulsionInput = ref("");
const form = reactive({
name: "",
address: "",
city: "",
address_zip: "",
address_street_name: "",
address_street_type: "",
address_house_number: "",
plus_code: "",
contact_phone: "",
contact_email: "",
website: "",
category: "",
category_ids: [],
supported_vehicle_classes: [],
specializations: {
brands: [],
propulsion: []
}
});
const hasChanges = computed(() => {
if (!provider.value) return false;
const p = provider.value;
return form.name !== (p.name || "") || form.city !== (p.city || "") || form.address_zip !== (p.address_zip || "") || form.address_street_name !== (p.address_street_name || "") || form.address_house_number !== (p.address_house_number || "") || form.plus_code !== (p.plus_code || "") || form.contact_phone !== (p.contact_phone || "") || form.contact_email !== (p.contact_email || "") || form.website !== (p.website || "") || form.category !== (p.category || "") || JSON.stringify(form.category_ids.sort()) !== JSON.stringify((p.category_ids || []).sort()) || JSON.stringify(form.supported_vehicle_classes.sort()) !== JSON.stringify((p.supported_vehicle_classes || []).sort()) || JSON.stringify(form.specializations) !== JSON.stringify(p.specializations || { brands: [], propulsion: [] });
});
function findCategoryById(id, nodes) {
var _a;
for (const node of nodes) {
if (node.id === id) return node;
if ((_a = node.children) == null ? void 0 : _a.length) {
const found = findCategoryById(id, node.children);
if (found) return found;
}
}
return null;
}
function getCategoryName(id) {
const node = findCategoryById(id, categoryTree.value);
if (!node) return `#${id}`;
return node.name_hu || node.name_en || node.key;
}
function toggleCategory(id) {
const idx = form.category_ids.indexOf(id);
if (idx >= 0) {
form.category_ids.splice(idx, 1);
} else {
form.category_ids.push(id);
}
}
function toggleTreeNode(id) {
const newSet = new Set(expandedNodes.value);
if (newSet.has(id)) {
newSet.delete(id);
} else {
newSet.add(id);
}
expandedNodes.value = newSet;
}
function isCategorySelected(id) {
return form.category_ids.includes(id);
}
return (_ctx, _push, _parent, _attrs) => {
const _component_TreeNode = _sfc_main$1;
_push(`<div${ssrRenderAttrs(_attrs)} data-v-03c94385><div class="mb-8" data-v-03c94385><button class="inline-flex items-center gap-1.5 text-sm text-slate-400 hover:text-white transition mb-4" data-v-03c94385><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" data-v-03c94385></path></svg> Vissza a szolg\xE1ltat\xF3hoz </button><h1 class="text-2xl font-bold text-white" data-v-03c94385>Szolg\xE1ltat\xF3 szerkeszt\xE9se</h1><p class="text-slate-400 mt-1" data-v-03c94385>Szolg\xE1ltat\xF3 #${ssrInterpolate(_ctx.$route.params.id)}</p></div>`);
if (loading.value) {
_push(`<div class="flex items-center justify-center py-20" data-v-03c94385><div class="text-slate-400 flex items-center gap-3" data-v-03c94385><svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-03c94385></path></svg><span data-v-03c94385>Szolg\xE1ltat\xF3 bet\xF6lt\xE9se...</span></div></div>`);
} else if (error.value) {
_push(`<div class="bg-rose-500/10 border border-rose-500/30 rounded-xl p-6 mb-8" data-v-03c94385><p class="text-rose-400" data-v-03c94385>Hiba t\xF6rt\xE9nt a szolg\xE1ltat\xF3 bet\xF6lt\xE9se k\xF6zben.</p><button class="mt-3 text-sm text-rose-300 hover:text-rose-200 underline" data-v-03c94385>\xDAjrapr\xF3b\xE1lkoz\xE1s</button></div>`);
} else if (!provider.value) {
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-03c94385><p class="text-slate-400 text-center py-12" data-v-03c94385>A szolg\xE1ltat\xF3 nem tal\xE1lhat\xF3.</p></div>`);
} else {
_push(`<!--[--><div class="border-b border-slate-700 mb-6" data-v-03c94385><nav class="flex gap-6 -mb-px" data-v-03c94385><!--[-->`);
ssrRenderList(tabs, (tab) => {
_push(`<button class="${ssrRenderClass([activeTab.value === tab.key ? "text-indigo-400 border-indigo-400" : "text-slate-400 border-transparent hover:text-slate-300", "pb-3 text-sm font-medium border-b-2 transition flex items-center gap-2"])}" data-v-03c94385>`);
ssrRenderVNode(_push, createVNode(resolveDynamicComponent(tab.icon), { class: "w-4 h-4" }, null), _parent);
_push(` ${ssrInterpolate(tab.label)}</button>`);
});
_push(`<!--]--></nav></div>`);
if (activeTab.value === "basic") {
_push(`<div class="max-w-3xl" data-v-03c94385><form data-v-03c94385><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-03c94385><h2 class="text-lg font-semibold text-white mb-4" data-v-03c94385>Alapadatok</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-03c94385><div class="md:col-span-2" data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>N\xE9v *</label><input${ssrRenderAttr("value", form.name)} required class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Kateg\xF3ria</label><input${ssrRenderAttr("value", form.category)} placeholder="pl. Aut\xF3szerviz, Gumiszerviz" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Forr\xE1s</label><div class="w-full px-3 py-2 bg-slate-700/50 border border-slate-600 rounded-lg text-slate-400 text-sm" data-v-03c94385>${ssrInterpolate(provider.value.source)}</div></div></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-03c94385><h2 class="text-lg font-semibold text-white mb-4" data-v-03c94385>El\xE9rhet\u0151s\xE9g</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-03c94385><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Telefon</label><input${ssrRenderAttr("value", form.contact_phone)} placeholder="+36 30 123 4567" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Email</label><input${ssrRenderAttr("value", form.contact_email)} type="email" placeholder="info@example.com" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div class="md:col-span-2" data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Weboldal</label><input${ssrRenderAttr("value", form.website)} placeholder="https://..." class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div></div></div></form></div>`);
} else {
_push(`<!---->`);
}
if (activeTab.value === "matrix") {
_push(`<div class="max-w-4xl" data-v-03c94385><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-03c94385><h2 class="text-lg font-semibold text-white mb-2" data-v-03c94385>3D K\xE9pess\xE9g M\xE1trix</h2><p class="text-sm text-slate-400 mb-6" data-v-03c94385> \xC1ll\xEDtsd be, hogy a szolg\xE1ltat\xF3 milyen j\xE1rm\u0171oszt\xE1lyokhoz, szolg\xE1ltat\xE1si kateg\xF3ri\xE1khoz \xE9s specializ\xE1ci\xF3khoz tartozik. </p><div class="mb-8" data-v-03c94385><h3 class="text-md font-medium text-white mb-3 flex items-center gap-2" data-v-03c94385><span class="w-6 h-6 rounded-full bg-indigo-500/20 text-indigo-400 flex items-center justify-center text-xs font-bold" data-v-03c94385>A</span> J\xE1rm\u0171oszt\xE1lyok (Vehicle Classes) </h3><p class="text-xs text-slate-500 mb-3" data-v-03c94385>Mely j\xE1rm\u0171t\xEDpusokat szervizeli a szolg\xE1ltat\xF3?</p><div class="grid grid-cols-2 md:grid-cols-4 gap-3" data-v-03c94385><!--[-->`);
ssrRenderList(VEHICLE_CLASSES, (vc) => {
_push(`<label class="${ssrRenderClass([form.supported_vehicle_classes.includes(vc.key) ? "bg-indigo-500/10 border-indigo-500/40 text-indigo-300" : "bg-slate-700/50 border-slate-600 hover:border-slate-500 text-slate-300", "flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition"])}" data-v-03c94385><input type="checkbox"${ssrRenderAttr("value", vc.key)}${ssrIncludeBooleanAttr(form.supported_vehicle_classes.includes(vc.key)) ? " checked" : ""} class="w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50" data-v-03c94385><span class="text-sm" data-v-03c94385>${ssrInterpolate(vc.label)}</span></label>`);
});
_push(`<!--]--></div></div><div class="mb-8" data-v-03c94385><h3 class="text-md font-medium text-white mb-3 flex items-center gap-2" data-v-03c94385><span class="w-6 h-6 rounded-full bg-emerald-500/20 text-emerald-400 flex items-center justify-center text-xs font-bold" data-v-03c94385>B</span> Szolg\xE1ltat\xE1si Kateg\xF3ri\xE1k (Expertise Tags) </h3><p class="text-xs text-slate-500 mb-3" data-v-03c94385>V\xE1laszd ki a szolg\xE1ltat\xF3hoz tartoz\xF3 kateg\xF3ri\xE1kat a hierarchikus f\xE1b\xF3l.</p>`);
if (treeLoading.value) {
_push(`<div class="flex items-center gap-2 text-sm text-slate-400 py-4" data-v-03c94385><svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-03c94385></path></svg><span data-v-03c94385>Kateg\xF3ri\xE1k bet\xF6lt\xE9se...</span></div>`);
} else {
_push(`<div class="space-y-1 max-h-96 overflow-y-auto pr-2" data-v-03c94385><!--[-->`);
ssrRenderList(categoryTree.value, (node) => {
var _a;
_push(`<div class="ml-0" data-v-03c94385><div class="flex items-center gap-2 py-1" data-v-03c94385><button class="text-slate-500 hover:text-slate-300 transition w-4 h-4 flex items-center justify-center" data-v-03c94385><svg class="${ssrRenderClass([expandedNodes.value.has(node.id) ? "rotate-90" : "", "w-3 h-3 transition-transform"])}" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" data-v-03c94385></path></svg></button><label class="flex items-center gap-2 cursor-pointer flex-1" data-v-03c94385><input type="checkbox"${ssrIncludeBooleanAttr(isCategorySelected(node.id)) ? " checked" : ""} class="w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50" data-v-03c94385><span class="text-sm font-medium text-white" data-v-03c94385>${ssrInterpolate(node.name_hu || node.name_en || node.key)}</span><span class="text-xs text-slate-500" data-v-03c94385>(Szint ${ssrInterpolate(node.level)})</span></label></div>`);
if (expandedNodes.value.has(node.id) && ((_a = node.children) == null ? void 0 : _a.length)) {
_push(`<div class="ml-6 border-l border-slate-700 pl-3" data-v-03c94385><!--[-->`);
ssrRenderList(node.children, (child) => {
_push(`<div data-v-03c94385>`);
_push(ssrRenderComponent(_component_TreeNode, {
node: child,
"selected-ids": form.category_ids,
"expanded-ids": expandedNodes.value,
onToggle: toggleCategory,
onToggleExpand: toggleTreeNode
}, null, _parent));
_push(`</div>`);
});
_push(`<!--]--></div>`);
} else {
_push(`<!---->`);
}
_push(`</div>`);
});
_push(`<!--]--></div>`);
}
if (form.category_ids.length > 0) {
_push(`<div class="mt-4 flex flex-wrap gap-2" data-v-03c94385><!--[-->`);
ssrRenderList(form.category_ids, (id) => {
_push(`<span class="inline-flex items-center gap-1 px-2 py-1 bg-indigo-500/10 text-indigo-300 rounded-full text-xs" data-v-03c94385>${ssrInterpolate(getCategoryName(id))} <button class="hover:text-white transition" data-v-03c94385><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-03c94385></path></svg></button></span>`);
});
_push(`<!--]--></div>`);
} else {
_push(`<!---->`);
}
_push(`</div><div class="mb-4" data-v-03c94385><h3 class="text-md font-medium text-white mb-3 flex items-center gap-2" data-v-03c94385><span class="w-6 h-6 rounded-full bg-amber-500/20 text-amber-400 flex items-center justify-center text-xs font-bold" data-v-03c94385>C</span> Specializ\xE1ci\xF3k </h3><p class="text-xs text-slate-500 mb-3" data-v-03c94385>Adj meg speci\xE1lis m\xE1rk\xE1kat, hajt\xE1sl\xE1nc t\xEDpusokat vagy egy\xE9b c\xEDmk\xE9ket.</p><div class="grid grid-cols-1 md:grid-cols-2 gap-6" data-v-03c94385><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>M\xE1rk\xE1k (Brands)</label><div class="flex flex-wrap gap-2 mb-2" data-v-03c94385><!--[-->`);
ssrRenderList(form.specializations.brands, (brand, idx) => {
_push(`<span class="inline-flex items-center gap-1 px-2 py-1 bg-amber-500/10 text-amber-300 rounded-full text-xs" data-v-03c94385>${ssrInterpolate(brand)} <button class="hover:text-white transition" data-v-03c94385><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-03c94385></path></svg></button></span>`);
});
_push(`<!--]--></div><div class="flex gap-2" data-v-03c94385><input${ssrRenderAttr("value", brandInput.value)} placeholder="pl. Volvo, Scania" class="flex-1 px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385><button${ssrIncludeBooleanAttr(!brandInput.value.trim()) ? " disabled" : ""} class="px-3 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white rounded-lg text-sm transition" data-v-03c94385> Hozz\xE1ad </button></div></div><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Hajt\xE1sl\xE1nc (Propulsion)</label><div class="flex flex-wrap gap-2 mb-2" data-v-03c94385><!--[-->`);
ssrRenderList(form.specializations.propulsion, (prop, idx) => {
_push(`<span class="inline-flex items-center gap-1 px-2 py-1 bg-emerald-500/10 text-emerald-300 rounded-full text-xs" data-v-03c94385>${ssrInterpolate(prop)} <button class="hover:text-white transition" data-v-03c94385><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-03c94385></path></svg></button></span>`);
});
_push(`<!--]--></div><div class="flex gap-2" data-v-03c94385><input${ssrRenderAttr("value", propulsionInput.value)} placeholder="pl. EV, Hybrid, Diesel" class="flex-1 px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385><button${ssrIncludeBooleanAttr(!propulsionInput.value.trim()) ? " disabled" : ""} class="px-3 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white rounded-lg text-sm transition" data-v-03c94385> Hozz\xE1ad </button></div></div></div></div></div></div>`);
} else {
_push(`<!---->`);
}
if (activeTab.value === "location") {
_push(`<div class="max-w-3xl" data-v-03c94385><form data-v-03c94385><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-03c94385><h2 class="text-lg font-semibold text-white mb-4" data-v-03c94385>C\xEDm adatok</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-03c94385><div class="md:col-span-2" data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Teljes c\xEDm</label><input${ssrRenderAttr("value", form.address)} placeholder="Teljes c\xEDm sz\xF6vege" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>V\xE1ros</label><input${ssrRenderAttr("value", form.city)} placeholder="Budapest" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Ir\xE1ny\xEDt\xF3sz\xE1m</label><input${ssrRenderAttr("value", form.address_zip)} placeholder="1011" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Utca</label><input${ssrRenderAttr("value", form.address_street_name)} placeholder="Egressy" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>H\xE1zsz\xE1m</label><input${ssrRenderAttr("value", form.address_house_number)} placeholder="4/b" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div><div class="md:col-span-2" data-v-03c94385><label class="block text-sm font-medium text-slate-300 mb-1" data-v-03c94385>Plus Code</label><input${ssrRenderAttr("value", form.plus_code)} placeholder="8FVC9X8V+XV" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-03c94385></div></div></div></form></div>`);
} else {
_push(`<!---->`);
}
_push(`<div class="sticky bottom-0 bg-slate-900/90 backdrop-blur-sm border-t border-slate-700 -mx-6 px-6 py-4 mt-8" data-v-03c94385><div class="flex items-center justify-between max-w-4xl" data-v-03c94385><div class="text-sm text-slate-400" data-v-03c94385>`);
if (hasChanges.value) {
_push(`<span class="text-amber-400" data-v-03c94385>\u25CF M\xF3dos\xEDt\xE1sok el nem mentve</span>`);
} else {
_push(`<span class="text-slate-500" data-v-03c94385>Nincs v\xE1ltoz\xE1s</span>`);
}
_push(`</div><div class="flex gap-3" data-v-03c94385><button class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-03c94385> M\xE9gse </button><button${ssrIncludeBooleanAttr(saveLoading.value || !hasChanges.value) ? " disabled" : ""} class="px-6 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white rounded-lg text-sm font-medium transition flex items-center gap-2" data-v-03c94385>`);
if (saveLoading.value) {
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-03c94385></path></svg>`);
} else {
_push(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-03c94385><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-03c94385></path></svg>`);
}
_push(` Ment\xE9s </button></div></div></div><!--]-->`);
}
if (toast.value) {
_push(`<div class="${ssrRenderClass([toast.value.type === "success" ? "bg-emerald-600 text-white" : "bg-rose-600 text-white", "fixed top-4 right-4 z-50 px-4 py-3 rounded-lg shadow-xl text-sm font-medium transition-all duration-300"])}" data-v-03c94385>${ssrInterpolate(toast.value.message)}</div>`);
} else {
_push(`<!---->`);
}
_push(`</div>`);
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/providers/[id]/edit.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const edit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-03c94385"]]);
export { edit as default };
//# sourceMappingURL=edit-Db3uK3sd.mjs.map