import{r as d,j as M,b as j,o as a,c as s,a as t,t as n,e as _,F as P,m as V,w as F,A as D}from"./app-91dba96b.js";import{i as H}from"./index-0653e21c.js";import{u as R}from"./urlGenerator-87d92adb.js";import"./appFunction-1b5b1f43.js";const L={class:"container pb-5 my-5 installer-container"},z=D('<div class="mt-5"><div class="card shadow installation-notice-card"><div class="card-header bg-warning text-white"><h5 class="mb-0 text-white"><strong>Installation Notice</strong></h5></div><div class="card-body px-5"><p class="lead mb-0"> Before proceeding with the installation, make sure your server meets the required PHP version, necessary extensions, and proper file permissions. Refer to the <a href="https://zabi.theme29.com/documentation" target="_blank" rel="noopener noreferrer"> documentation </a> for details. </p></div></div></div>',1),A={class:"mt-5 card border-info"},G={class:"card-body"},I={class:"mt-5 table-responsive custom-scrollbar"},Q={class:"table table-bordered table-hover table-sm"},J=t("thead",{class:"table-warning"},[t("tr",null,[t("th",null,"Requirement"),t("th",null,"Required"),t("th",null,"Current"),t("th",null,"Status")])],-1),K={key:0},O=t("td",null,"PHP version",-1),T={key:0,class:"badge bg-success"},U={key:1,class:"badge bg-danger"},W={key:1},X=t("td",null,"MySQL version",-1),Y={key:0,class:"badge bg-success"},Z={key:1,class:"badge bg-danger"},$=t("td",null,"Enabled",-1),tt={key:0,class:"text-success"},et={key:1,class:"text-danger"},at={key:0,class:"badge bg-success"},st={key:1,class:"badge bg-danger"},lt={class:"mt-5 card border-info"},nt={class:"card-body"},ct={class:"mt-5 table-responsive custom-scrollbar"},it={class:"table table-bordered table-hover table-sm"},rt=t("thead",{class:"table-warning"},[t("tr",null,[t("th",null,"File/Path Permission"),t("th",null,"Required"),t("th",null,"Status")])],-1),dt={key:0,class:"badge bg-success"},ot={key:1,class:"badge bg-danger"},ut={class:"mt-5 d-flex justify-content-center"},gt={__name:"index",setup(_t){const c=d({}),i=d({}),r=d({}),h=d({}),b=d({}),m=d({}),C=()=>{H.get("installation/requirements").then(e=>{var u,l,o,v,g,y,k,f,p,q,x,S,w;!((u=e==null?void 0:e.data)!=null&&u.checkPhpVersion)&&!((v=(o=(l=e==null?void 0:e.data)==null?void 0:l.requirements)==null?void 0:o.requirements)!=null&&v.php)||(c.value=(g=e==null?void 0:e.data)==null?void 0:g.checkPhpVersion,i.value=(y=e==null?void 0:e.data)==null?void 0:y.mysqlVersion,r.value=(p=(f=(k=e==null?void 0:e.data)==null?void 0:k.requirements)==null?void 0:f.requirements)==null?void 0:p.php,h.value=(x=(q=e==null?void 0:e.data)==null?void 0:q.requirements)==null?void 0:x.errors,b.value=(S=e==null?void 0:e.data.permissions)==null?void 0:S.permissions,m.value=(w=e==null?void 0:e.data.permissions)==null?void 0:w.errors)})},E=M(()=>{if(r.value)for(const e in r.value)return r.value[e],c.value.status&&i.value.status&&m.value===null&&!h.value;return!1}),N=()=>{location.replace(R("/purchase-code"))},B=()=>{location.replace(R("/install"))};return j(()=>{C()}),(e,u)=>(a(),s("div",L,[z,t("div",A,[t("div",G,[t("div",I,[t("table",Q,[J,t("tbody",null,[c.value?(a(),s("tr",K,[O,t("td",null,n(c.value.minimum_version),1),t("td",null,n(c.value.current_version),1),t("td",null,[c.value.status?(a(),s("span",T,"Success")):(a(),s("span",U,"Failed"))])])):_("",!0),i.value?(a(),s("tr",W,[X,t("td",null,n(i.value.minimum_version),1),t("td",null,n(i.value.current_version),1),t("td",null,[i.value.status?(a(),s("span",Y,"Success")):(a(),s("span",Z,"Failed"))])])):_("",!0),r.value?(a(!0),s(P,{key:2},V(r.value,(l,o)=>(a(),s("tr",{key:o},[t("td",null,n(o),1),$,t("td",null,[l?(a(),s("span",tt,"Enabled")):(a(),s("span",et,"Disabled"))]),t("td",null,[l?(a(),s("span",at,"Success")):(a(),s("span",st,"Failed"))])]))),128)):_("",!0)])])])])]),t("div",lt,[t("div",nt,[t("div",ct,[t("table",it,[rt,t("tbody",null,[(a(!0),s(P,null,V(b.value,l=>(a(),s("tr",{key:l.folder},[t("td",null,n(l.folder),1),t("td",null,n(l.permission),1),t("td",null,[l.isSet?(a(),s("span",dt,"Success")):(a(),s("span",ot,"Failed"))])]))),128))])])])])]),t("div",ut,[E.value?(a(),s("button",{key:0,class:"btn btn-primary btn-lg px-4",onClick:F(N,["prevent"])},"Continue ")):(a(),s("button",{key:1,class:"btn btn-secondary btn-lg px-4 btn-danger",onClick:F(B,["prevent"])},"Retry"))])]))}};export{gt as default};
