Files
archy-demo/web-dist/assets/MarketplaceAppDetails-DhlIl2UT.js

2 lines
21 KiB
JavaScript

import{o as P,A as U,r as b,j as v,d as O,y as $,z as K,c as i,a as e,J as p,D as o,E as n,n as G,h as J,i as Q,T as W,x as X,G as h,F as z,P as I,Q as Y,B as E,u as Z,q as a}from"./index-DnbYEqLr.js";import{u as ee}from"./useMarketplaceApp-BxXpq2aX.js";function te(){const f=b(72),l=v(()=>`${f.value+8}px`),j=v(()=>`bottom-[${f.value+8}px]`);let u=null,g=null,w=null;function x(){if(typeof window>"u")return;const s=document.querySelector("[data-mobile-tab-bar]");if(s&&s.offsetHeight>0){f.value=s.offsetHeight;return}const c=getComputedStyle(document.documentElement).getPropertyValue("--mobile-tab-bar-height").trim();if(c){const m=parseFloat(c);if(!isNaN(m)&&m>0){f.value=m;return}}}return P(()=>{x(),g=new MutationObserver(()=>{x()}),g.observe(document.documentElement,{attributes:!0,attributeFilter:["style"]});const s=document.querySelector("[data-mobile-tab-bar]");s&&"ResizeObserver"in window&&(u=new ResizeObserver(()=>{x()}),u.observe(s)),window.addEventListener("resize",x),w=setInterval(()=>{x()},1e3)}),U(()=>{g&&g.disconnect(),u&&u.disconnect(),w&&clearInterval(w),window.removeEventListener("resize",x)}),{bottomPosition:l,bottomClass:j,tabBarHeight:f}}const se={class:"app-details-container pb-16 md:pb-16"},oe={key:"loading",class:"glass-card p-12 text-center"},le={class:"text-white/70"},ne={key:"content"},ie={class:"glass-card p-6 mb-6"},ae={class:"hidden md:flex items-center gap-6"},re=["src","alt"],de={key:1,class:"w-20 h-20 rounded-xl bg-white/10 flex items-center justify-center flex-shrink-0"},ce={class:"flex-1 min-w-0"},ue={class:"text-2xl font-bold text-white mb-1"},me={class:"text-white/70 text-sm mb-2"},pe={class:"flex items-center gap-2"},he={key:0,class:"inline-flex items-center px-2.5 py-1 rounded-lg text-xs font-medium bg-green-500/20 text-green-200 border border-green-500/30"},ve={class:"text-white/50 text-xs"},xe={class:"flex items-center gap-2 flex-shrink-0"},ke=["disabled"],fe={key:0,class:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},ge={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},we={class:"md:hidden"},be={class:"grid grid-cols-[80px_1fr] gap-4 mb-4"},_e=["src","alt"],ye={key:1,class:"w-20 h-20 rounded-xl bg-white/10 flex items-center justify-center"},Ce={class:"min-w-0"},De={class:"text-xl font-bold text-white mb-1"},Me={class:"text-white/70 text-xs mb-2 line-clamp-2"},Be={class:"flex flex-wrap items-center gap-2"},je={key:0,class:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-500/20 text-green-200 border border-green-500/30"},ze={class:"text-white/50 text-xs"},Ie={class:"grid grid-cols-2 gap-2"},Ee=["disabled"],Ve={key:0,class:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Ae={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},He={key:0,class:"mt-4 p-3 bg-red-500/20 border border-red-500/40 rounded-lg"},Se={class:"flex items-start gap-2"},Te={class:"flex-1"},Le={class:"text-red-200 font-medium text-sm"},Pe={class:"text-red-300 text-xs mt-1"},Ue={key:0,class:"hidden md:block mt-4 p-4 bg-red-500/20 border border-red-500/40 rounded-lg"},Fe={class:"flex items-start gap-3"},Ne={class:"flex-1"},Re={class:"text-red-200 font-medium"},qe={class:"text-red-300 text-sm mt-1"},Oe={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},$e={class:"lg:col-span-2 space-y-6"},Ke={class:"glass-card p-6"},Ge={class:"text-2xl font-bold text-white mb-4"},Je={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Qe={class:"text-white/60 text-sm mt-3 text-center"},We={class:"glass-card p-6"},Xe={class:"text-2xl font-bold text-white mb-4"},Ye={class:"text-white/80 leading-relaxed whitespace-pre-line"},Ze={class:"glass-card p-6"},et={class:"text-2xl font-bold text-white mb-4"},tt={class:"space-y-3"},st={class:"space-y-6"},ot={class:"glass-card p-6"},lt={class:"text-lg font-bold text-white mb-4"},nt={class:"space-y-3"},it={class:"flex items-center justify-between py-2 border-b border-white/10"},at={class:"text-white/60 text-sm"},rt={class:"text-white font-medium"},dt={key:0,class:"flex items-center justify-between py-2 border-b border-white/10"},ct={class:"text-white/60 text-sm"},ut={class:"text-white font-medium"},mt={class:"flex items-center justify-between py-2 border-b border-white/10"},pt={class:"text-white/60 text-sm"},ht={class:"text-white font-medium"},vt={class:"flex items-center justify-between py-2 border-b border-white/10"},xt={class:"text-white/60 text-sm"},kt={class:"text-white font-medium capitalize"},ft={key:1,class:"flex items-center justify-between py-2"},gt={class:"glass-card p-6"},wt={class:"text-lg font-bold text-white mb-4"},bt={class:"space-y-3"},_t={key:0,class:"space-y-2 mb-4"},yt={key:0,class:"w-5 h-5 text-green-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ct={key:1,class:"w-5 h-5 text-yellow-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Dt={key:2,class:"w-5 h-5 text-red-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Mt={class:"flex-1"},Bt={class:"text-white/80 font-medium text-sm"},jt={class:"text-white/50 text-xs"},zt=["disabled"],It={key:0,class:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Et={key:1,class:"py-2 border-b border-white/10"},Vt={class:"text-white/60 text-sm"},At={class:"flex items-start gap-3"},Ht={class:"flex-1"},St={class:"text-white/80 font-medium"},Tt={class:"text-white/60 text-sm"},Lt={class:"flex items-start gap-3"},Pt={class:"flex-1"},Ut={class:"text-white/80 font-medium"},Ft={class:"text-white/60 text-sm"},Nt={key:0,class:"glass-card p-6"},Rt={class:"text-lg font-bold text-white mb-4"},qt={class:"space-y-2"},Ot=["href"],$t={key:"not-found",class:"glass-card p-12 text-center"},Kt={class:"text-2xl font-semibold text-white mb-2"},Gt={class:"text-white/70"},Wt=O({__name:"MarketplaceAppDetails",setup(f){const{t:l}=$(),{bottomPosition:j}=te(),u=X(),g=Z(),w=K(),{getCurrentApp:x}=ee(),s=b(null),c=b(!1),m=b(!1),k=b(null),D=b(!0),_=v(()=>g.params.id),V=v(()=>!!(s.value?.webUrl&&!s.value?.dockerImage)),y=v(()=>V.value?!0:!!w.packages[_.value]),A=v(()=>{try{if(!s.value)return"";const r=s.value.description;return typeof r=="object"&&r?r.short||r.long||"":r||""}catch{return""}}),F=v(()=>{try{if(!s.value)return"";const r=s.value.description;return typeof r=="object"&&r?r.long||r.short||"":r||""}catch{return""}}),N=v(()=>["Self-hosted and privacy-focused","Easy installation and updates","Automatic backups","Secure by default","Open source"]),R={electrumx:[{id:"bitcoin-knots",title:"Bitcoin Knots",dockerImage:"docker.io/bitcoinknots/bitcoin:latest"}],lnd:[{id:"bitcoin-knots",title:"Bitcoin Knots",dockerImage:"docker.io/bitcoinknots/bitcoin:latest"}],"btcpay-server":[{id:"bitcoin-knots",title:"Bitcoin Knots",dockerImage:"docker.io/bitcoinknots/bitcoin:latest"}],mempool:[{id:"bitcoin-knots",title:"Bitcoin Knots",dockerImage:"docker.io/bitcoinknots/bitcoin:latest"},{id:"electrumx",title:"ElectrumX",dockerImage:"docker.io/lukechilds/electrumx:v1.18.0"}],fedimint:[{id:"bitcoin-knots",title:"Bitcoin Knots",dockerImage:"docker.io/bitcoinknots/bitcoin:latest"}]},M=v(()=>{if(!s.value)return[];const r=R[s.value.id];return r?r.map(t=>{const d=w.packages[t.id];let B="missing";return d&&(B=d.state==="running"?"running":"stopped"),{...t,status:B}}):[]});let C=null;P(()=>{try{const r=x();r&&r.id===_.value?(s.value=r,D.value=!1):(D.value=!1,C=setTimeout(()=>{u.push("/dashboard/marketplace").catch(()=>{})},500))}catch{D.value=!1,C=setTimeout(()=>{u.push("/dashboard/marketplace").catch(()=>{})},500)}}),U(()=>{C&&(clearTimeout(C),C=null)});function H(r){const t=r.target;t.src="/assets/img/logo-archipelago.svg"}function S(){u.push("/dashboard/marketplace").catch(()=>{})}function T(){if(V.value&&s.value?.webUrl){Y().open({url:s.value.webUrl,title:s.value.title||_.value});return}u.push({path:`/dashboard/apps/${_.value}`,query:{from:"marketplace"}}).catch(()=>{})}async function q(){if(m.value)return;const r=M.value.filter(t=>t.status==="missing");if(r.length){m.value=!0,k.value=null;try{for(const t of r)await E.call({method:"package.install",params:{id:t.id,dockerImage:t.dockerImage},timeout:18e4}),await new Promise(d=>setTimeout(d,2e3))}catch(t){k.value=t instanceof Error?t.message:l("marketplaceDetails.installFailed")}finally{m.value=!1}}}async function L(){if(!(c.value||!s.value)&&!(!s.value.manifestUrl&&!s.value.dockerImage)){c.value=!0,k.value=null;try{if(s.value.dockerImage)await E.call({method:"package.install",params:{id:s.value.id,dockerImage:s.value.dockerImage,version:s.value.version},timeout:18e4});else{const r=s.value.url||s.value.manifestUrl;await E.call({method:"package.install",params:{id:s.value.id,url:r,version:s.value.version}})}await new Promise(r=>setTimeout(r,1e3)),u.push(`/dashboard/apps/${_.value}`).catch(()=>{})}catch(r){k.value=r instanceof Error?r.message:l("marketplaceDetails.installFailed")}finally{c.value=!1}}}return(r,t)=>(a(),i("div",se,[e("button",{onClick:S,class:"hidden md:flex mb-6 items-center gap-2 text-white/70 hover:text-white transition-colors"},[t[0]||(t[0]=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:"M15 19l-7-7 7-7"})],-1)),p(" "+o(n(l)("marketplaceDetails.backToStore")),1)]),e("button",{onClick:S,class:"md:hidden fixed left-4 right-4 z-40 glass-button px-6 py-3 rounded-lg font-medium shadow-2xl flex items-center justify-center gap-2",style:G({bottom:n(j),filter:"drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5))"})},[t[1]||(t[1]=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:"M15 19l-7-7 7-7"})],-1)),e("span",null,o(n(l)("marketplaceDetails.backToStore")),1)],4),J(W,{name:"content-fade",mode:"out-in"},{default:Q(()=>[D.value?(a(),i("div",oe,[t[2]||(t[2]=e("svg",{class:"animate-spin h-12 w-12 text-blue-400 mx-auto mb-4",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 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),e("p",le,o(n(l)("marketplaceDetails.loadingDetails")),1)])):s.value?(a(),i("div",ne,[e("div",ie,[e("div",ae,[s.value.icon?(a(),i("img",{key:0,src:s.value.icon,alt:s.value.title,class:"w-20 h-20 rounded-xl shadow-xl flex-shrink-0",onError:H},null,40,re)):(a(),i("div",de,[...t[3]||(t[3]=[e("svg",{class:"w-10 h-10 text-white/40",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"})],-1)])])),e("div",ce,[e("h1",ue,o(s.value.title),1),e("p",me,o(A.value),1),e("div",pe,[y.value?(a(),i("span",he,[t[4]||(t[4]=e("span",{class:"w-1.5 h-1.5 rounded-full bg-green-400 mr-1.5"},null,-1)),p(" "+o(n(l)("marketplaceDetails.installed")),1)])):h("",!0),e("span",ve,o(s.value.version?`v${s.value.version}`:"latest"),1)])]),e("div",xe,[y.value?(a(),i("button",{key:0,onClick:T,class:"glass-button glass-button-sm px-6 py-2.5 rounded-lg text-sm font-semibold flex items-center gap-2"},[t[5]||(t[5]=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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)),p(" "+o(n(l)("marketplaceDetails.open")),1)])):(a(),i("button",{key:1,onClick:L,disabled:c.value||!s.value.manifestUrl&&!s.value.dockerImage,class:"glass-button glass-button-sm px-6 py-2.5 rounded-lg text-sm font-semibold flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed"},[c.value?(a(),i("svg",fe,[...t[6]||(t[6]=[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 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(a(),i("svg",ge,[...t[7]||(t[7]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),p(" "+o(c.value?n(l)("common.installing"):n(l)("common.install")),1)],8,ke))])]),e("div",we,[e("div",be,[s.value.icon?(a(),i("img",{key:0,src:s.value.icon,alt:s.value.title,class:"w-20 h-20 rounded-xl shadow-xl",onError:H},null,40,_e)):(a(),i("div",ye,[...t[8]||(t[8]=[e("svg",{class:"w-10 h-10 text-white/40",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"})],-1)])])),e("div",Ce,[e("h1",De,o(s.value.title),1),e("p",Me,o(A.value),1),e("div",Be,[y.value?(a(),i("span",je,[t[9]||(t[9]=e("span",{class:"w-1.5 h-1.5 rounded-full bg-green-400 mr-1"},null,-1)),p(" "+o(n(l)("marketplaceDetails.installed")),1)])):h("",!0),e("span",ze,o(s.value.version?`v${s.value.version}`:"latest"),1)])])]),e("div",Ie,[y.value?(a(),i("button",{key:0,onClick:T,class:"glass-button glass-button-sm px-4 py-2.5 rounded-lg text-sm font-semibold flex items-center justify-center gap-2"},[t[10]||(t[10]=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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)),p(" "+o(n(l)("marketplaceDetails.open")),1)])):(a(),i("button",{key:1,onClick:L,disabled:c.value||!s.value.manifestUrl&&!s.value.dockerImage,class:"glass-button glass-button-sm px-4 py-2.5 rounded-lg text-sm font-semibold flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed col-span-2"},[c.value?(a(),i("svg",Ve,[...t[11]||(t[11]=[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 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(a(),i("svg",Ae,[...t[12]||(t[12]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),p(" "+o(c.value?n(l)("common.installing"):n(l)("common.install")),1)],8,Ee))]),k.value?(a(),i("div",He,[e("div",Se,[t[13]||(t[13]=e("svg",{class:"w-4 h-4 text-red-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e("div",Te,[e("p",Le,o(n(l)("marketplaceDetails.installFailed")),1),e("p",Pe,o(k.value),1)])])])):h("",!0)]),k.value?(a(),i("div",Ue,[e("div",Fe,[t[14]||(t[14]=e("svg",{class:"w-5 h-5 text-red-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e("div",Ne,[e("p",Re,o(n(l)("marketplaceDetails.installFailed")),1),e("p",qe,o(k.value),1)])])])):h("",!0)]),e("div",Oe,[e("div",$e,[e("div",Ke,[e("h2",Ge,o(n(l)("marketplaceDetails.screenshots")),1),e("div",Je,[(a(),i(z,null,I(4,d=>e("div",{key:d,class:"aspect-video rounded-xl bg-white/5 border border-white/10 flex items-center justify-center hover:bg-white/10 transition-colors cursor-pointer"},[...t[15]||(t[15]=[e("svg",{class:"w-16 h-16 text-white/20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)])])),64))]),e("p",Qe,o(n(l)("marketplaceDetails.screenshotPlaceholder")),1)]),e("div",We,[e("h2",Xe,o(n(l)("marketplaceDetails.about",{name:s.value.title})),1),e("p",Ye,o(F.value),1)]),e("div",Ze,[e("h2",et,o(n(l)("marketplaceDetails.features")),1),e("ul",tt,[(a(!0),i(z,null,I(N.value,(d,B)=>(a(),i("li",{key:B,class:"flex items-start gap-3 text-white/80"},[t[16]||(t[16]=e("svg",{class:"w-6 h-6 text-green-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e("span",null,o(d),1)]))),128))])])]),e("div",st,[e("div",ot,[e("h3",lt,o(n(l)("marketplaceDetails.information")),1),e("div",nt,[e("div",it,[e("span",at,o(n(l)("common.version")),1),e("span",rt,o(s.value.version||"latest"),1)]),s.value.author?(a(),i("div",dt,[e("span",ct,o(n(l)("common.developer")),1),e("span",ut,o(s.value.author),1)])):h("",!0),e("div",mt,[e("span",pt,o(n(l)("common.status")),1),e("span",ht,o(y.value?n(l)("marketplaceDetails.installed"):n(l)("marketplaceDetails.notInstalled")),1)]),e("div",vt,[e("span",xt,o(n(l)("common.category")),1),e("span",kt,o(s.value.category||"App"),1)]),s.value.manifestUrl?(a(),i("div",ft,[...t[17]||(t[17]=[e("span",{class:"text-white/60 text-sm"},"Package",-1),e("span",{class:"text-white font-medium text-xs"},".s9pk",-1)])])):h("",!0)])]),e("div",gt,[e("h3",wt,o(n(l)("marketplaceDetails.requirements")),1),e("div",bt,[M.value.length>0?(a(),i("div",_t,[(a(!0),i(z,null,I(M.value,d=>(a(),i("div",{key:d.id,class:"flex items-center gap-3 py-2 border-b border-white/10"},[d.status==="running"?(a(),i("svg",yt,[...t[18]||(t[18]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])):d.status==="stopped"?(a(),i("svg",Ct,[...t[19]||(t[19]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1)])])):(a(),i("svg",Dt,[...t[20]||(t[20]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])),e("div",Mt,[e("p",Bt,o(d.title),1),e("p",jt,o(d.status==="running"?n(l)("marketplaceDetails.depRunning"):d.status==="stopped"?n(l)("marketplaceDetails.depStopped"):n(l)("marketplaceDetails.depNotInstalled")),1)])]))),128)),M.value.some(d=>d.status==="missing")?(a(),i("button",{key:0,onClick:q,disabled:m.value,class:"glass-button w-full mt-3 px-4 py-2 rounded-lg text-sm font-medium flex items-center justify-center gap-2"},[m.value?(a(),i("svg",It,[...t[21]||(t[21]=[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 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):h("",!0),p(" "+o(m.value?n(l)("common.installing"):n(l)("marketplaceDetails.installRequirements")),1)],8,zt)):h("",!0)])):(a(),i("div",Et,[e("p",Vt,o(n(l)("marketplaceDetails.noRequirements")),1)])),e("div",At,[t[22]||(t[22]=e("svg",{class:"w-5 h-5 text-blue-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"})],-1)),e("div",Ht,[e("p",St,o(n(l)("appDetails.ram")),1),e("p",Tt,o(n(l)("appDetails.ramDesc")),1)])]),e("div",Lt,[t[23]||(t[23]=e("svg",{class:"w-5 h-5 text-purple-400 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"})],-1)),e("div",Pt,[e("p",Ut,o(n(l)("appDetails.storage")),1),e("p",Ft,o(n(l)("appDetails.storageDesc")),1)])])])]),s.value.manifestUrl?(a(),i("div",Nt,[e("h3",Rt,o(n(l)("marketplaceDetails.links")),1),e("div",qt,[e("a",{href:s.value.manifestUrl,target:"_blank",rel:"noopener noreferrer",class:"flex items-center gap-2 text-blue-400 hover:text-blue-300 transition-colors"},[t[24]||(t[24]=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:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)),p(" "+o(n(l)("marketplaceDetails.downloadPackage")),1)],8,Ot)])])):h("",!0)])])])):(a(),i("div",$t,[t[25]||(t[25]=e("svg",{class:"w-24 h-24 text-white/20 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e("h3",Kt,o(n(l)("marketplaceDetails.notFoundTitle")),1),e("p",Gt,o(n(l)("marketplaceDetails.notFoundMessage")),1)]))]),_:1})]))}});export{Wt as default};