import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{pt as t}from"./vendor-primevue-7po8Zk9v.js";import"./vendor-firebase-CdLSXhbt.js";import{$ as n,A as r,Bt as i,D as a,Et as o,F as s,L as c,P as l,ht as u}from"./vendor-vue-core-D3IvUUeM.js";import"./vendor-other-CrvBxfcV.js";import"./types-0oh-UGWL.js";import"./remoteConfig-CNDr9CtS.js";import"./api-3C7_IVZO.js";import"./colorUtil-C83P1Arv.js";import{n as d}from"./vendor-i18n-CsAN_zFP.js";import"./i18n-DjEVEIh2.js";import"./useErrorHandling-CBX3YQ5l.js";import"./vendor-reka-ui-Bm3o_ZTf.js";import{t as f}from"./Button-mG8zDgxj.js";import"./dialogService-BC0EXJA5.js";import"./systemStatsStore-gvlzOl4W.js";import{t as p}from"./dialogStore-BbHfkjRE.js";import"./useCopyToClipboard-CUuoo5Dm.js";import"./vendor-tiptap-DsZVujQD.js";import"./vendor-markdown-yjaB1jgA.js";import"./markdownRendererUtil-D5cHPoK2.js";import{t as m}from"./teamWorkspaceStore-BvhKZUrb.js";var h={class:`flex w-full max-w-[360px] flex-col rounded-2xl border border-border-default bg-base-background`},g={class:`flex h-12 items-center justify-between border-b border-border-default px-4`},_={class:`m-0 text-sm font-normal text-base-foreground`},v=[`aria-label`],y={class:`px-4 py-4`},b={class:`m-0 text-sm text-muted-foreground`},x={class:`flex items-center justify-end gap-4 px-4 py-4`},S=c({__name:`LeaveWorkspaceDialogContent`,setup(e){let{t:c}=d(),S=t(),C=p(),w=m(),T=o(!1);function onCancel(){C.closeDialog({key:`leave-workspace`})}async function onLeave(){T.value=!0;try{await w.leaveWorkspace(),C.closeDialog({key:`leave-workspace`}),window.location.reload()}catch(e){console.error(`[LeaveWorkspaceDialog] Failed to leave workspace:`,e),S.add({severity:`error`,summary:c(`workspacePanel.toast.failedToLeaveWorkspace`),detail:e instanceof Error?e.message:c(`g.unknownError`),life:5e3})}finally{T.value=!1}}return(e,t)=>(n(),r(`div`,h,[a(`div`,g,[a(`h2`,_,i(e.$t(`workspacePanel.leaveDialog.title`)),1),a(`button`,{class:`cursor-pointer rounded border-none bg-transparent p-0 text-muted-foreground transition-colors hover:text-base-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-secondary-foreground`,"aria-label":e.$t(`g.close`),onClick:onCancel},t[0]||=[a(`i`,{class:`pi pi-times size-4`},null,-1)],8,v)]),a(`div`,y,[a(`p`,b,i(e.$t(`workspacePanel.leaveDialog.message`)),1)]),a(`div`,x,[s(f,{variant:`muted-textonly`,onClick:onCancel},{default:u(()=>[l(i(e.$t(`g.cancel`)),1)]),_:1}),s(f,{variant:`destructive`,size:`lg`,loading:T.value,onClick:onLeave},{default:u(()=>[l(i(e.$t(`workspacePanel.leaveDialog.leave`)),1)]),_:1},8,[`loading`])])]))}});export{S as default};
//# sourceMappingURL=LeaveWorkspaceDialogContent-DFxdqaeN.js.map