import{S as f}from"./Spin.ce9c3cec.js";import{d as v,i as r,o as i,j as _,k as u,c as l,b as c,aa as g,v as h,l as y,a as C,e as x,n,r as w,m as B}from"./index.29cf2edd.js";import{C as b}from"./CovidService.5364de46.js";/* empty css              */const k={style:{width:"100%"}},I={style:{margin:"0 auto","text-align":"center","margin-top":"50px"}},N=u("h1",{style:{"font-size":"18pt","margin-top":"12px"}},"Insurance Claim",-1),V=v({__name:"Claim",setup(S){let e=r();const t=r(!1),m=async()=>{if(!e.value)return n.warning("Please enter certificate number!");t.value=!0,b.getCertificateInfo(e.value).then(a=>{t.value=!1,a.data.status==="PAID"?w.push(`/covid/claim/view/${e.value}`):n.error(`The certificate number ${e.value} is not PAID, Can't claim`)}).catch(a=>{t.value=!1,n.error(a.message)})};return(a,s)=>{const p=B,d=f;return i(),_("div",k,[u("div",I,[l(c(g),{style:{"font-size":"60px",color:"#0C6B3B"}}),N,l(p,{placeholder:"Enter Certificate Number",size:"large",style:{width:"260px","border-radius":"50px","text-align":"center"},value:c(e),"onUpdate:value":s[0]||(s[0]=o=>h(e)?e.value=o:e=o),onKeydown:y(m,["enter"])},null,8,["value","onKeydown"]),t.value?(i(),C(d,{key:0})):x("",!0)])])}}});export{V as default};
