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