import{_ as b,d as w,c as B,f as r,g as o,w as s,e as d,h as f,i as g,t as h,n as T,aa as V,o as c}from"./app-Bei_nIK3.js";import{m as H}from"./modules-c2FCioQg.js";import{T as L}from"./Title-D3e07DZH.js";import"./index-C53-ipA5.js";import{F as N,_ as S}from"./index-CvmHj1Ev.js";import{I}from"./index-Cx28gitG.js";import{B as F}from"./useFlexGapSupport-I9-A4OAO.js";import{a as P,_ as j}from"./index-DxFi17QQ.js";import{_ as q}from"./index-DgoYCtcs.js";import{_ as z}from"./index-CpDcGdHv.js";import"./Base-B7aUwkBZ.js";import"./transButton-ukl3COpm.js";import"./TextArea-BzmabrVb.js";import"./EditOutlined-C24c-ELW.js";import"./Link-ciHiWye7.js";import"./Paragraph-CJFej98T.js";import"./Text-BCxJY8y8.js";const D=w({setup(){window.config.verify_purchase_background;const e=V(),{rules:n,purchaseCode:i,errorMessage:l,successMessage:u,loading:p,verifyPurchase:t}=H();return{rules:n,purchaseCode:i,loading:p,verify:()=>t({success:a=>{e.push({name:"admin.login"})}}),errorMessage:l,successMessage:u,success:a=>{e.push({name:"admin.login"})}}}}),E={class:"container-content"},R={class:"text-center"},U=["innerHTML"],A=["innerHTML"];function G(e,n,i,l,u,p){const t=L,m=q,a=z,y=I,_=S,v=F,k=N,M=P,$=j;return c(),B("div",{class:"main-container",style:T({backgroundImage:`url(${e.verifyPurchaseBackground})`})},[r("div",E,[o($,{type:"flex",justify:"center"},{default:s(()=>[o(M,{span:8},{default:s(()=>[r("div",R,[o(t,{level:4},{default:s(()=>[g(h(e.$t("common.verify_purchase")),1)]),_:1})]),o(m),e.successMessage!=""?(c(),d(a,{key:0,type:"success","show-icon":"",banner:""},{message:s(()=>[r("span",{innerHTML:e.successMessage},null,8,U)]),_:1})):f("",!0),e.errorMessage!=""?(c(),d(a,{key:1,type:"error","show-icon":"",banner:""},{message:s(()=>[r("span",{innerHTML:e.errorMessage},null,8,A)]),_:1})):f("",!0),o(k,{layout:"vertical",class:"mt-20"},{default:s(()=>[o(_,{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(y,{value:e.purchaseCode,"onUpdate:value":n[0]||(n[0]=C=>e.purchaseCode=C),placeholder:e.$t("common.placeholder_default_text",[e.$t("user.name")])},null,8,["value","placeholder"])]),_:1},8,["label","help","validateStatus"]),o(_,null,{default:s(()=>[o(v,{type:"primary",onClick:e.verify,loading:e.loading},{default:s(()=>[g(h(e.$t("common.verify_purchase")),1)]),_:1},8,["onClick","loading"])]),_:1})]),_:1})]),_:1})]),_:1})])],4)}const ie=b(D,[["render",G]]);export{ie as default};
