Files
service-finder/frontend_admin/.nuxt/dist/client/_nuxt/B0cOE-5l.js
2026-06-30 08:56:55 +00:00

6 lines
39 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{e as ke,g as we,c as n,a as e,t as o,d as T,k as b,F as V,r as E,x as Y,y as d,H as ee,j as u,z as _,I,i as A,C as K,l as c,m as Z,J as $e,h as ze,o as i}from"./BMplCfh_.js";import{u as Ce}from"./VxZautWX.js";import{u as Ue}from"./DJrjUIdP.js";const je={class:"mb-8 flex items-center justify-between"},Te={class:"text-2xl font-bold text-white"},Ve={class:"text-slate-400 mt-1"},Ee={key:0,class:"flex items-center justify-center py-20"},Ae={class:"flex flex-col items-center gap-3"},Fe={class:"text-slate-400 text-sm"},Me={key:1,class:"bg-red-900/30 border border-red-700 rounded-xl p-6 text-center"},De={class:"text-red-300 mb-3"},Le={key:2,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-12 text-center"},Pe={class:"text-lg font-medium text-slate-300 mb-2"},Re={class:"text-slate-500 mb-6"},Be={key:3,class:"space-y-6 mb-8"},Se={class:"mb-6"},He={class:"flex gap-2 border-b border-slate-700"},Ne={class:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6"},Ie={class:"flex items-center justify-between mb-4"},Ze={class:"flex items-center gap-3"},Oe=["innerHTML"],Je={class:"text-lg font-semibold text-white"},Ke={class:"text-xs text-slate-500 font-mono"},qe={class:"flex items-center gap-1.5 flex-wrap"},Ge={key:0,class:"px-2 py-0.5 text-xs font-semibold rounded-full bg-indigo-500/20 text-indigo-300"},Qe={key:1,class:"px-2 py-0.5 text-xs font-semibold rounded-full bg-amber-500/20 text-amber-300",title:"Default fallback package for expired subscriptions"},We=["title"],Xe={class:"mb-4"},Ye={class:"text-3xl font-bold text-white"},et={class:"text-sm text-slate-400 ml-1"},tt={class:"text-sm text-slate-400 mb-4 flex-1"},st={class:"border-t border-slate-700 pt-4 mb-4"},at={class:"text-xs font-semibold uppercase tracking-wider text-slate-500 mb-3"},lt={class:"space-y-2"},ot={class:"flex items-center justify-between text-sm"},rt={class:"text-slate-400"},nt={class:"text-slate-200 font-medium"},it={class:"flex items-center justify-between text-sm"},dt={class:"text-slate-400"},ct={class:"text-slate-200 font-medium"},ut={class:"flex items-center justify-between text-sm"},pt={class:"text-slate-400"},_t={class:"text-slate-200 font-medium"},mt={class:"flex items-center justify-between text-sm"},ft={class:"text-slate-400"},gt={class:"text-slate-200 font-medium"},bt={class:"mb-4"},xt={class:"text-xs text-slate-500"},vt={class:"text-xs font-mono text-slate-400"},yt={class:"flex gap-2"},ht=["onClick"],kt=["onClick","title"],wt=["onClick","title"],$t={class:"bg-slate-800 border border-slate-700 rounded-xl w-full max-w-3xl mx-4 shadow-2xl max-h-[90vh] flex flex-col"},zt={class:"flex items-center justify-between px-6 py-4 border-b border-slate-700"},Ct={class:"text-lg font-semibold text-white"},Ut={class:"px-6 pt-4 pb-2 mb-6"},jt={class:"bg-slate-700/40 border border-slate-600 rounded-xl p-4"},Tt={class:"block text-sm font-semibold text-slate-200 mb-3"},Vt={class:"flex gap-4"},Et={key:0,class:"w-2.5 h-2.5 rounded-full bg-indigo-500"},At={key:0,class:"w-2.5 h-2.5 rounded-full bg-amber-500"},Ft={class:"flex border-b border-slate-700 px-6"},Mt=["onClick"],Dt={class:"flex-1 overflow-y-auto px-6 py-5"},Lt={key:0,class:"space-y-4"},Pt={class:"block text-sm font-medium text-slate-300 mb-1"},Rt=["placeholder"],Bt={class:"block text-sm font-medium text-slate-300 mb-1"},St=["placeholder"],Ht={key:0},Nt={class:"block text-sm font-medium text-slate-300 mb-1"},It={class:"text-xs text-slate-500 mt-1"},Zt={key:1,class:"grid grid-cols-2 gap-4"},Ot={class:"block text-sm font-medium text-slate-300 mb-1"},Jt=["placeholder"],Kt={class:"block text-sm font-medium text-slate-300 mb-1"},qt=["placeholder"],Gt={class:"flex items-center gap-3"},Qt={for:"is_custom",class:"text-sm text-slate-300"},Wt={key:2,class:"border-t border-slate-700 pt-4"},Xt={class:"text-sm font-semibold text-slate-300 mb-3"},Yt={class:"space-y-4"},es={class:"flex items-center gap-3"},ts={for:"is_default_fallback",class:"text-sm text-slate-300"},ss={class:"block text-sm text-slate-300 mb-1"},as={class:"text-xs text-slate-500 mt-1"},ls={key:1,class:"space-y-6"},os={class:"text-sm font-semibold text-slate-300 mb-3"},rs={class:"overflow-x-auto"},ns={class:"w-full text-sm"},is={class:"border-b border-slate-700"},ds={class:"text-left py-2 px-3 text-slate-400 font-medium"},cs={class:"text-left py-2 px-3 text-slate-400 font-medium"},us={class:"text-left py-2 px-3 text-slate-400 font-medium"},ps={class:"py-2 px-3 text-slate-200 font-medium"},_s={class:"inline-flex items-center gap-1.5"},ms={class:"text-xs text-slate-500"},fs={class:"py-2 px-3"},gs=["value","onInput"],bs={class:"py-2 px-3"},xs=["value","onInput"],vs={class:"py-2 px-3"},ys=["value","onInput"],hs={class:"py-2 px-3"},ks=["value","onInput"],ws={class:"py-2 px-3 text-center"},$s={class:"flex items-center gap-1"},zs=["onClick","title"],Cs=["onClick","title"],Us={class:"flex items-center gap-3 mt-4"},js={value:"",disabled:""},Ts=["value"],Vs=["disabled"],Es={class:"border-t border-slate-700 pt-5"},As={class:"text-sm font-semibold text-slate-300 mb-3"},Fs={class:"bg-slate-700/30 rounded-xl p-4 space-y-4"},Ms={class:"grid grid-cols-3 gap-4"},Ds={class:"block text-xs text-slate-400 mb-1"},Ls={class:"block text-xs text-slate-400 mb-1"},Ps=["value"],Rs={class:"block text-xs text-slate-400 mb-1"},Bs=["value"],Ss={class:"grid grid-cols-3 gap-4 pt-2"},Hs={class:"bg-slate-800 rounded-lg p-3 text-center"},Ns={class:"text-xs text-slate-400 mb-1"},Is={class:"text-lg font-bold text-white"},Zs={class:"bg-slate-800 rounded-lg p-3 text-center"},Os={class:"text-xs text-slate-400 mb-1"},Js={class:"text-lg font-bold text-amber-400"},Ks={class:"bg-slate-800 rounded-lg p-3 text-center ring-2 ring-emerald-500/50"},qs={class:"text-xs text-slate-400 mb-1"},Gs={class:"text-lg font-bold text-emerald-400"},Qs={class:"flex justify-end pt-1"},Ws={key:2,class:"space-y-5"},Xs={class:"text-sm font-semibold text-slate-300 mb-3"},Ys={class:"grid grid-cols-3 gap-4"},ea={class:"block text-xs text-slate-400 mb-1"},ta={class:"block text-xs text-slate-400 mb-1"},sa={class:"block text-xs text-slate-400 mb-1"},aa={class:"block text-xs text-slate-400 mb-1"},la={class:"border-t border-slate-700 pt-4"},oa={class:"grid grid-cols-3 gap-4"},ra={class:"flex items-center h-[38px]"},na={class:"relative inline-flex items-center cursor-pointer"},ia={class:"ms-3 text-sm text-slate-300"},da={class:"flex items-center h-[38px]"},ca={class:"relative inline-flex items-center cursor-pointer"},ua={class:"ms-3 text-sm text-slate-300"},pa={class:"border-t border-slate-700 pt-4"},_a={class:"text-sm font-semibold text-slate-300 mb-3"},ma={class:"text-xs text-slate-500 mt-1"},fa={key:0,class:"text-xs text-red-400 mt-1"},ga={class:"flex items-center justify-between px-6 py-4 border-t border-slate-700"},ba={class:"text-xs text-slate-500"},xa={class:"flex items-center gap-3"},va=["disabled"],ya={key:0,class:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},ha={class:"bg-slate-800 border border-slate-700 rounded-xl w-full max-w-md mx-4 p-6 shadow-2xl"},ka={class:"text-lg font-semibold text-white mb-2"},wa={class:"text-slate-400 text-sm mb-6"},$a={class:"flex items-center justify-end gap-3"},za=["disabled"],Va=ke({__name:"index",setup(Ca){const v=Ce(),{formatCurrency:D}=Ue(),q=[{key:"basic",label:"📋 Basic Info"},{key:"pricing",label:"💰 Pricing"},{key:"features",label:"⚡ Features"}],m=c("basic"),te=Z(()=>{const s=q.find(t=>t.key===m.value);return s?s.label:""}),$=c("base"),se=Z(()=>L.value.filter(s=>s.rules?.type!=="addon")),ae=Z(()=>L.value.filter(s=>s.rules?.type==="addon")),L=c([]),O=c(!0),P=c(null),x=c(!1),F=c(!1),z=c(null),y=c(null),C=c(!1),h=c(!1),M=c(null),R=c(null),U=c(""),le=Z(()=>v.regions.filter(s=>s.country_code!=="DEFAULT"&&!a.pricing_zones[s.country_code]));function oe(){if(!U.value)return;const s=U.value;if(a.pricing_zones[s]){p("error",`Region ${s} already exists in pricing zones`);return}const t=v.getRegion(s);a.pricing_zones[s]={monthly_price:0,yearly_price:0,credit_price:0,currency:t?.currency||"EUR"},U.value="",p("success",`Added pricing zone for ${s}`)}function re(s){s!=="DEFAULT"&&(delete a.pricing_zones[s],p("success",`Removed pricing zone for ${s}`))}const k=c(0),j=c(27),w=c("EUR"),G={name:"",display_name:"",type:"private",tier_level:0,monthly_price:0,yearly_price:0,currency:"EUR",max_vehicles:1,max_garages:1,max_users:1,monthly_free_credits:0,max_cost_category_depth:3,advanced_reports:!1,export_data:!1,subtitle:"",badge:"",is_custom:!1,is_default_fallback:!1,trial_days_on_signup:0,feature_capabilities_json:`{
"ai_analysis": false,
"priority_support": false,
"api_access": false
}`,pricing_zones:{}},a=$e({...G});function Q(s,t){const l=a.pricing_zones[s];return l?t==="monthly"?l.monthly_price:l.yearly_price:0}function W(s,t,l){const r=parseFloat(l)||0;a.pricing_zones[s]||(a.pricing_zones[s]={monthly_price:0,yearly_price:0,credit_price:0,currency:"EUR"}),t==="monthly"?a.pricing_zones[s].monthly_price=r:a.pricing_zones[s].yearly_price=r}function ne(s){const t=a.pricing_zones[s];return t?t.credit_price??0:0}function ie(s,t){const l=parseFloat(t)||0;a.pricing_zones[s]||(a.pricing_zones[s]={monthly_price:0,yearly_price:0,credit_price:0,currency:"EUR"}),a.pricing_zones[s].credit_price=l}function de(s){const t=a.pricing_zones[s];return t?t.currency:"EUR"}function ce(s,t){a.pricing_zones[s]||(a.pricing_zones[s]={monthly_price:0,yearly_price:0,credit_price:0,currency:"EUR"}),a.pricing_zones[s].currency=t.toUpperCase()}function ue(){const s=v.regions.find(l=>l.default_vat_rate===j);if(!s){p("error","No region found with the selected VAT rate");return}const t=s.country_code;a.pricing_zones[t]||(a.pricing_zones[t]={monthly_price:0,yearly_price:0,credit_price:0,currency:s.currency}),a.pricing_zones[t].monthly_price=k,a.pricing_zones[t].currency=w,p("success",`Applied net price ${D(k,w)} to ${t} region`)}function pe(s){const t=a.pricing_zones.DEFAULT;if(!t){p("error","No DEFAULT pricing zone exists. Set DEFAULT prices first.");return}if(s==="DEFAULT")return;a.pricing_zones[s]||(a.pricing_zones[s]={monthly_price:0,yearly_price:0,credit_price:0,currency:"EUR"});const l=a.pricing_zones[s];Object.assign(l,{monthly_price:t.monthly_price,yearly_price:t.yearly_price,credit_price:t.credit_price??0,currency:t.currency}),p("success",`Applied DEFAULT pricing to ${s} region`)}function B(){const t=ze("access_token").value;return t?{Authorization:`Bearer ${t}`}:{}}async function S(){O.value=!0,P.value=null;try{const s=await $fetch("/api/v1/admin/packages?include_hidden=true",{headers:B()});L.value=s.tiers||[]}catch(s){P.value=s?.data?.detail||s?.message||"Failed to load packages",console.error("[Packages] Fetch error:",s)}finally{O.value=!1}}function H(s){return s.rules?.display_name||s.name}function _e(s){return s.rules?.marketing?.subtitle||s.rules?.marketing?.badge||""}function me(s){const t=s.rules?.pricing_zones,l=s.rules?.pricing;if(t&&t.DEFAULT){const r=t.DEFAULT,f=r.currency==="HUF"?"Ft":"€";return`${r.monthly_price} ${f}`}if(l){const r=l.currency==="HUF"?"Ft":"€";return`${l.monthly_price} ${r}`}return"—"}function N(s,t){const l=s.rules?.allowances;return l?l[t]??"—":"—"}function fe(s){return s>=2?"bg-purple-500/10 text-purple-400":s>=1?"bg-amber-500/10 text-amber-400":"bg-slate-500/10 text-slate-400"}function ge(s){return s>=2?"🏢":s>=1?"⭐":"🔓"}function X(){C.value=!0,z.value=null,m.value="basic",Object.assign(a,G),$.value==="addon"&&(a.type="addon"),x.value=!0}function be(s){C.value=!1,z.value=s,m.value="basic";const t=s.rules||{},l=t.pricing_zones?.DEFAULT||t.pricing||{},r=t.allowances||{};a.name=s.name,a.display_name=t.display_name||"",a.type=t.type||"private",a.tier_level=s.tier_level,a.monthly_price=l.monthly_price||0,a.yearly_price=l.yearly_price||0,a.currency=l.currency||"EUR",a.max_vehicles=r.max_vehicles||1,a.max_garages=r.max_garages||1,a.max_users=r.max_users||1,a.monthly_free_credits=r.monthly_free_credits||0,a.subtitle=t.marketing?.subtitle||"",a.badge=t.marketing?.badge||"",a.is_custom=s.is_custom,a.is_default_fallback=s.is_default_fallback,a.trial_days_on_signup=s.trial_days_on_signup;const f=s.feature_capabilities||{};if(a.max_cost_category_depth=f.max_cost_category_depth??3,a.advanced_reports=f.advanced_reports??!1,a.export_data=f.export_data??!1,a.pricing_zones={},t.pricing_zones)for(const[J,g]of Object.entries(t.pricing_zones))a.pricing_zones[J]={monthly_price:g.monthly_price||0,yearly_price:g.yearly_price||0,credit_price:g.credit_price||0,currency:g.currency||"EUR"};a.feature_capabilities_json=JSON.stringify(s.feature_capabilities||{},null,2),x.value=!0}function xe(s){y.value=s,F.value=!0}function ve(s){C.value=!0,z.value=null,m.value="basic";const t=s.rules||{},l=t.pricing_zones?.DEFAULT||t.pricing||{},r=t.allowances||{};a.name=s.name+"_copy",a.display_name=(t.display_name||s.name)+" (másolat)",a.type=t.type||"private",a.tier_level=s.tier_level,a.monthly_price=l.monthly_price||0,a.yearly_price=l.yearly_price||0,a.currency=l.currency||"EUR",a.max_vehicles=r.max_vehicles||1,a.max_garages=r.max_garages||1,a.max_users=r.max_users||1,a.monthly_free_credits=r.monthly_free_credits||0,a.subtitle=t.marketing?.subtitle||"",a.badge=t.marketing?.badge||"",a.is_custom=s.is_custom,a.is_default_fallback=!1,a.trial_days_on_signup=s.trial_days_on_signup;const f=s.feature_capabilities||{};if(a.max_cost_category_depth=f.max_cost_category_depth??3,a.advanced_reports=f.advanced_reports??!1,a.export_data=f.export_data??!1,a.pricing_zones={},t.pricing_zones)for(const[J,g]of Object.entries(t.pricing_zones))a.pricing_zones[J]={monthly_price:g.monthly_price||0,yearly_price:g.yearly_price||0,credit_price:g.credit_price||0,currency:g.currency||"EUR"};a.feature_capabilities_json=JSON.stringify(s.feature_capabilities||{},null,2),x.value=!0}async function ye(){if(!a.name.trim()){p("error","Package name is required");return}let s={};try{s=JSON.parse(a.feature_capabilities_json),R.value=null}catch{R.value="Invalid JSON in feature capabilities",m.value="features";return}h.value=!0;try{const t={...a.pricing_zones};t.DEFAULT||(t.DEFAULT={monthly_price:a.monthly_price,yearly_price:a.yearly_price,credit_price:0,currency:a.currency.toUpperCase()});const l={...s,max_cost_category_depth:a.max_cost_category_depth,advanced_reports:a.advanced_reports,export_data:a.export_data},r={type:a.type,display_name:a.display_name||null,pricing_zones:t,allowances:{max_vehicles:a.max_vehicles,max_garages:a.max_garages,max_users:a.max_users,monthly_free_credits:a.monthly_free_credits},marketing:{subtitle:a.subtitle||null,badge:a.badge||null},lifecycle:{is_public:!0}};C.value?(await $fetch("/api/v1/admin/packages",{method:"POST",headers:{...B(),"Content-Type":"application/json"},body:{name:a.name.trim().toLowerCase(),rules:r,is_custom:a.is_custom,tier_level:a.tier_level,feature_capabilities:l,is_default_fallback:a.is_default_fallback,trial_days_on_signup:a.trial_days_on_signup}}),p("success",`Package "${a.name}" created successfully`)):z.value&&(await $fetch(`/api/v1/admin/packages/${z.value.id}`,{method:"PATCH",headers:{...B(),"Content-Type":"application/json"},body:{name:a.name.trim().toLowerCase(),rules:r,is_custom:a.is_custom,tier_level:a.tier_level,feature_capabilities:l,is_default_fallback:a.is_default_fallback,trial_days_on_signup:a.trial_days_on_signup}}),p("success",`Package "${a.name}" updated successfully`)),x.value=!1,await S()}catch(t){const l=t?.data?.detail||t?.message||"Operation failed";p("error",l),console.error("[Packages] Save error:",t)}finally{h.value=!1}}async function he(){if(y.value){h.value=!0;try{await $fetch(`/api/v1/admin/packages/${y.value.id}`,{method:"DELETE",headers:B()}),p("success",`Package "${H(y.value)}" deactivated`),F.value=!1,y.value=null,await S()}catch(s){const t=s?.data?.detail||s?.message||"Delete failed";p("error",t),console.error("[Packages] Delete error:",s)}finally{h.value=!1}}}function p(s,t){M.value={type:s,message:t},setTimeout(()=>{M.value=null},4e3)}return we(()=>{S(),v.fetchRegions()}),(s,t)=>(i(),n("div",null,[e("div",je,[e("div",null,[e("h1",Te,o(s.$t("packages.title")),1),e("p",Ve,o(s.$t("packages.subtitle")),1)]),e("button",{onClick:X,class:"px-5 py-2.5 bg-emerald-600 hover:bg-emerald-500 text-white font-medium rounded-lg transition text-sm flex items-center gap-2"},[t[29]||(t[29]=e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)),T(" "+o(s.$t("packages.create_new")),1)])]),O.value?(i(),n("div",Ee,[e("div",Ae,[t[30]||(t[30]=e("svg",{class:"animate-spin h-8 w-8 text-indigo-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),e("span",Fe,o(s.$t("packages.loading")),1)])])):P.value?(i(),n("div",Me,[e("p",De,o(P.value),1),e("button",{onClick:S,class:"px-4 py-2 bg-red-700 hover:bg-red-600 text-white rounded-lg transition text-sm"},o(s.$t("packages.retry")),1)])):L.value.length===0?(i(),n("div",Le,[t[31]||(t[31]=e("svg",{class:"w-16 h-16 mx-auto text-slate-600 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})],-1)),e("h3",Pe,o(s.$t("packages.no_packages")),1),e("p",Re,o(s.$t("packages.no_packages_desc")),1),e("button",{onClick:X,class:"px-5 py-2.5 bg-emerald-600 hover:bg-emerald-500 text-white font-medium rounded-lg transition text-sm"},o(s.$t("packages.create_first")),1)])):(i(),n("div",Be,[e("div",Se,[e("div",He,[e("button",{onClick:t[0]||(t[0]=l=>$.value="base"),class:b(["px-5 py-3 text-sm font-medium border-b-2 transition",$.value==="base"?"border-indigo-500 text-indigo-300":"border-transparent text-slate-400 hover:text-slate-200 hover:border-slate-500"])},[...t[32]||(t[32]=[e("span",{class:"flex items-center gap-2"},[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})]),T(" Alapcsomagok ")],-1)])],2),e("button",{onClick:t[1]||(t[1]=l=>$.value="addon"),class:b(["px-5 py-3 text-sm font-medium border-b-2 transition",$.value==="addon"?"border-amber-500 text-amber-300":"border-transparent text-slate-400 hover:text-slate-200 hover:border-slate-500"])},[...t[33]||(t[33]=[e("span",{class:"flex items-center gap-2"},[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})]),T(" Kiegészítők ")],-1)])],2)])]),e("div",Ne,[(i(!0),n(V,null,E($.value==="base"?se.value:ae.value,l=>(i(),n("div",{key:l.id,class:"bg-slate-800 rounded-xl border border-slate-700 p-6 flex flex-col transition-all hover:border-slate-600"},[e("div",Ie,[e("div",Ze,[e("div",{class:b(["p-2 rounded-lg",fe(l.tier_level)])},[e("span",{class:"w-5 h-5 text-lg",innerHTML:ge(l.tier_level)},null,8,Oe)],2),e("div",null,[e("h2",Je,o(H(l)),1),e("span",Ke,o(l.name),1)])]),e("div",qe,[l.tier_level>=1?(i(),n("span",Ge,o(s.$t("packages.popular")),1)):u("",!0),l.is_default_fallback?(i(),n("span",Qe," 🔒 "+o(s.$t("packages.fallback_badge")),1)):u("",!0),l.trial_days_on_signup>0?(i(),n("span",{key:2,class:"px-2 py-0.5 text-xs font-semibold rounded-full bg-emerald-500/20 text-emerald-300",title:`${l.trial_days_on_signup} days trial on signup`}," 🎯 "+o(s.$t("packages.trial_badge"))+": "+o(l.trial_days_on_signup)+"d ",9,We)):u("",!0)])]),e("div",Xe,[e("span",Ye,o(me(l)),1),e("span",et,"/ "+o(s.$t("packages.month")),1)]),e("p",tt,o(_e(l)),1),e("div",st,[e("h3",at,o(s.$t("packages.allowances")),1),e("div",lt,[e("div",ot,[e("span",rt,o(s.$t("packages.max_vehicles")),1),e("span",nt,o(N(l,"max_vehicles")),1)]),e("div",it,[e("span",dt,o(s.$t("packages.max_garages")),1),e("span",ct,o(N(l,"max_garages")),1)]),e("div",ut,[e("span",pt,o(s.$t("packages.max_users")),1),e("span",_t,o(N(l,"max_users")),1)]),e("div",mt,[e("span",ft,o(s.$t("packages.monthly_credits")),1),e("span",gt,o(N(l,"monthly_free_credits")),1)])])]),e("div",bt,[e("span",xt,o(s.$t("packages.tier_level"))+": ",1),e("span",vt,o(l.tier_level),1)]),e("div",yt,[e("button",{onClick:r=>be(l),class:"flex-1 px-4 py-2.5 bg-indigo-600 hover:bg-indigo-500 text-white font-medium rounded-lg transition text-sm"},o(s.$t("packages.edit")),9,ht),e("button",{onClick:r=>ve(l),class:"px-3 py-2.5 bg-emerald-700 hover:bg-emerald-600 text-emerald-200 rounded-lg transition",title:s.$t("packages.duplicate")},[...t[34]||(t[34]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)])],8,kt),e("button",{onClick:r=>xe(l),class:"px-3 py-2.5 bg-red-700 hover:bg-red-600 text-red-200 rounded-lg transition",title:s.$t("packages.delete")},[...t[35]||(t[35]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,wt)])]))),128))])])),x.value?(i(),n("div",{key:4,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:t[26]||(t[26]=Y(l=>x.value=!1,["self"]))},[e("div",$t,[e("div",zt,[e("h3",Ct,o(C.value?s.$t("packages.create_title"):s.$t("packages.edit_title")+": "+H(z.value)),1),e("button",{onClick:t[2]||(t[2]=l=>x.value=!1),class:"p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition"},[...t[36]||(t[36]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e("div",Ut,[e("div",jt,[e("label",Tt,o(s.$t("packages.form_type")),1),e("div",Vt,[e("label",{class:b(["flex-1 flex items-center gap-3 px-4 py-3 rounded-lg border-2 cursor-pointer transition",a.type==="base"||a.type==="private"||a.type==="corporate"?"border-indigo-500 bg-indigo-500/10":"border-slate-600 bg-slate-700/50 hover:border-slate-500"])},[d(e("input",{type:"radio",name:"packageType",value:"private","onUpdate:modelValue":t[3]||(t[3]=l=>a.type=l),class:"sr-only"},null,512),[[ee,a.type]]),e("div",{class:b(["w-5 h-5 rounded-full border-2 flex items-center justify-center flex-shrink-0",a.type==="private"||a.type==="corporate"||a.type==="base"?"border-indigo-500":"border-slate-500"])},[a.type==="private"||a.type==="corporate"||a.type==="base"?(i(),n("div",Et)):u("",!0)],2),t[37]||(t[37]=e("div",null,[e("span",{class:"text-sm font-medium text-white"},"📦 Alapcsomag (Base Tier)"),e("p",{class:"text-xs text-slate-400 mt-0.5"},"Teljes jogú csomag járművekkel, garázsokkal, felhasználókkal")],-1))],2),e("label",{class:b(["flex-1 flex items-center gap-3 px-4 py-3 rounded-lg border-2 cursor-pointer transition",a.type==="addon"?"border-amber-500 bg-amber-500/10":"border-slate-600 bg-slate-700/50 hover:border-slate-500"])},[d(e("input",{type:"radio",name:"packageType",value:"addon","onUpdate:modelValue":t[4]||(t[4]=l=>a.type=l),class:"sr-only"},null,512),[[ee,a.type]]),e("div",{class:b(["w-5 h-5 rounded-full border-2 flex items-center justify-center flex-shrink-0",a.type==="addon"?"border-amber-500":"border-slate-500"])},[a.type==="addon"?(i(),n("div",At)):u("",!0)],2),t[38]||(t[38]=e("div",null,[e("span",{class:"text-sm font-medium text-white"}," Kiegészítő (Add-on)"),e("p",{class:"text-xs text-slate-400 mt-0.5"},"Kiegészítő modul meglévő csomaghoz, korlátozott opciókkal")],-1))],2)])])]),e("div",Ft,[(i(),n(V,null,E(q,l=>e("button",{key:l.key,onClick:r=>m.value=l.key,class:b(["px-4 py-3 text-sm font-medium border-b-2 transition",m.value===l.key?"border-indigo-500 text-indigo-300":"border-transparent text-slate-400 hover:text-slate-200 hover:border-slate-500"])},o(l.label),11,Mt)),64))]),e("div",Dt,[m.value==="basic"?(i(),n("div",Lt,[e("div",null,[e("label",Pt,o(s.$t("packages.form_name")),1),d(e("input",{"onUpdate:modelValue":t[5]||(t[5]=l=>a.name=l),type:"text",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:s.$t("packages.form_name_placeholder")},null,8,Rt),[[_,a.name]])]),e("div",null,[e("label",Bt,o(s.$t("packages.form_display_name")),1),d(e("input",{"onUpdate:modelValue":t[6]||(t[6]=l=>a.display_name=l),type:"text",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:s.$t("packages.form_display_name_placeholder")},null,8,St),[[_,a.display_name]])]),a.type!=="addon"?(i(),n("div",Ht,[e("label",Nt,o(s.$t("packages.form_tier_level")),1),d(e("input",{"onUpdate:modelValue":t[7]||(t[7]=l=>a.tier_level=l),type:"number",min:"0",max:"10",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,512),[[_,a.tier_level,void 0,{number:!0}]]),e("p",It,o(s.$t("packages.form_tier_level_hint")),1)])):u("",!0),a.type!=="addon"?(i(),n("div",Zt,[e("div",null,[e("label",Ot,o(s.$t("packages.form_subtitle")),1),d(e("input",{"onUpdate:modelValue":t[8]||(t[8]=l=>a.subtitle=l),type:"text",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:s.$t("packages.form_subtitle_placeholder")},null,8,Jt),[[_,a.subtitle]])]),e("div",null,[e("label",Kt,o(s.$t("packages.form_badge")),1),d(e("input",{"onUpdate:modelValue":t[9]||(t[9]=l=>a.badge=l),type:"text",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:s.$t("packages.form_badge_placeholder")},null,8,qt),[[_,a.badge]])])])):u("",!0),e("div",Gt,[d(e("input",{"onUpdate:modelValue":t[10]||(t[10]=l=>a.is_custom=l),type:"checkbox",id:"is_custom",class:"rounded bg-slate-700 border-slate-600 text-indigo-600 focus:ring-indigo-500"},null,512),[[I,a.is_custom]]),e("label",Qt,o(s.$t("packages.form_is_custom")),1)]),a.type!=="addon"?(i(),n("div",Wt,[e("h4",Xt,o(s.$t("packages.singleton_rules")),1),e("div",Yt,[e("div",es,[d(e("input",{"onUpdate:modelValue":t[11]||(t[11]=l=>a.is_default_fallback=l),type:"checkbox",id:"is_default_fallback",class:"rounded bg-slate-700 border-slate-600 text-amber-500 focus:ring-amber-500"},null,512),[[I,a.is_default_fallback]]),e("label",ts,o(s.$t("packages.form_is_default_fallback")),1)]),e("div",null,[e("label",ss,o(s.$t("packages.form_trial_days")),1),d(e("input",{"onUpdate:modelValue":t[12]||(t[12]=l=>a.trial_days_on_signup=l),type:"number",min:"0",max:"365",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-emerald-500 focus:border-transparent"},null,512),[[_,a.trial_days_on_signup,void 0,{number:!0}]]),e("p",as,o(s.$t("packages.form_trial_days_hint")),1)])])])):u("",!0)])):u("",!0),m.value==="pricing"?(i(),n("div",ls,[e("div",null,[e("h4",os,o(s.$t("packages.per_region_pricing")),1),e("div",rs,[e("table",ns,[e("thead",null,[e("tr",is,[t[39]||(t[39]=e("th",{class:"text-left py-2 px-3 text-slate-400 font-medium"},"Region",-1)),e("th",ds,o(s.$t("packages.form_monthly_price")),1),e("th",cs,o(s.$t("packages.form_yearly_price")),1),t[40]||(t[40]=e("th",{class:"text-left py-2 px-3 text-slate-400 font-medium"},"Kredit Ár",-1)),e("th",us,o(s.$t("packages.form_currency")),1),t[41]||(t[41]=e("th",{class:"text-left py-2 px-3 text-slate-400 font-medium"},null,-1))])]),e("tbody",null,[(i(!0),n(V,null,E(A(v).regions,l=>(i(),n("tr",{key:l.country_code,class:"border-b border-slate-700/50"},[e("td",ps,[e("span",_s,[e("span",null,o(l.country_code),1),e("span",ms,"("+o(l.currency)+", "+o(l.default_vat_rate)+"% VAT)",1)])]),e("td",fs,[e("input",{value:Q(l.country_code,"monthly"),onInput:r=>W(l.country_code,"monthly",r.target.value),type:"number",step:"0.01",min:"0",class:"w-full px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,40,gs)]),e("td",bs,[e("input",{value:Q(l.country_code,"yearly"),onInput:r=>W(l.country_code,"yearly",r.target.value),type:"number",step:"0.01",min:"0",class:"w-full px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,40,xs)]),e("td",vs,[e("input",{value:ne(l.country_code),onInput:r=>ie(l.country_code,r.target.value),type:"number",step:"0.01",min:"0",class:"w-full px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,40,ys)]),e("td",hs,[e("input",{value:de(l.country_code),onInput:r=>ce(l.country_code,r.target.value),type:"text",maxlength:"3",class:"w-full px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent uppercase"},null,40,ks)]),e("td",ws,[e("div",$s,[e("button",{onClick:r=>pe(l.country_code),class:"p-1.5 rounded-lg text-emerald-400 hover:text-emerald-300 hover:bg-emerald-500/10 transition",title:"Apply DEFAULT pricing to "+l.country_code},[...t[42]||(t[42]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1)])],8,zs),e("button",{onClick:r=>re(l.country_code),class:"p-1.5 rounded-lg text-red-400 hover:text-red-300 hover:bg-red-500/10 transition",title:"Remove "+l.country_code},[...t[43]||(t[43]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,Cs)])])]))),128))])])]),e("div",Us,[d(e("select",{"onUpdate:modelValue":t[13]||(t[13]=l=>U.value=l),class:"px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},[e("option",js,o(s.$t("packages.add_zone_select")),1),(i(!0),n(V,null,E(le.value,l=>(i(),n("option",{key:l.country_code,value:l.country_code},o(l.country_code)+" — "+o(l.name)+" ("+o(l.currency)+", "+o(l.default_vat_rate)+"% VAT) ",9,Ts))),128))],512),[[K,U.value]]),e("button",{onClick:oe,disabled:!U.value,class:"px-4 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-slate-600 disabled:cursor-not-allowed text-white text-sm font-medium rounded-lg transition flex items-center gap-2"},[t[44]||(t[44]=e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)),T(" "+o(s.$t("packages.add_zone")),1)],8,Vs)])]),e("div",Es,[e("h4",As,"🧮 "+o(s.$t("packages.smart_calculator")),1),e("div",Fs,[e("div",Ms,[e("div",null,[e("label",Ds,o(s.$t("packages.calc_net_price")),1),d(e("input",{"onUpdate:modelValue":t[14]||(t[14]=l=>k.value=l),type:"number",step:"0.01",min:"0",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-emerald-500 focus:border-transparent",placeholder:"0.00"},null,512),[[_,k.value,void 0,{number:!0}]])]),e("div",null,[e("label",Ls,o(s.$t("packages.calc_vat_rate")),1),d(e("select",{"onUpdate:modelValue":t[15]||(t[15]=l=>j.value=l),class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-emerald-500 focus:border-transparent"},[(i(!0),n(V,null,E(A(v).regions,l=>(i(),n("option",{key:l.country_code,value:l.default_vat_rate},o(l.country_code)+" — "+o(l.default_vat_rate)+"% ",9,Ps))),128))],512),[[K,j.value]])]),e("div",null,[e("label",Rs,o(s.$t("packages.calc_currency")),1),d(e("select",{"onUpdate:modelValue":t[16]||(t[16]=l=>w.value=l),class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-emerald-500 focus:border-transparent"},[(i(!0),n(V,null,E(A(v).regions,l=>(i(),n("option",{key:l.country_code,value:l.currency},o(l.currency)+" ("+o(l.country_code)+") ",9,Bs))),128))],512),[[K,w.value]])])]),e("div",Ss,[e("div",Hs,[e("p",Ns,o(s.$t("packages.calc_net")),1),e("p",Is,o(A(D)(k.value,w.value)),1)]),e("div",Zs,[e("p",Os,o(s.$t("packages.calc_vat"))+" ("+o(j.value)+"%)",1),e("p",Js,o(A(D)(k.value*(j.value/100),w.value)),1)]),e("div",Ks,[e("p",qs,o(s.$t("packages.calc_gross")),1),e("p",Gs,o(A(D)(k.value*(1+j.value/100),w.value)),1)])]),e("div",Qs,[e("button",{onClick:ue,class:"px-4 py-2 bg-emerald-600 hover:bg-emerald-500 text-white text-sm font-medium rounded-lg transition flex items-center gap-2"},[t[45]||(t[45]=e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1)),T(" "+o(s.$t("packages.calc_apply")),1)])])])])])):u("",!0),m.value==="features"?(i(),n("div",Ws,[e("div",null,[e("h4",Xs,o(s.$t("packages.allowances")),1),e("div",Ys,[e("div",null,[e("label",ea,o(s.$t("packages.max_vehicles")),1),d(e("input",{"onUpdate:modelValue":t[17]||(t[17]=l=>a.max_vehicles=l),type:"number",min:"0",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,512),[[_,a.max_vehicles,void 0,{number:!0}]])]),e("div",null,[e("label",ta,o(s.$t("packages.max_garages")),1),d(e("input",{"onUpdate:modelValue":t[18]||(t[18]=l=>a.max_garages=l),type:"number",min:"0",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,512),[[_,a.max_garages,void 0,{number:!0}]])]),e("div",null,[e("label",sa,o(s.$t("packages.max_users")),1),d(e("input",{"onUpdate:modelValue":t[19]||(t[19]=l=>a.max_users=l),type:"number",min:"1",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,512),[[_,a.max_users,void 0,{number:!0}]])]),e("div",null,[e("label",aa,o(s.$t("packages.monthly_credits")),1),d(e("input",{"onUpdate:modelValue":t[20]||(t[20]=l=>a.monthly_free_credits=l),type:"number",min:"0",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,512),[[_,a.monthly_free_credits,void 0,{number:!0}]])])])]),e("div",la,[t[51]||(t[51]=e("h4",{class:"text-sm font-semibold text-slate-300 mb-3"},"SaaS Allowances",-1)),e("div",oa,[e("div",null,[t[46]||(t[46]=e("label",{class:"block text-xs text-slate-400 mb-1"},"Költségkategória mélység (max_cost_category_depth)",-1)),d(e("input",{"onUpdate:modelValue":t[21]||(t[21]=l=>a.max_cost_category_depth=l),type:"number",min:"0",max:"10",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"},null,512),[[_,a.max_cost_category_depth,void 0,{number:!0}]])]),e("div",null,[t[48]||(t[48]=e("label",{class:"block text-xs text-slate-400 mb-1"},"Statisztika (advanced_reports)",-1)),e("div",ra,[e("label",na,[d(e("input",{"onUpdate:modelValue":t[22]||(t[22]=l=>a.advanced_reports=l),type:"checkbox",class:"sr-only peer"},null,512),[[I,a.advanced_reports]]),t[47]||(t[47]=e("div",{class:"w-11 h-6 bg-slate-600 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600"},null,-1)),e("span",ia,o(a.advanced_reports?"Enabled":"Disabled"),1)])])]),e("div",null,[t[50]||(t[50]=e("label",{class:"block text-xs text-slate-400 mb-1"},"PDF/CSV Export (export_data)",-1)),e("div",da,[e("label",ca,[d(e("input",{"onUpdate:modelValue":t[23]||(t[23]=l=>a.export_data=l),type:"checkbox",class:"sr-only peer"},null,512),[[I,a.export_data]]),t[49]||(t[49]=e("div",{class:"w-11 h-6 bg-slate-600 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600"},null,-1)),e("span",ua,o(a.export_data?"Enabled":"Disabled"),1)])])])])]),e("div",pa,[e("h4",_a,o(s.$t("packages.feature_capabilities")),1),d(e("textarea",{"onUpdate:modelValue":t[24]||(t[24]=l=>a.feature_capabilities_json=l),rows:"8",class:"w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm font-mono focus:ring-2 focus:ring-indigo-500 focus:border-transparent",placeholder:'{\\n "ai_analysis": true,\\n "priority_support": false,\\n "api_access": true\\n}'},null,512),[[_,a.feature_capabilities_json]]),e("p",ma,o(s.$t("packages.feature_capabilities_hint")),1),R.value?(i(),n("p",fa,o(R.value),1)):u("",!0)])])):u("",!0)]),e("div",ga,[e("div",ba,o(te.value),1),e("div",xa,[e("button",{onClick:t[25]||(t[25]=l=>x.value=!1),class:"px-4 py-2 text-sm text-slate-400 hover:text-white transition"},o(s.$t("packages.cancel")),1),e("button",{onClick:ye,disabled:h.value,class:"px-6 py-2 bg-emerald-600 hover:bg-emerald-500 disabled:bg-slate-600 disabled:cursor-not-allowed text-white font-medium rounded-lg transition text-sm flex items-center gap-2"},[h.value?(i(),n("svg",ya,[...t[52]||(t[52]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):u("",!0),T(" "+o(C.value?s.$t("packages.create"):s.$t("packages.save")),1)],8,va)])])])])):u("",!0),F.value&&y.value?(i(),n("div",{key:5,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:t[28]||(t[28]=Y(l=>F.value=!1,["self"]))},[e("div",ha,[e("h3",ka,o(s.$t("packages.delete_title")),1),e("p",wa,o(s.$t("packages.delete_confirm",{name:H(y.value)})),1),e("div",$a,[e("button",{onClick:t[27]||(t[27]=l=>F.value=!1),class:"px-4 py-2 text-sm text-slate-400 hover:text-white transition"},o(s.$t("packages.cancel")),1),e("button",{onClick:he,disabled:h.value,class:"px-6 py-2 bg-red-600 hover:bg-red-500 disabled:bg-slate-600 disabled:cursor-not-allowed text-white font-medium rounded-lg transition text-sm"},o(s.$t("packages.delete_btn")),9,za)])])])):u("",!0),M.value?(i(),n("div",{key:6,class:b(["fixed bottom-6 right-6 px-5 py-3 rounded-xl shadow-xl text-sm font-medium z-50",M.value.type==="success"?"bg-emerald-600 text-white":"bg-red-600 text-white"])},o(M.value.message),3)):u("",!0)]))}});export{Va as default};