Files
service-finder/frontend_admin/.nuxt/dist/client/_nuxt/BalY_-5C.js
2026-07-01 02:27:38 +00:00

2 lines
24 KiB
JavaScript

import{e as X,o as n,c as i,a as t,k as S,t as p,F as x,r as v,b as q,j as y,g as re,d as b,P as ae,y as d,z as u,x as T,N as R,l as m,J as de,m as G,h as ue,D as ce,K as pe,L as me,M as ge}from"./Duy9QquX.js";import{_ as be}from"./DlAUqK2U.js";const xe={class:"flex items-center gap-2 py-1"},fe={class:"flex items-center gap-2 cursor-pointer flex-1"},ve=["checked"],he={class:"text-sm text-slate-300"},ye={class:"text-xs text-slate-500"},ke={key:0,class:"ml-6 border-l border-slate-700 pl-3"},W=X({__name:"TreeNode",props:{node:{},selectedIds:{},expandedIds:{}},emits:["toggle","toggle-expand"],setup(r){return(k,c)=>{const M=W;return n(),i("div",null,[t("div",xe,[t("button",{onClick:c[0]||(c[0]=g=>k.$emit("toggle-expand",r.node.id)),class:"text-slate-500 hover:text-slate-300 transition w-4 h-4 flex items-center justify-center"},[(n(),i("svg",{class:S(["w-3 h-3 transition-transform",r.expandedIds.has(r.node.id)?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...c[4]||(c[4]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2))]),t("label",fe,[t("input",{type:"checkbox",checked:r.selectedIds.includes(r.node.id),onChange:c[1]||(c[1]=g=>k.$emit("toggle",r.node.id)),class:"w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50"},null,40,ve),t("span",he,p(r.node.name_hu||r.node.name_en||r.node.key),1),t("span",ye,"(Szint "+p(r.node.level)+")",1)])]),r.expandedIds.has(r.node.id)&&r.node.children?.length?(n(),i("div",ke,[(n(!0),i(x,null,v(r.node.children,g=>(n(),i("div",{key:g.id},[q(M,{node:g,"selected-ids":r.selectedIds,"expanded-ids":r.expandedIds,onToggle:c[2]||(c[2]=h=>k.$emit("toggle",h)),onToggleExpand:c[3]||(c[3]=h=>k.$emit("toggle-expand",h))},null,8,["node","selected-ids","expanded-ids"])]))),128))])):y("",!0)])}}}),_e={class:"mb-8"},we={class:"text-slate-400 mt-1"},ze={key:0,class:"flex items-center justify-center py-20"},Ce={key:1,class:"bg-rose-500/10 border border-rose-500/30 rounded-xl p-6 mb-8"},$e={key:2,class:"bg-slate-800 rounded-xl border border-slate-700 p-6"},Ve={class:"border-b border-slate-700 mb-6"},je={class:"flex gap-6 -mb-px"},Se=["onClick"],Me={key:0,class:"max-w-3xl"},Te={class:"bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6"},Be={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Ne={class:"md:col-span-2"},He={class:"w-full px-3 py-2 bg-slate-700/50 border border-slate-600 rounded-lg text-slate-400 text-sm"},Ae={class:"bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6"},Ie={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Ue={class:"md:col-span-2"},Ee={key:1,class:"max-w-4xl"},Ke={class:"bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6"},Le={class:"mb-8"},Fe={class:"grid grid-cols-2 md:grid-cols-4 gap-3"},Je=["value","checked","onChange"],Oe={class:"text-sm"},Pe={class:"mb-8"},De={key:0,class:"flex items-center gap-2 text-sm text-slate-400 py-4"},Re={key:1,class:"space-y-1 max-h-96 overflow-y-auto pr-2"},Ge={class:"flex items-center gap-2 py-1"},Xe=["onClick"],qe={class:"flex items-center gap-2 cursor-pointer flex-1"},We=["checked","onChange"],Qe={class:"text-sm font-medium text-white"},Ye={class:"text-xs text-slate-500"},Ze={key:0,class:"ml-6 border-l border-slate-700 pl-3"},et={key:2,class:"mt-4 flex flex-wrap gap-2"},tt=["onClick"],st={class:"mb-4"},ot={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},lt={class:"flex flex-wrap gap-2 mb-2"},nt=["onClick"],it={class:"flex gap-2"},rt=["onKeydown"],at=["disabled"],dt={class:"flex flex-wrap gap-2 mb-2"},ut=["onClick"],ct={class:"flex gap-2"},pt=["onKeydown"],mt=["disabled"],gt={key:2,class:"max-w-3xl"},bt={class:"bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6"},xt={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},ft={class:"md:col-span-2"},vt={class:"md:col-span-2"},ht={class:"sticky bottom-0 bg-slate-900/90 backdrop-blur-sm border-t border-slate-700 -mx-6 px-6 py-4 mt-8"},yt={class:"flex items-center justify-between max-w-4xl"},kt={class:"text-sm text-slate-400"},_t={key:0,class:"text-amber-400"},wt={key:1,class:"text-slate-500"},zt={class:"flex gap-3"},Ct=["disabled"],$t={key:0,class:"w-4 h-4 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Vt={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},jt=X({__name:"edit",setup(r){const k=[{key:"car",label:"Személyautó"},{key:"motorcycle",label:"Motorkerékpár"},{key:"truck",label:"Teherautó"},{key:"hgv",label:"Nehézgépjármű (HGV)"},{key:"light_commercial",label:"Kishaszonjármű"},{key:"personal",label:"Személyes"},{key:"boat",label:"Csónak/Vízi"},{key:"other",label:"Egyéb"}],c=pe(),M=ce(),g=G(()=>Number(c.params.id)),h=m(!0),B=m(!1),_=m(null),w=m(!1),z=m(null),C=m("basic"),Q=[{key:"basic",label:"Alapadatok & Kapcsolat",icon:"svg"},{key:"matrix",label:"Szolgáltatások & Járművek",icon:"svg"},{key:"location",label:"Helyszín & Lokáció",icon:"svg"}],N=m([]),H=m(!1),$=m(new Set),V=m(""),j=m(""),s=de({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:[]}}),U=G(()=>{if(!_.value)return!1;const o=_.value;return s.name!==(o.name||"")||s.city!==(o.city||"")||s.address_zip!==(o.address_zip||"")||s.address_street_name!==(o.address_street_name||"")||s.address_house_number!==(o.address_house_number||"")||s.plus_code!==(o.plus_code||"")||s.contact_phone!==(o.contact_phone||"")||s.contact_email!==(o.contact_email||"")||s.website!==(o.website||"")||s.category!==(o.category||"")||JSON.stringify(s.category_ids.sort())!==JSON.stringify((o.category_ids||[]).sort())||JSON.stringify(s.supported_vehicle_classes.sort())!==JSON.stringify((o.supported_vehicle_classes||[]).sort())||JSON.stringify(s.specializations)!==JSON.stringify(o.specializations||{brands:[],propulsion:[]})});function A(){const o=ue("access_token").value,e={"Content-Type":"application/json"};return o&&(e.Authorization=`Bearer ${o}`),e}async function E(){h.value=!0,B.value=!1;try{const o=await $fetch(`/api/v1/admin/providers/${g.value}`,{headers:A()});_.value=o,Y(o)}catch(o){console.error("Failed to fetch provider:",o),B.value=!0}finally{h.value=!1}}function Y(o){s.name=o.name||"",s.address=o.address||"",s.city=o.city||"",s.address_zip=o.address_zip||"",s.address_street_name=o.address_street_name||"",s.address_street_type=o.address_street_type||"",s.address_house_number=o.address_house_number||"",s.plus_code=o.plus_code||"",s.contact_phone=o.contact_phone||"",s.contact_email=o.contact_email||"",s.website=o.website||"",s.category=o.category||"",s.category_ids=o.category_ids||[],s.supported_vehicle_classes=o.supported_vehicle_classes||[];const e=o.specializations||{};s.specializations={brands:Array.isArray(e.brands)?e.brands:[],propulsion:Array.isArray(e.propulsion)?e.propulsion:[]}}async function Z(){H.value=!0;try{const o=await $fetch("/api/v1/providers/categories/tree",{headers:A()});N.value=o||[]}catch(o){console.error("Failed to fetch category tree:",o)}finally{H.value=!1}}function K(o,e){for(const f of e){if(f.id===o)return f;if(f.children?.length){const l=K(o,f.children);if(l)return l}}return null}function ee(o){const e=K(o,N.value);return e?e.name_hu||e.name_en||e.key:`#${o}`}function te(o){const e=s.supported_vehicle_classes.indexOf(o);e>=0?s.supported_vehicle_classes.splice(e,1):s.supported_vehicle_classes.push(o)}function L(o){const e=s.category_ids.indexOf(o);e>=0?s.category_ids.splice(e,1):s.category_ids.push(o)}function F(o){const e=new Set($.value);e.has(o)?e.delete(o):e.add(o),$.value=e}function se(o){return s.category_ids.includes(o)}function oe(o){const e=s.category_ids.indexOf(o);e>=0&&s.category_ids.splice(e,1)}function J(){const o=V.value.trim();o&&!s.specializations.brands.includes(o)&&s.specializations.brands.push(o),V.value=""}function le(o){s.specializations.brands.splice(o,1)}function O(){const o=j.value.trim();o&&!s.specializations.propulsion.includes(o)&&s.specializations.propulsion.push(o),j.value=""}function ne(o){s.specializations.propulsion.splice(o,1)}async function I(){if(w.value)return;w.value=!0;const o={name:s.name,category:s.category||null,contact_phone:s.contact_phone||null,contact_email:s.contact_email||null,website:s.website||null,city:s.city||null,address_zip:s.address_zip||null,address_street_name:s.address_street_name||null,address_street_type:s.address_street_type||null,address_house_number:s.address_house_number||null,plus_code:s.plus_code||null,category_ids:s.category_ids,supported_vehicle_classes:s.supported_vehicle_classes,specializations:s.specializations};try{await $fetch(`/api/v1/admin/providers/${g.value}`,{method:"PATCH",headers:A(),body:o}),D("success","Szolgáltató sikeresen frissítve!"),setTimeout(()=>{M.push(`/providers/${g.value}`)},1200)}catch(e){console.error("Failed to save provider:",e);const f=e?.data?.detail||e?.message||"Ismeretlen hiba történt mentés közben.";D("error",`Hiba: ${f}`)}finally{w.value=!1}}function P(){M.push(`/providers/${g.value}`)}function D(o,e){z.value={type:o,message:e},setTimeout(()=>{z.value=null},3e3)}return re(async()=>{await E(),await Z()}),(o,e)=>{const f=W;return n(),i("div",null,[t("div",_e,[t("button",{onClick:P,class:"inline-flex items-center gap-1.5 text-sm text-slate-400 hover:text-white transition mb-4"},[...e[13]||(e[13]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1),b(" Vissza a szolgáltatóhoz ",-1)])]),e[14]||(e[14]=t("h1",{class:"text-2xl font-bold text-white"},"Szolgáltató szerkesztése",-1)),t("p",we,"Szolgáltató #"+p((o._.provides[ae]||o.$route).params.id),1)]),h.value?(n(),i("div",ze,[...e[15]||(e[15]=[t("div",{class:"text-slate-400 flex items-center gap-3"},[t("svg",{class:"w-5 h-5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("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"})]),t("span",null,"Szolgáltató betöltése...")],-1)])])):B.value?(n(),i("div",Ce,[e[16]||(e[16]=t("p",{class:"text-rose-400"},"Hiba történt a szolgáltató betöltése közben.",-1)),t("button",{onClick:E,class:"mt-3 text-sm text-rose-300 hover:text-rose-200 underline"},"Újrapróbálkozás")])):_.value?(n(),i(x,{key:3},[t("div",Ve,[t("nav",je,[(n(),i(x,null,v(Q,l=>t("button",{key:l.key,onClick:a=>C.value=l.key,class:S(["pb-3 text-sm font-medium border-b-2 transition flex items-center gap-2",C.value===l.key?"text-indigo-400 border-indigo-400":"text-slate-400 border-transparent hover:text-slate-300"])},[(n(),me(ge(l.icon),{class:"w-4 h-4"})),b(" "+p(l.label),1)],10,Se)),64))])]),C.value==="basic"?(n(),i("div",Me,[t("form",{onSubmit:T(I,["prevent"])},[t("div",Te,[e[21]||(e[21]=t("h2",{class:"text-lg font-semibold text-white mb-4"},"Alapadatok",-1)),t("div",Be,[t("div",Ne,[e[18]||(e[18]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Név *",-1)),d(t("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>s.name=l),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"},null,512),[[u,s.name]])]),t("div",null,[e[19]||(e[19]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Kategória",-1)),d(t("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>s.category=l),placeholder:"pl. Autószerviz, 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"},null,512),[[u,s.category]])]),t("div",null,[e[20]||(e[20]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Forrás",-1)),t("div",He,p(_.value.source),1)])])]),t("div",Ae,[e[25]||(e[25]=t("h2",{class:"text-lg font-semibold text-white mb-4"},"Elérhetőség",-1)),t("div",Ie,[t("div",null,[e[22]||(e[22]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Telefon",-1)),d(t("input",{"onUpdate:modelValue":e[2]||(e[2]=l=>s.contact_phone=l),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"},null,512),[[u,s.contact_phone]])]),t("div",null,[e[23]||(e[23]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Email",-1)),d(t("input",{"onUpdate:modelValue":e[3]||(e[3]=l=>s.contact_email=l),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"},null,512),[[u,s.contact_email]])]),t("div",Ue,[e[24]||(e[24]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Weboldal",-1)),d(t("input",{"onUpdate:modelValue":e[4]||(e[4]=l=>s.website=l),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"},null,512),[[u,s.website]])])])])],32)])):y("",!0),C.value==="matrix"?(n(),i("div",Ee,[t("div",Ke,[e[39]||(e[39]=t("h2",{class:"text-lg font-semibold text-white mb-2"},"3D Képesség Mátrix",-1)),e[40]||(e[40]=t("p",{class:"text-sm text-slate-400 mb-6"}," Állítsd be, hogy a szolgáltató milyen járműosztályokhoz, szolgáltatási kategóriákhoz és specializációkhoz tartozik. ",-1)),t("div",Le,[e[26]||(e[26]=t("h3",{class:"text-md font-medium text-white mb-3 flex items-center gap-2"},[t("span",{class:"w-6 h-6 rounded-full bg-indigo-500/20 text-indigo-400 flex items-center justify-center text-xs font-bold"},"A"),b(" Járműosztályok (Vehicle Classes) ")],-1)),e[27]||(e[27]=t("p",{class:"text-xs text-slate-500 mb-3"},"Mely járműtípusokat szervizeli a szolgáltató?",-1)),t("div",Fe,[(n(),i(x,null,v(k,l=>t("label",{key:l.key,class:S(["flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition",s.supported_vehicle_classes.includes(l.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"])},[t("input",{type:"checkbox",value:l.key,checked:s.supported_vehicle_classes.includes(l.key),onChange:a=>te(l.key),class:"w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50"},null,40,Je),t("span",Oe,p(l.label),1)],2)),64))])]),t("div",Pe,[e[31]||(e[31]=t("h3",{class:"text-md font-medium text-white mb-3 flex items-center gap-2"},[t("span",{class:"w-6 h-6 rounded-full bg-emerald-500/20 text-emerald-400 flex items-center justify-center text-xs font-bold"},"B"),b(" Szolgáltatási Kategóriák (Expertise Tags) ")],-1)),e[32]||(e[32]=t("p",{class:"text-xs text-slate-500 mb-3"},"Válaszd ki a szolgáltatóhoz tartozó kategóriákat a hierarchikus fából.",-1)),H.value?(n(),i("div",De,[...e[28]||(e[28]=[t("svg",{class:"w-4 h-4 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("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"})],-1),t("span",null,"Kategóriák betöltése...",-1)])])):(n(),i("div",Re,[(n(!0),i(x,null,v(N.value,l=>(n(),i("div",{key:l.id,class:"ml-0"},[t("div",Ge,[t("button",{onClick:a=>F(l.id),class:"text-slate-500 hover:text-slate-300 transition w-4 h-4 flex items-center justify-center"},[(n(),i("svg",{class:S(["w-3 h-3 transition-transform",$.value.has(l.id)?"rotate-90":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...e[29]||(e[29]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2))],8,Xe),t("label",qe,[t("input",{type:"checkbox",checked:se(l.id),onChange:a=>L(l.id),class:"w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50"},null,40,We),t("span",Qe,p(l.name_hu||l.name_en||l.key),1),t("span",Ye,"(Szint "+p(l.level)+")",1)])]),$.value.has(l.id)&&l.children?.length?(n(),i("div",Ze,[(n(!0),i(x,null,v(l.children,a=>(n(),i("div",{key:a.id},[q(f,{node:a,"selected-ids":s.category_ids,"expanded-ids":$.value,onToggle:L,onToggleExpand:F},null,8,["node","selected-ids","expanded-ids"])]))),128))])):y("",!0)]))),128))])),s.category_ids.length>0?(n(),i("div",et,[(n(!0),i(x,null,v(s.category_ids,l=>(n(),i("span",{key:l,class:"inline-flex items-center gap-1 px-2 py-1 bg-indigo-500/10 text-indigo-300 rounded-full text-xs"},[b(p(ee(l))+" ",1),t("button",{onClick:a=>oe(l),class:"hover:text-white transition"},[...e[30]||(e[30]=[t("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,tt)]))),128))])):y("",!0)]),t("div",st,[e[37]||(e[37]=t("h3",{class:"text-md font-medium text-white mb-3 flex items-center gap-2"},[t("span",{class:"w-6 h-6 rounded-full bg-amber-500/20 text-amber-400 flex items-center justify-center text-xs font-bold"},"C"),b(" Specializációk ")],-1)),e[38]||(e[38]=t("p",{class:"text-xs text-slate-500 mb-3"},"Adj meg speciális márkákat, hajtáslánc típusokat vagy egyéb címkéket.",-1)),t("div",ot,[t("div",null,[e[34]||(e[34]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Márkák (Brands)",-1)),t("div",lt,[(n(!0),i(x,null,v(s.specializations.brands,(l,a)=>(n(),i("span",{key:a,class:"inline-flex items-center gap-1 px-2 py-1 bg-amber-500/10 text-amber-300 rounded-full text-xs"},[b(p(l)+" ",1),t("button",{onClick:ie=>le(a),class:"hover:text-white transition"},[...e[33]||(e[33]=[t("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,nt)]))),128))]),t("div",it,[d(t("input",{"onUpdate:modelValue":e[5]||(e[5]=l=>V.value=l),onKeydown:R(T(J,["prevent"]),["enter"]),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"},null,40,rt),[[u,V.value]]),t("button",{onClick:J,disabled:!V.value.trim(),class:"px-3 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white rounded-lg text-sm transition"}," Hozzáad ",8,at)])]),t("div",null,[e[36]||(e[36]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Hajtáslánc (Propulsion)",-1)),t("div",dt,[(n(!0),i(x,null,v(s.specializations.propulsion,(l,a)=>(n(),i("span",{key:a,class:"inline-flex items-center gap-1 px-2 py-1 bg-emerald-500/10 text-emerald-300 rounded-full text-xs"},[b(p(l)+" ",1),t("button",{onClick:ie=>ne(a),class:"hover:text-white transition"},[...e[35]||(e[35]=[t("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,ut)]))),128))]),t("div",ct,[d(t("input",{"onUpdate:modelValue":e[6]||(e[6]=l=>j.value=l),onKeydown:R(T(O,["prevent"]),["enter"]),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"},null,40,pt),[[u,j.value]]),t("button",{onClick:O,disabled:!j.value.trim(),class:"px-3 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white rounded-lg text-sm transition"}," Hozzáad ",8,mt)])])])])])])):y("",!0),C.value==="location"?(n(),i("div",gt,[t("form",{onSubmit:T(I,["prevent"])},[t("div",bt,[e[47]||(e[47]=t("h2",{class:"text-lg font-semibold text-white mb-4"},"Cím adatok",-1)),t("div",xt,[t("div",ft,[e[41]||(e[41]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Teljes cím",-1)),d(t("input",{"onUpdate:modelValue":e[7]||(e[7]=l=>s.address=l),placeholder:"Teljes cím szövege",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"},null,512),[[u,s.address]])]),t("div",null,[e[42]||(e[42]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Város",-1)),d(t("input",{"onUpdate:modelValue":e[8]||(e[8]=l=>s.city=l),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"},null,512),[[u,s.city]])]),t("div",null,[e[43]||(e[43]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Irányítószám",-1)),d(t("input",{"onUpdate:modelValue":e[9]||(e[9]=l=>s.address_zip=l),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"},null,512),[[u,s.address_zip]])]),t("div",null,[e[44]||(e[44]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Utca",-1)),d(t("input",{"onUpdate:modelValue":e[10]||(e[10]=l=>s.address_street_name=l),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"},null,512),[[u,s.address_street_name]])]),t("div",null,[e[45]||(e[45]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Házszám",-1)),d(t("input",{"onUpdate:modelValue":e[11]||(e[11]=l=>s.address_house_number=l),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"},null,512),[[u,s.address_house_number]])]),t("div",vt,[e[46]||(e[46]=t("label",{class:"block text-sm font-medium text-slate-300 mb-1"},"Plus Code",-1)),d(t("input",{"onUpdate:modelValue":e[12]||(e[12]=l=>s.plus_code=l),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"},null,512),[[u,s.plus_code]])])])])],32)])):y("",!0),t("div",ht,[t("div",yt,[t("div",kt,[U.value?(n(),i("span",_t,"● Módosítások el nem mentve")):(n(),i("span",wt,"Nincs változás"))]),t("div",zt,[t("button",{onClick:P,class:"px-4 py-2 text-sm text-slate-400 hover:text-white transition"}," Mégse "),t("button",{onClick:I,disabled:w.value||!U.value,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"},[w.value?(n(),i("svg",$t,[...e[48]||(e[48]=[t("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"},null,-1)])])):(n(),i("svg",Vt,[...e[49]||(e[49]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])),e[50]||(e[50]=b(" Mentés ",-1))],8,Ct)])])])],64)):(n(),i("div",$e,[...e[17]||(e[17]=[t("p",{class:"text-slate-400 text-center py-12"},"A szolgáltató nem található.",-1)])])),z.value?(n(),i("div",{key:4,class:S(["fixed top-4 right-4 z-50 px-4 py-3 rounded-lg shadow-xl text-sm font-medium transition-all duration-300",z.value.type==="success"?"bg-emerald-600 text-white":"bg-rose-600 text-white"])},p(z.value.message),3)):y("",!0)])}}}),Tt=be(jt,[["__scopeId","data-v-03c94385"]]);export{Tt as default};