import{t as e}from"./jsx-runtime-CiQ1k8xo.js";import{lt as t}from"./vscode-api-DjORcpSo.js";import{o as n,r}from"./lib-MoKmYgcO.js";import{t as i}from"./button-Bi7lGVi1.js";import{a,d as o,i as s,l as c,n as l,r as u}from"./dialog-layout-CJEsoqFP.js";var d=t(),f=e(),p=r({disable:{id:`plugins.card.uninstallConfirm.disable`,defaultMessage:`Disable plugin`,description:`Disable button label for the plugin remove dialog`},confirmTitle:{id:`plugins.card.uninstallConfirm.title`,defaultMessage:`Uninstall {name} plugin?`,description:`Title for the plugin uninstall confirmation dialog`},removeTitle:{id:`plugins.detail.removeDialog.title`,defaultMessage:`Remove {name} plugin from Codex`,description:`Title for the plugin remove dialog on the detail page`},confirmDescription:{id:`plugins.card.uninstallConfirm.description`,defaultMessage:`This will uninstall the plugin, but it will not uninstall any bundled apps.`,description:`Description for the plugin uninstall confirmation dialog`},removeDescription:{id:`plugins.detail.removeDialog.description`,defaultMessage:`This removes the plugin from Codex. Bundled apps will remain installed.`,description:`Description for the plugin remove dialog on the detail page`},cancel:{id:`plugins.card.uninstallConfirm.cancel`,defaultMessage:`Cancel`,description:`Cancel button label for the plugin uninstall dialog`},confirm:{id:`plugins.card.uninstallConfirm.confirm`,defaultMessage:`Uninstall`,description:`Confirm button label for the plugin uninstall dialog`},removeConfirm:{id:`plugins.detail.removeDialog.confirm`,defaultMessage:`Remove from Codex`,description:`Confirm button label for the plugin remove dialog on the detail page`}});function m(e){let t=(0,d.c)(39),{dialogMode:r,isDisabling:m,isUninstalling:h,onDisable:g,onConfirm:_,onOpenChange:v,open:y,pluginDisplayName:b}=e,x=(r===void 0?`card`:r)===`detail`,S;t[0]!==b||t[1]!==x?(S=x?(0,f.jsx)(n,{...p.removeTitle,values:{name:(0,f.jsx)(`strong`,{className:`font-semibold text-token-text-primary`,children:b},`plugin-name`)}}):(0,f.jsx)(n,{...p.confirmTitle,values:{name:(0,f.jsx)(`strong`,{className:`font-semibold text-token-text-primary`,children:b},`plugin-name`)}}),t[0]=b,t[1]=x,t[2]=S):S=t[2];let C=S,w;t[3]===x?w=t[4]:(w=x?(0,f.jsx)(n,{...p.removeDescription}):(0,f.jsx)(n,{...p.confirmDescription}),t[3]=x,t[4]=w);let T=w,E;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(E={"aria-describedby":void 0},t[5]=E):E=t[5];let D;t[6]===C?D=t[7]:(D=(0,f.jsx)(o,{className:`sr-only`,children:C}),t[6]=C,t[7]=D);let O;t[8]!==T||t[9]!==C?(O=(0,f.jsx)(a,{children:(0,f.jsx)(s,{title:C,subtitle:T,subtitleClassName:`mt-2`})}),t[8]=T,t[9]=C,t[10]=O):O=t[10];let k;t[11]===v?k=t[12]:(k=()=>{v(!1)},t[11]=v,t[12]=k);let A;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,f.jsx)(n,{...p.cancel}),t[13]=A):A=t[13];let j;t[14]===k?j=t[15]:(j=(0,f.jsx)(i,{color:`outline`,onClick:k,children:A}),t[14]=k,t[15]=j);let M;t[16]!==m||t[17]!==g?(M=g==null?null:(0,f.jsx)(i,{color:`outline`,loading:m??!1,onClick:()=>{g()},children:(0,f.jsx)(n,{...p.disable})}),t[16]=m,t[17]=g,t[18]=M):M=t[18];let N;t[19]===_?N=t[20]:(N=()=>{_()},t[19]=_,t[20]=N);let P=x?p.removeConfirm:p.confirm,F;t[21]===P?F=t[22]:(F=(0,f.jsx)(n,{...P}),t[21]=P,t[22]=F);let I;t[23]!==h||t[24]!==N||t[25]!==F?(I=(0,f.jsx)(i,{color:`danger`,loading:h,onClick:N,children:F}),t[23]=h,t[24]=N,t[25]=F,t[26]=I):I=t[26];let L;t[27]!==M||t[28]!==I||t[29]!==j?(L=(0,f.jsx)(a,{children:(0,f.jsxs)(u,{children:[j,M,I]})}),t[27]=M,t[28]=I,t[29]=j,t[30]=L):L=t[30];let R;t[31]!==L||t[32]!==D||t[33]!==O?(R=(0,f.jsxs)(l,{children:[D,O,L]}),t[31]=L,t[32]=D,t[33]=O,t[34]=R):R=t[34];let z;return t[35]!==v||t[36]!==y||t[37]!==R?(z=(0,f.jsx)(c,{open:y,contentProps:E,onOpenChange:v,children:R}),t[35]=v,t[36]=y,t[37]=R,t[38]=z):z=t[38],z}export{m as t};
//# sourceMappingURL=plugin-uninstall-dialog-BntAK-9X.js.map