import{_ as C,d as b,c as w,f as a,g as o,w as s,e as f,h as g,i as h,t as y,n as T,aa as V,o as i}from"./app-CgV11GBz.js";import{m as H}from"./modules-DXWxfHkK.js";import{T as L}from"./Title-p64jezvO.js";import"./index-B74H0RZb.js";import{F as N,_ as S}from"./index-DX5UyTUL.js";import{I}from"./index-CJx7RGCD.js";import{B as P}from"./useFlexGapSupport-CWWB0EO1.js";import{a as F,_ as j}from"./index-CyQQxPex.js";import{_ as q}from"./index-Cj--B_iU.js";import{_ as z}from"./index-n0upkdM9.js";import"./Base-CoAoxKFd.js";import"./transButton-BBsxYOSm.js";import"./TextArea-CiAld6jk.js";import"./EditOutlined-CDoHc2FT.js";import"./Link-KYcQwxj2.js";import"./Paragraph-vUn64w3A.js";import"./Text-BEWt5-6S.js";const D=b({setup(){const e=window.config.verify_purchase_background,n=V(),{rules:l,purchaseCode:u,errorMessage:p,successMessage:m,loading:r,verifyPurchase:t}=H();return{rules:l,purchaseCode:u,loading:r,verify:()=>t({success:_=>{n.push({name:"admin.login"})}}),errorMessage:p,successMessage:m,verifyPurchaseBackground:e}}}),E={class:"container-content"},R={class:"text-center"},U=["innerHTML"],A=["innerHTML"];function G(e,n,l,u,p,m){const r=L,t=q,c=z,_=I,d=S,v=P,k=N,M=F,$=j;return i(),w("div",{class:"main-container",style:T({backgroundImage:`url(${e.verifyPurchaseBackground})`})},[a("div",E,[o($,{type:"flex",justify:"center"},{default:s(()=>[o(M,{span:8},{default:s(()=>[a("div",R,[o(r,{level:4},{default:s(()=>[h(y(e.$t("common.verify_purchase")),1)]),_:1})]),o(t),e.successMessage!=""?(i(),f(c,{key:0,type:"success","show-icon":"",banner:""},{message:s(()=>[a("span",{innerHTML:e.successMessage},null,8,U)]),_:1})):g("",!0),e.errorMessage!=""?(i(),f(c,{key:1,type:"error","show-icon":"",banner:""},{message:s(()=>[a("span",{innerHTML:e.errorMessage},null,8,A)]),_:1})):g("",!0),o(k,{layout:"vertical",class:"mt-20"},{default:s(()=>[o(d,{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:s(()=>[o(_,{value:e.purchaseCode,"onUpdate:value":n[0]||(n[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"]),o(d,null,{default:s(()=>[o(v,{type:"primary",onClick:e.verify,loading:e.loading},{default:s(()=>[h(y(e.$t("common.verify_purchase")),1)]),_:1},8,["onClick","loading"])]),_:1})]),_:1})]),_:1})]),_:1})])],4)}const ie=C(D,[["render",G]]);export{ie as default};
