import{aJ as S,b as R}from"./vendor-ui-DXwyveTF.js";import{E as t,B as L,s as c}from"./index-B5qe6yln.js";import{v as A,aA as b,aD as k,aC as U,ac as p,aF as E,a9 as $,aP as x,ax as n,ab as K,l as Y,r as m,aO as B,y as F,af as N,g as l,ao as V}from"./vendor-core-CzvSW5ae.js";import{u as H}from"./useTeamHeaders-Cc060CP0.js";import{c as Q,a as q}from"./index.vue_vue_type_script_setup_true_lang-D3xHCy9f.js";import{c as z}from"./useCompEditStore-KBTFiinR.js";import{_ as G}from"./index.vue_vue_type_style_index_0_lang-DQhqVyhA.js";import{u as J}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"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-CofI0Rvq.js";import"./useMessage-CYVXvlqq.js";/* empty css                */import"./v4-EwEgHOG0.js";import"./index.vue_vue_type_style_index_0_lang-BQWxY2F1.js";import"./core-B1GcTOER.js";import"./PanelBackground.vue_vue_type_script_setup_true_lang-DBIlZFl0.js";import"./BaseSegmented.vue_vue_type_script_setup_true_lang-CW16Y3Jx.js";import"./LoadingWrapper.vue_vue_type_script_setup_true_lang-bBtkKtmz.js";const W={class:"size-full"},ye=A({__name:"index",setup(j){const{t:u}=b(),h=F(),C=k(),d=U(),{headers:_,teamId:g}=H(),o=Q(`${d.path}_${t.SCOPE_ID_TEAM_MY_COMP_LIST}`)();p(t.PROVIDE_KEY_COMP_LIST_STORE,o);const T=z(`${d.path}_${t.SCOPE_ID_TEAM_MY_COMP_UPDATE}`,t.DIALOG_TYPE_EDIT)();p(t.PROVIDE_KEY_COMP_EDIT_STORE,T);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:w,triggerOnFocus:!1,style:"width: 400px",fitInputWidth:!0}}]},pagination:{total:0},fixedHeight:!1,autoLoading:!1,fetchData:O}),v=l(()=>s.value?.search?.column[0]?.value??"");J(v,I);function w(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.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,o.setLoading(!1)}function D(e){C.push({path:`/previewTeam/${g}/${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((K(),Y("div",W,[m(n(L),{tableConfig:s.value,border:""},{table:B(()=>[m(q,{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(G,{ref:"compUpdateDialog",onUpdateSuccess:P},null,512)])),[[r,n(o).loading]])}}});export{ye as default};
