import{_ as g,b as d,c as p,a,j as s,w as V,N as z,x as c,o as i,X as h,W as C}from"./app-583c7dce.js";import{b as $}from"./helpers-7af1206d.js";import{_ as u}from"./Attachment-bd379c7b.js";import"./ImageUploader-7882029f.js";const k={class:"container py-5 my-5 installer-container"},q={class:"card col-12 col-lg-7 mt-5 mb-4 d-block mx-auto"},U={class:"card-body"},w={class:"mb-4 mt-4"},A={class:"mb-4"},B={class:"mb-4"},N={class:"mb-4"},S={class:"mb-4"},D={class:"mb-4"},F={class:"d-flex justify-content-center gap-3"},j=["disabled"],I={key:1},P={__name:"CompanySetup",setup(E){const n=d({}),r=d({}),t=d(!1),_=o=>{n.value.company_logo=o},b=o=>{n.value.company_icon=o},y=o=>{n.value.company_banner=o},v=()=>{t.value=!0;let o=$(new FormData,n.value);axios.post(h("api/company-store"),o,{headers:{Accept:"application/json","Content-Type":"multipart/form-data"}}).then(e=>{C.push({name:"emailSetup"})}).catch(({response:e})=>{(e==null?void 0:e.status)===422&&(r.value=e.data.errors)}).finally(()=>t.value=!1)};return(o,e)=>{const m=c("app-input"),f=c("app-button-loader");return i(),p("div",k,[e[9]||(e[9]=a("div",{class:"overflow-auto custom-scrollbar text-center"},[a("ul",{class:"multi-steps text-nowrap p-0"},[a("li",null,"Server Requirement"),a("li",null,"Purchase Code"),a("li",null,"Database Configure"),a("li",null,"Admin Information"),a("li",{class:"is-active"},"Company information"),a("li",null,"Email setup")])],-1)),a("div",q,[a("div",U,[a("div",w,[s(m,{type:"text",id:"companyName",label:"Company name","label-required":"",placeholder:"Company name",modelValue:n.value.company_name,"onUpdate:modelValue":e[0]||(e[0]=l=>n.value.company_name=l),errors:o.$errors(r.value,"company_name")},null,8,["modelValue","errors"])]),a("div",A,[s(m,{type:"text",id:"phone",label:"Phone number","label-required":"",placeholder:"Phone number",modelValue:n.value.company_phone,"onUpdate:modelValue":e[1]||(e[1]=l=>n.value.company_phone=l),errors:o.$errors(r.value,"company_phone")},null,8,["modelValue","errors"])]),a("div",B,[s(m,{type:"text",id:"address",label:"Address","label-required":"",placeholder:"Address",modelValue:n.value.company_address,"onUpdate:modelValue":e[2]||(e[2]=l=>n.value.company_address=l),errors:o.$errors(r.value,"company_address")},null,8,["modelValue","errors"])]),a("div",N,[s(u,{label:o.$t("change_logo"),"label-required":"",modelValue:n.value.company_logo,"onUpdate:modelValue":e[3]||(e[3]=l=>n.value.company_logo=l),onChangeFile:e[4]||(e[4]=l=>_(l)),error:o.$errors(r.value,"company_logo"),"recommended-size":o.$t("logo_recommended_size"),"recommended-file-size":o.$t("setting_file_size")},null,8,["label","modelValue","error","recommended-size","recommended-file-size"])]),a("div",S,[s(u,{label:o.$t("change_icon"),"label-required":"",modelValue:n.value.company_icon,"onUpdate:modelValue":e[5]||(e[5]=l=>n.value.company_icon=l),onChangeFile:e[6]||(e[6]=l=>b(l)),error:o.$errors(r.value,"company_icon"),"recommended-size":o.$t("icon_recommended_size"),"recommended-file-size":o.$t("setting_file_size")},null,8,["label","modelValue","error","recommended-size","recommended-file-size"])]),a("div",D,[s(u,{label:o.$t("change_banner"),"label-required":"",modelValue:n.value.company_banner,"onUpdate:modelValue":e[7]||(e[7]=l=>n.value.company_banner=l),onChangeFile:e[8]||(e[8]=l=>y(l)),error:o.$errors(r.value,"company_banner"),"recommended-size":o.$t("banner_recommended_size"),"recommended-file-size":o.$t("setting_file_size")},null,8,["label","modelValue","error","recommended-size","recommended-file-size"])]),a("div",F,[a("button",{type:"button",class:"btn btn-primary btn-sm py-3 px-5 text-center installer_btn",onClick:V(v,["prevent"]),disabled:t.value},[t.value?(i(),z(f,{key:0})):(i(),p("span",I,"Next"))],8,j)])])])])}}},R=g(P,[["__scopeId","data-v-f98dfb4e"]]);export{R as default};
