import{_ as C,x as b,o as l,g as w,j as a,c as s,w as n,H as T,aR as H,v as V,i as f,t as g,f as h,J as y,aP as L,s as N,Y as P,a0 as S,a1 as j,B as I,a8 as R,n as q}from"./app-DGDivIsO.js";import{m as z}from"./modules-DAM-tm1v.js";const D=b({setup(){const e=window.config.verify_purchase_background,o=H(),{rules:u,purchaseCode:_,errorMessage:i,successMessage:p,loading:t,verifyPurchase:r}=z();return{rules:u,purchaseCode:_,loading:t,verify:()=>r({success:d=>{o.push({name:"admin.login"})}}),errorMessage:i,successMessage:p,verifyPurchaseBackground:e}}}),E={class:"container-content"},F={class:"text-center"},J=["innerHTML"],U=["innerHTML"];function Y(e,o,u,_,i,p){const t=L,r=N,c=P,d=S,m=j,v=I,k=R,M=q,$=V;return l(),w("div",{class:"main-container",style:T({backgroundImage:`url(${e.verifyPurchaseBackground})`})},[a("div",E,[s($,{type:"flex",justify:"center"},{default:n(()=>[s(M,{span:8},{default:n(()=>[a("div",F,[s(t,{level:4},{default:n(()=>[f(g(e.$t("common.verify_purchase")),1)]),_:1})]),s(r),e.successMessage!=""?(l(),h(c,{key:0,type:"success","show-icon":"",banner:""},{message:n(()=>[a("span",{innerHTML:e.successMessage},null,8,J)]),_:1})):y("",!0),e.errorMessage!=""?(l(),h(c,{key:1,type:"error","show-icon":"",banner:""},{message:n(()=>[a("span",{innerHTML:e.errorMessage},null,8,U)]),_:1})):y("",!0),s(k,{layout:"vertical",class:"mt-20"},{default:n(()=>[s(m,{label:e.$t("common.purchase_code"),name:"purchase_code",help:e.rules.purchase_code?e.rules.purchase_code.message:null,validateStatus:e.rules.purchase_code?"error":null,class:"required"},{default:n(()=>[s(d,{value:e.purchaseCode,"onUpdate:value":o[0]||(o[0]=B=>e.purchaseCode=B),placeholder:e.$t("common.placeholder_default_text",[e.$t("user.name")])},null,8,["value","placeholder"])]),_:1},8,["label","help","validateStatus"]),s(m,null,{default:n(()=>[s(v,{type:"primary",onClick:e.verify,loading:e.loading},{default:n(()=>[f(g(e.$t("common.verify_purchase")),1)]),_:1},8,["onClick","loading"])]),_:1})]),_:1})]),_:1})]),_:1})])],4)}const K=C(D,[["render",Y]]);export{K as default};
