import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{ct as t}from"./vendor-primevue-DOcVZxnt.js";import"./vendor-firebase-yTFzdAQf.js";import{A as n,D as r,It as i,O as a,R as o,Rt as s,S as c,Vt as l,et as u,gt as d,j as f,k as p,nt as m}from"./vendor-vue-core-CvBSzfTV.js";import{E as h}from"./vendor-other-ZVm7XS8K.js";import{t as g}from"./types-Bc3W4AWd.js";import"./useFeatureFlags-CMK9o9Rw.js";import"./api-OgmjiUkn.js";import"./colorUtil-C9tyO6rZ.js";import"./i18n-S80A-Sy1.js";import"./vendor-reka-ui-EFkcZtPy.js";import"./Button-C-kbn1lh.js";import"./dialogService-Dp405gae.js";import{t as _}from"./systemStatsStore-BAnEcJS2.js";import"./useErrorHandling-DfKSzlg9.js";import"./dialogStore-BDXSs8Ic.js";import"./userStore-C5cqCkur.js";import"./useCopyToClipboard-_eFTtqIy.js";import"./vendor-tiptap-BZCaYoPl.js";import"./vendor-markdown-Gcn_JH9N.js";import"./markdownRendererUtil-BD0lrBqH.js";import"./useExternalLink-CZSEXO8Q.js";import{o as v}from"./useConflictDetection-BhlqIkng.js";var y=h(),b={class:`flex flex-col gap-2`},x={class:`text-sm font-medium text-surface-600`},S={class:`ml-4 text-sm text-surface-500`},C=o({__name:`MissingCoreNodesMessage`,props:{missingCoreNodes:{}},setup(e){let o=_(),s=r(()=>Object.keys(e.missingCoreNodes).length>0),h=r(()=>s.value?o.systemStats?.system?.comfyui_version??null:null),g=r(()=>Object.entries(e.missingCoreNodes).sort(([e],[t])=>(0,y.compare)(t,e))),getUniqueNodeNames=e=>e.reduce((e,t)=>(t.type&&!e.includes(t.type)&&e.push(t.type),e),[]).sort();return(e,r)=>s.value?(u(),p(i(t),{key:0,severity:`info`,icon:`pi pi-info-circle`,class:`mx-2 my-2`,pt:{root:{class:`flex-col`},text:{class:`flex-1`}}},{default:d(()=>[a(`div`,b,[a(`div`,null,l(h.value?e.$t(`loadWorkflowWarning.outdatedVersion`,{version:h.value}):e.$t(`loadWorkflowWarning.outdatedVersionGeneric`)),1),(u(!0),f(c,null,m(g.value,([t,n])=>(u(),f(`div`,{key:t,class:`ml-4`},[a(`div`,x,l(e.$t(`loadWorkflowWarning.coreNodesFromVersion`,{version:t||`unknown`})),1),a(`div`,S,l(getUniqueNodeNames(n).join(`, `)),1)]))),128))])]),_:1})):n(``,!0)}}),w={class:`flex h-full w-full flex-col gap-4 p-4`},T={class:`m-0 text-sm leading-4 text-muted-foreground`},E={class:`comfy-missing-nodes flex flex-col max-h-[256px] rounded-lg py-2 scrollbar-custom bg-secondary-background`},D={class:`text-xs`},O={key:0,class:`text-xs`},k={class:`m-0 text-sm leading-4 text-muted-foreground`},A=o({__name:`MissingNodesContent`,props:{missingNodeTypes:{}},setup(e){let t=e,{missingCoreNodes:o}=v(),d=r(()=>{let e=new Set;return t.missingNodeTypes.filter(t=>{let n=typeof t==`object`?t.type:t;return e.has(n)?!1:(e.add(n),!0)}).map(e=>typeof e==`object`?{label:e.type,hint:e.hint,action:e.action}:{label:e})});return(e,t)=>(u(),f(`div`,{class:s([`flex w-[490px] flex-col border-t-1 border-border-default`,i(g)?`border-b-1`:``])},[a(`div`,w,[a(`div`,null,[a(`p`,T,l(i(g)?e.$t(`missingNodes.cloud.description`):e.$t(`missingNodes.oss.description`)),1)]),i(g)?n(``,!0):(u(),p(C,{key:0,"missing-core-nodes":i(o)},null,8,[`missing-core-nodes`])),a(`div`,E,[(u(!0),f(c,null,m(d.value,(e,t)=>(u(),f(`div`,{key:t,class:`flex min-h-8 items-center justify-between px-4 py-2 bg-secondary-background text-muted-foreground`},[a(`span`,D,l(e.label),1),e.hint?(u(),f(`span`,O,l(e.hint),1)):n(``,!0)]))),128))]),a(`div`,null,[a(`p`,k,l(i(g)?e.$t(`missingNodes.cloud.replacementInstruction`):e.$t(`missingNodes.oss.replacementInstruction`)),1)])])],2))}});export{A as default};
//# sourceMappingURL=MissingNodesContent-Qnwsd3J_.js.map