import{d as f,u as h,r as v,a as x,o as n,c as i,b as e,w as y,e as b,v as w,f as t,i as C,t as g,g as k,h as I,j as L,_ as S,k as B}from"./index-e62f5c21.js";import{c as F,a as M,u as N,b as V}from"./array-4296cccc.js";const D={class:"flex justify-center items-center h-screen bg-sky-800 px-6"},j={class:"p-6 max-w-sm w-full bg-white shadow-md rounded-sm"},R=I('
Install Felicity LIMS
',1),E={class:"block"},q=e("span",{class:"text-gray-700 text-sm"},"Laboratory Name",-1),A=["disabled"],O={class:"text-orange-600 w-4/12"},P={class:"mt-6"},T={key:0,type:"submit",class:"py-2 px-4 text-center bg-sky-800 rounded-sm w-full text-white text-sm hover:bg-sky-800"},Z={key:1,class:"text-center"},G=f({__name:"Install",setup(U){const d=L(()=>S(()=>import("./FelLoadingMessage-b4229f94.js"),["assets/FelLoadingMessage-b4229f94.js","assets/index-e62f5c21.js","assets/index-332ec99e.css"])),m=h(),a=v(!1),u=F({name:M().required("Laboratory Name is Required")}),{handleSubmit:p,errors:_}=N({validationSchema:u,initialValues:{name:"Felicity Labs"}}),{value:l}=V("name"),r=p(c=>{a.value=!0,x.post("setup/installation",c).then(s=>{s.data.installed&&m.push({name:"LOGIN"})}).finally(()=>a.value=!1)});return(c,s)=>(n(),i("div",D,[e("div",j,[R,e("form",{class:"mt-4",onSubmit:s[1]||(s[1]=y((...o)=>t(r)&&t(r)(...o),["prevent"]))},[e("label",E,[q,b(e("input",{type:"text",class:"form-input mt-1 block w-full rounded-sm focus:border-sky-800","onUpdate:modelValue":s[0]||(s[0]=o=>C(l)?l.value=o:null),disabled:a.value},null,8,A),[[w,t(l)]]),e("div",O,g(t(_).name),1)]),e("div",P,[a.value?(n(),i("div",Z,[k(t(d),{message:"Installing felicity lims ..."})])):(n(),i("button",T," Install "))])],32)])]))}}),H=B(G,[["__file","/home/aurthurm/Documents/Development/felicity/felicity-lims/webapp/views/install/Install.vue"]]);export{H as default};