import{aJ as L,U as O,b}from"./vendor-ui-DXwyveTF.js";import{E as r,B as I,s as u}from"./index-B5qe6yln.js";import{c as R,a as T}from"./index.vue_vue_type_script_setup_true_lang-D3xHCy9f.js";import{v as k,aA as S,y as P,aC as A,aD as x,ac as d,aF as M,a9 as B,aP as D,ax as n,ab as K,l as F,r as c,aO as f,af as N,g as l,ao as z}from"./vendor-core-CzvSW5ae.js";import{u as U}from"./useKeyword-CoagiMo1.js";import"./index-CEQStqDa.js";import"./useCompMetaLocalStore-eE-CBcE9.js";/* empty css                */import"./useVscodeOpen-Dx3IRL0P.js";import"./BaseDialog.vue_vue_type_script_setup_true_lang-CgV6_zzd.js";import"./useCacheOssStore-DApHt9lQ.js";import"./useTeamHeaders-Cc060CP0.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-CofI0Rvq.js";import"./useMessage-CYVXvlqq.js";const V={class:"size-full p-[10px]"},se=k({__name:"index",setup(Y){const{t:p}=S(),_=P()?.uid,C=A(),h=x(),o=R(C.path)();d(r.PROVIDE_KEY_COMP_LIST_STORE,o);const m=new Map;d(r.PROVIDE_KEY_CALLBACKS,m);const y=M("compIframeContainer"),i=N({data:[],search:{column:[{prop:"keyword",component:z(b),label:l(()=>p("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:l(()=>p("comp.keywordPlaceholder")),fetchSuggestions:g,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}}]},pagination:{total:0,attributes:{pageSizes:[10,20,30]}},autoLoading:!1,fetchData:w}),E=l(()=>i.value?.search?.column[0]?.value??"");U(E,y);function g(e,t){if(e.length<=1)return t([]);u.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compMyCollect"}).then(a=>{const{keywords:s=[]}=a.data||{};t(s)})}async function w(e){o.setLoading(!0);const t=await u.v1Comp.compcontrollerCollectedcomps(e),{rows:a,total:s}=t.data??{};o.renderList(a??[]),i.value.pagination.total=s??0,o.setLoading(!1)}function v(e){h.push({path:`/preview/${e}`})}return m.set(r.COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT,e=>{o.delCompListById(e)}),B(()=>{o.$reset()}),(e,t)=>{const a=O,s=L;return D((K(),F("div",V,[c(n(I),{tableConfig:i.value},{table:f(()=>[c(a,{class:"size-full"},{default:f(()=>[c(T,{ref:"compIframeContainer",iuid:n(_),compType:n(r).IFRAME_ROUTES.CONTAINER.COLLECT,onPreview:v},null,8,["iuid","compType"])]),_:1})]),_:1},8,["tableConfig"])])),[[s,n(o).loading]])}}});export{se as default};
