import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import"./vendor-primevue-7po8Zk9v.js";import"./vendor-firebase-CdLSXhbt.js";import{$ as t,A as n,Bt as r,D as i,E as a,F as o,Ft as s,K as c,L as l,O as u,P as d,ft as f,ht as p,k as m}from"./vendor-vue-core-D3IvUUeM.js";import"./vendor-other-CrvBxfcV.js";import{t as h}from"./types-0oh-UGWL.js";import"./remoteConfig-CNDr9CtS.js";import{Ot as g}from"./api-3C7_IVZO.js";import"./colorUtil-C83P1Arv.js";import{n as _}from"./vendor-i18n-CsAN_zFP.js";import"./i18n-DjEVEIh2.js";import"./useErrorHandling-CBX3YQ5l.js";import"./vendor-reka-ui-Bm3o_ZTf.js";import{t as v}from"./Button-mG8zDgxj.js";import"./dialogService-BC0EXJA5.js";import"./systemStatsStore-gvlzOl4W.js";import{t as y}from"./dialogStore-BbHfkjRE.js";import"./useCopyToClipboard-CUuoo5Dm.js";import"./vendor-tiptap-DsZVujQD.js";import"./vendor-markdown-yjaB1jgA.js";import"./markdownRendererUtil-D5cHPoK2.js";import{a as b,d as x,n as S,o as C,s as w}from"./useConflictDetection-CvlLd6TS.js";import"./useExternalLink-BZoBzmNd.js";var T={key:0,class:`flex w-full items-center justify-between gap-2 py-2 px-4`},E={key:1,class:`flex justify-end gap-1 py-2 px-4`},D=l({__name:`MissingNodesFooter`,setup(e){let l=y(),{t:D}=_(),handleGotItClick=()=>{l.closeDialog({key:`global-missing-nodes`})},{missingNodePacks:O,isLoading:k,error:A}=C(),j=S(),M=b(),N=a(()=>O.value?.length?O.value.some(e=>j.isPackInstalling(e.id)):!1),P=a(()=>M.shouldShowManagerButtons.value),F=a(()=>M.shouldShowInstallButton.value),openManager=async()=>{await M.openManager({initialTab:w.Missing,showToastOnLegacyError:!0})};return f(a(()=>!k.value&&!N.value&&O.value?.length===0),async e=>{!h&&e&&F.value&&(await c(),l.closeDialog({key:`global-missing-nodes`}),g().add({severity:`success`,summary:D(`g.success`),detail:D(`manager.allMissingNodesInstalled`),life:3e3}))}),(e,a)=>s(h)?(t(),n(`div`,T,[o(v,{variant:`textonly`,size:`sm`,as:`a`,href:`https://www.comfy.org/cloud`,target:`_blank`,rel:`noopener noreferrer`},{default:p(()=>[a[0]||=i(`i`,{class:`icon-[lucide--info]`},null,-1),i(`span`,null,r(e.$t(`missingNodes.cloud.learnMore`)),1)]),_:1}),o(v,{variant:`secondary`,size:`md`,onClick:handleGotItClick},{default:p(()=>[d(r(e.$t(`missingNodes.cloud.gotIt`)),1)]),_:1})])):P.value?(t(),n(`div`,E,[o(v,{variant:`textonly`,onClick:openManager},{default:p(()=>[d(r(e.$t(`g.openManager`)),1)]),_:1}),F.value?(t(),u(x,{key:0,type:`secondary`,size:`md`,disabled:s(k)||!!s(A)||s(O).length===0||N.value,"is-loading":s(k),"node-packs":s(O),label:s(k)?e.$t(`manager.gettingInfo`):e.$t(`manager.installAllMissingNodes`)},null,8,[`disabled`,`is-loading`,`node-packs`,`label`])):m(``,!0)])):m(``,!0)}});export{D as default};
//# sourceMappingURL=MissingNodesFooter-BjAGrbjq.js.map