import{aJ as S,b as R}from"./vendor-ui-CGT0cG1n.js";import{m as t,B as L,u as c}from"./index-D88CvPWT.js";import{v as A,aA as k,aD as b,aC as U,ac as p,aF as E,a9 as $,aP as x,ax as n,ab as Y,l as K,r as m,aO as B,y as F,af as N,g as l,ao as V,Y as H}from"./vendor-core-BKehvho7.js";import{u as Q}from"./useTeamHeaders-DxHN7-t0.js";import{c as q,a as z}from"./index.vue_vue_type_script_setup_true_lang-CmmAEEXC.js";import{c as G}from"./useCompEditStore-DhXxYAqN.js";import{_ as J}from"./index.vue_vue_type_style_index_0_lang-BipgSalp.js";import{u as W}from"./useKeyword-CjhhChz4.js";import"./index-B9hCLAJk.js";import"./useCompMetaLocalStore-BKTMp_k8.js";import"./useCacheOssStore-OAoLDVbw.js";import"./useVscodeOpen-BBdyQ3W2.js";/* empty css                */import"./BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js";import"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js";import"./useMessage-Cbhfk7Nk.js";/* empty css                */import"./v4-EwEgHOG0.js";import"./index.vue_vue_type_style_index_0_lang-BZ1LzI3x.js";import"./core-CcVTMiBP.js";import"./PanelBackground.vue_vue_type_script_setup_true_lang-BELCrrRh.js";import"./BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js";const j={class:"size-full"},Ie=A({__name:"index",setup(X){const{t:u}=k(),h=F(),C=b(),d=U(),{headers:_,teamId:T}=Q(),o=q(`${d.path}_${t.SCOPE_ID_TEAM_MY_COMP_LIST}`)();p(t.PROVIDE_KEY_COMP_LIST_STORE,o);const g=G(`${d.path}_${t.SCOPE_ID_TEAM_MY_COMP_UPDATE}`,t.DIALOG_TYPE_EDIT)();p(t.PROVIDE_KEY_COMP_EDIT_STORE,g);const f=new Map;p(t.PROVIDE_KEY_CALLBACKS,f);const y=E("compUpdateDialog"),I=E("compIframeContainer"),s=N({data:[],search:{column:[{prop:"keyword",component:V(R),label:l(()=>u("common.keyword")),value:"",autoQuery:!1,attributes:{placeholder:l(()=>u("comp.keywordPlaceholder")),fetchSuggestions:v,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}}]},pagination:{total:0},fixedHeight:!1,autoLoading:!1,fetchData:O}),w=l(()=>s.value?.search?.column[0]?.value??"");W(w,I);function v(e,a){if(e.length<=1)return a([]);c.v1Keyword.keywordcontrollerQuerykeywordscomp({keyword:e,type:"compTeamMy"},{headers:_}).then(r=>{const{keywords:i=[]}=r.data||{};a(i)})}async function O(e){o.renderList([]),await H(),o.setLoading(!0);const a=await c.v1Team.teamcontrollerMyteamcomps({...e},{headers:_}),{rows:r,total:i}=a.data??{};o.renderList(r??[]),s.value.pagination.total=i??0}function D(e){C.push({path:`/previewTeam/${T}/${e}`})}async function M(e){y.value?.open(e)}function P(e){c.v1Comp.compcontrollerCompdetail({compId:e}).then(a=>{o.updateCompListItemById(e,a.data)})}return f.set(t.COMP_METHOD_KEY_AFTER_COMP_DEL,()=>{s.value.pagination.total--}),$(()=>{o.$reset()}),(e,a)=>{const r=S;return x((Y(),K("div",j,[m(n(L),{tableConfig:s.value,border:""},{table:B(()=>[m(z,{ref:"compIframeContainer",iuid:n(h)?.uid,compType:n(t).IFRAME_ROUTES.CONTAINER.TEAM_MINE,onPreview:D,onUpdate:M},null,8,["iuid","compType"])]),_:1},8,["tableConfig"]),m(J,{ref:"compUpdateDialog",onUpdateSuccess:P},null,512)])),[[r,n(o).loading]])}}});export{Ie as default};
