import{$ as e,C as t,E as n,H as r,Ht as i,I as a,Lt as o,Q as s,R as c,W as l,_ as u,b as d,f,l as p,ut as m,v as h,w as g,y as _}from"./vue.runtime.esm-bundler-56z_v_HH.js";import{a as v}from"./vue-router-_izWfDzq.js";import{n as y,t as b}from"./use-installation-feedback-D_coaJTi.js";import{t as x}from"./RequirementBadge-f240IJZH.js";var S={key:0,class:`w-full overflow-hidden rounded-lg border border-line-default divide-y divide-line-default`},C={key:1,class:`w-full overflow-hidden rounded-lg border border-line-default divide-y divide-line-default`},w={class:`text-sm text-body font-mono`},T={class:`flex items-center gap-2 text-sm text-muted`},E={class:`font-medium`},D={class:`mt-8 flex justify-end`},O=n({__name:`PermissionsView`,setup(n){let O=v(),{showRequestError:k}=b(),A=m(!1),j=m(!1),M=m([]);a(()=>{N()});async function N(){A.value=!0;try{let{data:e}=await y.get(`/api/v1/installation/permissions`);M.value=e.permissions?.permissions??[]}catch(e){k(e)}finally{A.value=!1}}async function P(){j.value=!0;try{await O.push({name:`installation.database`})}finally{j.value=!1}}return(n,a)=>{let m=l(`BaseContentPlaceholdersText`),v=l(`BaseContentPlaceholders`),y=l(`BaseIcon`),b=l(`BaseButton`),O=l(`BaseWizardStep`);return c(),h(O,{title:n.$t(`wizard.permissions.permissions`),description:n.$t(`wizard.permissions.permission_desc`)},{default:s(()=>[A.value?(c(),d(`div`,S,[(c(),d(f,null,r(3,e=>u(`div`,{key:e,class:`flex items-center justify-between px-4 py-3`},[g(v,null,{default:s(()=>[g(m,{lines:1,class:`w-32`})]),_:1}),a[0]||=u(`div`,{class:`h-6 w-6 rounded-full bg-surface-tertiary animate-pulse`},null,-1)])),64))])):M.value.length?(c(),d(`div`,C,[(c(!0),d(f,null,r(M.value,(e,t)=>(c(),d(`div`,{key:t,class:`flex items-center justify-between px-4 py-3 hover:bg-hover transition-colors`},[u(`span`,w,i(e.folder),1),u(`span`,T,[u(`span`,E,i(e.permission),1),g(x,{ok:e.isSet},null,8,[`ok`])])]))),128))])):_(``,!0),u(`div`,D,[e(g(b,{loading:j.value,disabled:j.value,onClick:P},{right:s(e=>[g(y,{name:`ArrowRightIcon`,class:o(e.class)},null,8,[`class`])]),default:s(()=>[t(i(n.$t(`wizard.continue`))+` `,1)]),_:1},8,[`loading`,`disabled`]),[[p,!A.value]])])]),_:1},8,[`title`,`description`])}}});export{O as default};