@miden-npm/vue 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +43 -48
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),q=Symbol("MidenPGConfig");function oe(o){if(!(o!=null&&o.publishableKey))throw new Error("[@miden-npm/vue] publishableKey is required");return{install(l){l.provide(q,o)}}}function le(){const o=e.inject(q);if(!o)throw new Error("[@miden-npm/vue] Missing provider. Did you forget to app.use(createMidenPG(...))?");return o}const K=o=>o==null||typeof o!="object"?!1:Object.values(o).every(Boolean),ne=o=>o==="sandbox"?"https://sandbox-api.midencards.io/payment-gateway-api":"",ae=o=>o==="USD"?"$":o==="NGN"?"₦":o==="EUR"?"€":o==="GBP"?"£":o==="JPY"||o==="CNY"?"¥":o==="USDC"||o==="usdc"?"$⧫":o==="USDT"||o==="usdt"?"₮":"$",M=(o,l)=>{const t=typeof o=="string"?parseFloat(o):o;return isNaN(t)?"0":`${l?ae(l):""} ${t==null?void 0:t.toLocaleString("en-US")}`},re=(o,l)=>o.length<=l?o:o.slice(0,l)+"...",se=o=>{const l=["Backspace","Tab","ArrowLeft","ArrowRight","Delete","Home","End","."];(o.ctrlKey||o.metaKey)&&["a","c","v","x"].includes(o.key.toLowerCase())||(!l.includes(o.key)&&!/^\d$/.test(o.key)&&o.preventDefault(),o.key==="."&&o.target.value.includes(".")&&o.preventDefault())},ce=["width","height"],ie=["stroke"],ue=["fill"],R=e.defineComponent({__name:"icon-loader",props:{size:{default:24},color:{default:"currentColor"},className:{default:""}},setup(o){const l=o,t=e.useAttrs(),{size:a,color:n,className:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({class:["animate-spin",e.unref(r)],xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:e.unref(a),height:e.unref(a),role:"img","aria-label":"loading"},e.unref(t)),[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:e.unref(n),"stroke-width":"4"},null,8,ie),e.createElementVNode("path",{class:"opacity-75",fill:e.unref(n),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,8,ue)],16,ce))}}),de=["disabled"],pe={key:1},V=e.defineComponent({__name:"button",props:{label:{default:""},type:{default:"neutral"},size:{default:"de"},paddingClassX:{default:"px-8"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},customClass:{default:""}},emits:["click"],setup(o,{emit:l}){const t=o,a=l,n=e.computed(()=>t.disabled||t.loading);function r(){n.value||a("click")}function c(s,m){if(m)return"bg-gray-200 text-gray-400 cursor-not-allowed border-gray-200";switch(s){case"primary":return"bg-primary text-white hover:bg-primary-black hover:border-primary-black border-primary";case"secondary":return"bg-gray-200 border-gray-200 hover:bg-gray-300 text-heading-text";case"danger":return"bg-red-500 border-red-500 text-white hover:bg-red-600";case"neutral":default:return"bg-off-white border-grey-border hover:bg-gray-100"}}function i(s){switch(s){case"de":return"h-68px rounded-xl";case"md":return"h-42px rounded-lg";case"sm":return"h-32px rounded-md";default:return"h-68px rounded-xl"}}function d(s){switch(s){case"de":case"md":case"sm":return"text-body-2xs font-normal";default:return"text-body-xs font-normal"}}return(s,m)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["flex items-center justify-center gap-2 py-3 border font-normal text-input-grey transition-colors duration-300 ease-in-out",c(s.type,n.value),i(s.size),s.paddingClassX,s.customClass]),type:"button",disabled:n.value,onClick:r},[e.renderSlot(s.$slots,"prefix"),s.loading?(e.openBlock(),e.createBlock(R,{key:0})):(e.openBlock(),e.createElementBlock("div",pe,[s.label?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["mb-0",d(s.size)])},e.toDisplayString(s.label),3)):e.renderSlot(s.$slots,"default",{key:1})])),e.renderSlot(s.$slots,"suffix")],10,de))}}),me={class:"mb-0 text-body-3xs font-normal text-red-500"},Z=e.defineComponent({__name:"input-error",props:{errorMessage:{}},setup(o){return(l,t)=>(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(l.errorMessage),1))}});async function O(o,l,t){try{const a=ne(l);return await(await fetch(`${a}/api/v1/checkout/generate-payment-link2`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:t},body:JSON.stringify({...o,LinkName:`${Date.now()}-Link`})})).json()}catch{}}const fe={key:0,class:"absolute inset-0 grid place-items-center bg-white/60"},Y=e.defineComponent({__name:"checkout-iframe",props:{style:{default:()=>({width:"100%",height:"100vh",border:"0",borderRadius:"6px",overflow:"hidden"})},url:{default:void 0},secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})}},setup(o){const l=o,t=e.computed(()=>({...l.style})),a=e.ref(null),n=e.ref(null),r=e.ref(""),c=e.ref(!1);function i(){n.value&&n.value.parentNode&&n.value.parentNode.removeChild(n.value),n.value=null}function d(m){var k;i();const f=document.createElement("iframe");f.src=m;const p=l.style;p.width&&(f.style.width=p.width),p.height&&(f.style.height=p.height),p.border&&(f.style.border=p.border),p.borderRadius&&(f.style.borderRadius=p.borderRadius),p.overflow&&(f.style.overflow=p.overflow),(k=a.value)==null||k.appendChild(f),n.value=f}async function s(){if(l.url){d(l.url);return}if(!l.secretKey){r.value="Secret key is required.";return}if(!K(l.paymentObject)){r.value="Kindly ensure you are passing all the required data.";return}c.value=!0,r.value="";try{const m=await O(l.paymentObject,l.environment,l.secretKey);m!=null&&m.isSuccessful&&m.launchUrl?(r.value="Payment link created successfully",d(m.launchUrl)):r.value="Failed to create payment link"}catch(m){r.value=(m==null?void 0:m.message)||"Failed to create payment link"}finally{c.value=!1}}return e.onMounted(()=>{a.value&&s()}),e.watch(()=>l.url,m=>{m&&d(m)}),e.onBeforeUnmount(()=>{i()}),(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:"relative",style:e.normalizeStyle(t.value)},[e.createElementVNode("div",{ref_key:"containerRef",ref:a,class:"w-full h-full"},null,512),c.value?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(R)])):e.createCommentVNode("",!0)],4))}}),he={key:1},ve=e.defineComponent({__name:"checkout-button",props:{secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})},mode:{default:"redirect"}},setup(o){const l=o,t=e.ref(""),a=e.ref(""),n=e.ref(!1);async function r(){if(!l.secretKey){t.value="Secret key is required.";return}if(!K(l.paymentObject)){t.value="Kindly ensure you are passing all the required data.";return}n.value=!0,t.value="";try{const s=await O(l.paymentObject,l.environment,l.secretKey);s!=null&&s.isSuccessful&&s.launchUrl?(a.value=s.launchUrl,t.value="Payment link created successfully",l.mode==="redirect"&&window.open(s.launchUrl,"_blank","noopener,noreferrer")):t.value="Failed to create payment link"}catch(s){t.value=(s==null?void 0:s.message)||"Failed to create payment link"}finally{n.value=!1}}const{secretKey:c,environment:i,mode:d}=l;return(s,m)=>a.value&&e.unref(d)==="iframe"?(e.openBlock(),e.createBlock(Y,{key:0,url:a.value,secretKey:e.unref(c),environment:e.unref(i)},null,8,["url","secretKey","environment"])):(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V,{label:"Pay",type:"primary",customClass:"w-full",loading:n.value,onClick:r},null,8,["loading"]),e.createVNode(Z,{errorMessage:t.value},null,8,["errorMessage"])]))}}),ye=["width","height"],Ce=["fill"],ge=e.defineComponent({__name:"icon-chevron-left",props:{width:{default:17},height:{default:17},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M10.5 14.28C10.3734 14.28 10.2467 14.2333 10.1467 14.1333L5.80002 9.78668C5.09335 9.08001 5.09335 7.92001 5.80002 7.21335L10.1467 2.86668C10.34 2.67335 10.66 2.67335 10.8534 2.86668C11.0467 3.06001 11.0467 3.38001 10.8534 3.57335L6.50669 7.92001C6.18669 8.24001 6.18669 8.76001 6.50669 9.08001L10.8534 13.4267C11.0467 13.62 11.0467 13.94 10.8534 14.1333C10.7534 14.2267 10.6267 14.28 10.5 14.28Z",fill:e.unref(r)},null,8,Ce)],16,ye))}}),be=e.defineComponent({__name:"back",emits:["back"],setup(o,{emit:l}){return(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 cursor-pointer",onClick:a[0]||(a[0]=n=>t.$emit("back"))},[e.createVNode(ge),a[1]||(a[1]=e.createElementVNode("p",{class:"mb-0 text-body-xs font-normal"},"Back",-1))]))}}),_e=["width","height"],ke=["fill"],xe=e.defineComponent({__name:"icon-buzapay-icon",props:{width:{default:15},height:{default:13},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M9.97919 0.5C10.8854 0.5 11.6276 0.585938 12.2057 0.757812C12.7891 0.924479 13.2188 1.22396 13.4948 1.65625C13.7761 2.08333 13.9167 2.6901 13.9167 3.47656C13.9167 4.1849 13.7526 4.77083 13.4245 5.23438C13.0964 5.69792 12.5938 5.95312 11.9167 6C12.8021 6.08854 13.4401 6.40625 13.8307 6.95312C14.2214 7.49479 14.4167 8.17708 14.4167 9C14.4167 9.71354 14.3334 10.2995 14.1667 10.7578C14.0052 11.2161 13.7318 11.5729 13.3464 11.8281C12.961 12.0781 12.4375 12.2526 11.7761 12.3516C11.1198 12.4505 10.2995 12.5 9.31512 12.5H0.416687V0.5H9.97919ZM2.91669 7.77344H5.97235V11.167L10.2497 5.22754H7.19501V1.83398L2.91669 7.77344ZM5.97235 6.07617H8.2702L7.19501 7.57324V6.9248H4.89716L5.97235 5.42676V6.07617Z",fill:e.unref(r)},null,8,ke)],16,_e))}}),Ve={class:"checkout-card w-full h-screen flex flex-col items-center justify-center text-white"},we={class:"flex w-1/2"},Be={class:"flex gap-2 w-full"},Ne={class:"flex flex-col gap-8 w-full"},Ee={class:"bg-off-white rounded-xl"},$e={class:"flex items-center gap-2 justify-center"},Se=e.defineComponent({__name:"card",props:{showBackButton:{type:Boolean,default:!1}},emits:["back","close"],setup(o,{emit:l}){const t=l;return(a,n)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",we,[a.showBackButton?(e.openBlock(),e.createBlock(be,{key:0,onBack:n[0]||(n[0]=r=>t("back"))})):e.createCommentVNode("",!0),e.createElementVNode("div",Be,[e.createElementVNode("div",Ne,[e.createElementVNode("div",Ee,[e.renderSlot(a.$slots,"default")]),e.createElementVNode("div",$e,[n[2]||(n[2]=e.createElementVNode("p",{class:"text-light-white-100 text-body-2xs font-regular"}," Powered by Buzapay ",-1)),e.createVNode(xe,{color:"#E8F4FF"})])]),e.createElementVNode("div",{class:"close-icon flex flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",onClick:n[1]||(n[1]=r=>t("close")),role:"button","aria-label":"Close"},[...n[3]||(n[3]=[e.createElementVNode("p",{class:"text-white"},"x",-1)])])])])]))}}),De=["src","height","alt"],x=e.defineComponent({__name:"image",props:{src:{},height:{default:50},width:{default:50},alt:{default:"Image"},customClass:{default:""},isFullWidth:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:l}){const t=o,a=l,{src:n,height:r,width:c,alt:i,customClass:d,isFullWidth:s}=t;return(m,f)=>(e.openBlock(),e.createElementBlock("img",{src:e.unref(n),height:e.unref(r),alt:e.unref(i),class:e.normalizeClass([e.unref(d),e.unref(s)?"w-full":""]),style:e.normalizeStyle({width:e.unref(s)?"100%":e.unref(c)+"px"}),onClick:f[0]||(f[0]=p=>a("click"))},null,14,De))}}),Le=["aria-orientation"],Me=["aria-checked","onClick"],Te={key:0,class:"bg-white w-2 h-2 rounded-full"},Ae={class:"mb-0 text-body-2xs font-medium text-heading-text"},Pe=e.defineComponent({__name:"radio-group",props:{options:{default:()=>[]},type:{default:"vertical"},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""}},emits:["update:modelValue","selectedChange"],setup(o,{emit:l}){const t=o,a=l,n=e.computed(()=>t.modelValue!==void 0),r=e.ref("");e.onMounted(()=>{if(n.value)return;const p=t.defaultValue??(t.options.length?t.options[0].value:"");r.value=p,p&&(a("update:modelValue",p),a("selectedChange",p))}),e.watch(()=>t.modelValue,p=>{n.value&&(r.value=p??"")},{immediate:!0});const c=e.computed(()=>n.value?t.modelValue??"":r.value);function i(p){n.value||(r.value=p),a("update:modelValue",p),a("selectedChange",p)}const d=e.computed(()=>t.type==="horizontal"?"flex-row gap-5":"flex-col gap-6"),{options:s,type:m,className:f}=t;return(p,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex",d.value,e.unref(f)]),role:"radiogroup","aria-orientation":e.unref(m)==="horizontal"?"horizontal":"vertical",tabindex:"0"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),g=>(e.openBlock(),e.createElementBlock("div",{key:g.value,role:"radio","aria-checked":c.value===g.value,tabindex:"-1",onClick:_=>i(g.value),class:"flex items-center gap-2 cursor-pointer transition-colors duration-200"},[e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full border flex items-center justify-center",c.value===g.value?"bg-orange-500 border-orange-500":"bg-white border-grey-200"])},[c.value===g.value?(e.openBlock(),e.createElementBlock("div",Te)):e.createCommentVNode("",!0)],2),e.createElementVNode("p",Ae,e.toDisplayString(g.label),1)],8,Me))),128))],10,Le))}}),Ie=["width","height"],He=["fill"],Ue=["fill"],ze=["fill"],Fe=e.defineComponent({__name:"icon-copy-success",props:{width:{default:16},height:{default:17},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M11.4002 1.6875H8.60016C5.9935 1.6875 4.8335 2.8475 4.8335 5.45417V6.1875C4.8335 6.46083 5.06016 6.6875 5.3335 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V11.5208C10.1668 11.7942 10.3935 12.0208 10.6668 12.0208H11.4002C14.0068 12.0208 15.1668 10.8608 15.1668 8.25417V5.45417C15.1668 2.8475 14.0068 1.6875 11.4002 1.6875ZM5.8335 5.6875V5.45417C5.8335 3.3875 6.5335 2.6875 8.60016 2.6875H11.4002C13.4668 2.6875 14.1668 3.3875 14.1668 5.45417V8.25417C14.1668 10.3208 13.4668 11.0208 11.4002 11.0208H11.1668V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875H5.8335Z",fill:e.unref(r)},null,8,He),e.createElementVNode("path",{d:"M7.40016 5.6875H4.60016C1.9935 5.6875 0.833496 6.8475 0.833496 9.45417V12.2542C0.833496 14.8608 1.9935 16.0208 4.60016 16.0208H7.40016C10.0068 16.0208 11.1668 14.8608 11.1668 12.2542V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875ZM4.60016 15.0208C2.5335 15.0208 1.8335 14.3208 1.8335 12.2542V9.45417C1.8335 7.3875 2.5335 6.6875 4.60016 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V12.2542C10.1668 14.3208 9.46683 15.0208 7.40016 15.0208H4.60016Z",fill:e.unref(r)},null,8,Ue),e.createElementVNode("path",{d:"M5.35302 12.6542C5.22635 12.6542 5.09969 12.6075 4.99969 12.5075L3.69969 11.2075C3.50635 11.0142 3.50635 10.6942 3.69969 10.5008C3.89302 10.3075 4.21302 10.3075 4.40635 10.5008L5.35302 11.4475L7.59302 9.2075C7.78635 9.01417 8.10635 9.01417 8.29969 9.2075C8.49302 9.40083 8.49302 9.72083 8.29969 9.91417L5.69969 12.5075C5.60635 12.6008 5.47969 12.6542 5.35302 12.6542Z",fill:e.unref(r)},null,8,ze)],16,Ie))}}),N=e.defineComponent({__name:"copy",props:{copyText:{},color:{}},setup(o){const l=o;function t(n){return navigator.clipboard.writeText(n)}function a(){t(l.copyText).then(()=>{}).catch(n=>{console.error("Copy failed:",n)})}return(n,r)=>(e.openBlock(),e.createBlock(Fe,{class:"cursor-pointer",color:n.color,onClick:a},null,8,["color"]))}}),je={class:"flex items-center gap-1"},qe={key:1,class:"flex items-center justify-between"},Ke={class:"flex items-center gap-1"},B=e.defineComponent({__name:"label-info",props:{type:{default:"vertical"},label:{default:""},labelCustomClass:{default:"text-body-4xs font-medium text-light-copy"},valueImageSrc:{default:""},valueImageCustomClass:{default:""},valueImagePosition:{default:"prefix"},hasValueCopy:{type:Boolean,default:!1},value:{default:""},valueCustomClass:{default:"text-body-2xs font-medium text-sub-copy"},alignRight:{type:Boolean,default:!1}},setup(o){const l=o,t=e.computed(()=>(l.label??"").toUpperCase()),a=e.computed(()=>!!l.valueImageSrc&&l.valueImagePosition==="prefix"),n=e.computed(()=>!!l.valueImageSrc&&l.valueImagePosition==="suffix"),r=e.computed(()=>re(l.value,40)),{type:c,labelCustomClass:i,valueImageSrc:d,valueImageCustomClass:s,hasValueCopy:m,value:f,valueCustomClass:p,alignRight:k}=l;return(g,_)=>e.unref(c)==="vertical"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex flex-col gap-1",e.unref(k)?"text-right items-end":""])},[e.createElementVNode("p",{class:e.normalizeClass(e.unref(i))},e.toDisplayString(t.value),3),e.createElementVNode("div",je,[a.value?(e.openBlock(),e.createBlock(x,{key:0,src:e.unref(d),alt:e.unref(f),width:22,customClass:e.unref(s)},null,8,["src","alt","customClass"])):e.createCommentVNode("",!0),e.unref(m)?(e.openBlock(),e.createElementBlock("p",{key:2,class:e.normalizeClass([e.unref(p),"truncate"])},e.toDisplayString(r.value),3)):(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(f)),3)),e.unref(m)?(e.openBlock(),e.createBlock(N,{key:3,copyText:e.unref(f),color:"#9DBFDE"},null,8,["copyText"])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(x,{key:4,src:e.unref(d),alt:e.unref(f),width:22,customClass:e.unref(s)},null,8,["src","alt","customClass"])):e.createCommentVNode("",!0)])],2)):(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("p",{class:e.normalizeClass(e.unref(i))},e.toDisplayString(t.value),3),e.createElementVNode("div",Ke,[a.value?(e.openBlock(),e.createBlock(x,{key:0,src:e.unref(d),alt:e.unref(f),width:22,customClass:e.unref(s)},null,8,["src","alt","customClass"])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(f)),3),e.unref(m)?(e.openBlock(),e.createBlock(N,{key:1,copyText:e.unref(f),color:"#9DBFDE"},null,8,["copyText"])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(x,{key:2,src:e.unref(d),alt:e.unref(f),width:22,customClass:e.unref(s)},null,8,["src","alt","customClass"])):e.createCommentVNode("",!0)])]))}}),Re=["width","height"],Ze=["fill"],Oe=e.defineComponent({__name:"icon-check-circle",props:{width:{default:67},height:{default:67},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 67 67",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M33.6705 0.0820312C15.2758 0.0820312 0.36377 14.9941 0.36377 33.3888C0.36377 51.7846 15.2758 66.6956 33.6705 66.6956C52.0663 66.6956 66.9773 51.7846 66.9773 33.3888C66.9773 14.9941 52.0663 0.0820312 33.6705 0.0820312ZM33.6705 62.5978C17.6011 62.5978 4.52712 49.4583 4.52712 33.3887C4.52712 17.3192 17.6011 4.24525 33.6705 4.24525C49.74 4.24525 62.814 17.3193 62.814 33.3887C62.814 49.4581 49.74 62.5978 33.6705 62.5978ZM46.9631 21.2016L27.4213 40.8662L18.621 32.0659C17.8081 31.253 16.4904 31.253 15.6765 32.0659C14.8636 32.8788 14.8636 34.1965 15.6765 35.0094L25.9797 45.3137C26.7926 46.1255 28.1103 46.1255 28.9243 45.3137C29.0179 45.22 29.0981 45.1179 29.171 45.0118L49.9086 24.1461C50.7205 23.3332 50.7205 22.0155 49.9086 21.2016C49.0947 20.3888 47.777 20.3888 46.9631 21.2016Z",fill:e.unref(r)},null,8,Ze)],16,Re))}}),Ye={class:"flex flex-col gap-8 p-16"},Ge={class:"flex flex-col gap-8"},We={class:"flex flex-col gap-8"},Je={class:"flex flex-col"},Xe={class:"py-4 border-b border-grey-100"},Qe={class:"py-4"},et={class:"mx-auto",style:{width:"80%"}},tt=e.defineComponent({__name:"success",setup(o){return(l,t)=>(e.openBlock(),e.createElementBlock("div",Ye,[e.createElementVNode("div",Ge,[e.createElementVNode("div",We,[e.createVNode(Oe,{color:"#F47A1F",class:"mx-auto"}),t[0]||(t[0]=e.createElementVNode("div",{class:"flex flex-col text-center",style:{gap:"2px"}},[e.createElementVNode("p",{class:"text-heading-text font-medium text-header-2xl"},"₦2,500.00"),e.createElementVNode("p",{class:"text-sub-copy font-regular text-body-3xs"}," Has been paid successfully ")],-1))]),e.createElementVNode("div",Je,[e.createElementVNode("div",Xe,[e.createVNode(B,{type:"horizontal",label:"Order ID",value:"9900009000-8890-8829hd7"})]),e.createElementVNode("div",Qe,[e.createVNode(B,{type:"horizontal",label:"Payment date",value:"July 24, 2025"})])])]),e.createElementVNode("div",et,[e.createVNode(V,{label:"Return to Merchant Website",type:"secondary",customClass:"w-full"})])]))}}),ot={key:0,class:"mb-0 text-body-2xs font-normal text-heading-text"},lt={key:0,class:"text-orange-required"},nt=["type","value","disabled","placeholder","inputmode"],at={key:1,class:"animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"},rt={key:1,class:"text-body-3xs text-light-copy"},st={key:2,class:"text-body-3xs text-red-500"},b=e.defineComponent({__name:"input",props:{label:{default:""},type:{default:"text"},placeholder:{default:void 0},validationError:{default:""},hint:{default:""},mask:{default:""},rules:{default:()=>[]},isAmountInput:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},showCopyIcon:{type:Boolean,default:!1},modelValue:{default:void 0},defaultValue:{default:""},className:{default:""}},emits:["update:modelValue","blur","copied"],setup(o,{emit:l}){const t=o,a=l,n=e.computed(()=>t.modelValue!==void 0),r=e.ref(t.modelValue??t.defaultValue??""),c=e.ref(""),i=e.ref(""),d=e.ref(null);e.watch(()=>t.modelValue,h=>{n.value&&(r.value=h??"")});const s=e.computed(()=>t.isAmountInput?M(r.value.replace(/,/g,"")):r.value);function m(h){const $=h.target.value.replace(/,/g,"");n.value||(r.value=$),a("update:modelValue",$),e.nextTick(()=>{const w=d.value;if(w){const S=w.value.length;w.setSelectionRange(S,S)}})}function f(){a("blur",r.value)}function p(h){t.rules.includes("numeric")&&se(h)}const k=e.computed(()=>t.disabled?"bg-grey-50 cursor-not-allowed":"bg-white"),g=e.computed(()=>t.validationError||i.value?"border-red-300 bg-red-50":"border-grey-100");function _(h){return navigator.clipboard.writeText(h)}function A(){_(r.value).then(()=>{i.value="",c.value="Text copied to clipboard",a("copied")}).catch(()=>{c.value="",i.value="Failed to copy text to clipboard"})}return(h,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-2",h.className])},[h.label?(e.openBlock(),e.createElementBlock("p",ot,[e.createTextVNode(e.toDisplayString(h.label)+" ",1),h.required?(e.openBlock(),e.createElementBlock("span",lt," *")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["border-c px-3 py-2 flex items-center justify-between rounded-md h-12",k.value,g.value])},[e.renderSlot(h.$slots,"prefix"),e.createElementVNode("input",{ref_key:"inputEl",ref:d,type:h.type,value:s.value,disabled:h.disabled,placeholder:h.placeholder??(h.label?`Enter ${h.label.toLowerCase()}`:void 0),inputmode:h.isAmountInput?"decimal":void 0,class:"search-input bg-transparent outline-none border-none focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal w-full",onInput:m,onBlur:f,onKeydown:p},null,40,nt),h.loading?(e.openBlock(),e.createElementBlock("div",at)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(h.$slots,"suffix"),h.showCopyIcon&&r.value.trim()!==""?(e.openBlock(),e.createBlock(x,{key:0,src:"assets/images/copyIcon.svg",alt:"copy",width:16,height:16,customClass:"cursor-pointer hover:opacity-70 transition-opacity",onClick:A})):e.createCommentVNode("",!0)],64))],2),h.hint||c.value?(e.openBlock(),e.createElementBlock("p",rt,e.toDisplayString(c.value||h.hint),1)):e.createCommentVNode("",!0),h.validationError||i.value?(e.openBlock(),e.createElementBlock("p",st,e.toDisplayString(i.value||h.validationError),1)):e.createCommentVNode("",!0)],2))}}),ct=["width","height"],it={opacity:"0.6"},ut=["fill"],dt=e.defineComponent({__name:"icon-chevron-down",props:{width:{default:24},height:{default:24},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("g",it,[e.createElementVNode("path",{d:"M16.5813 7.83128L10.3313 14.0813C10.2434 14.1691 10.1242 14.2184 10 14.2184C9.87581 14.2184 9.75667 14.1691 9.66878 14.0813L3.41878 7.83128C3.33598 7.74242 3.2909 7.62489 3.29304 7.50345C3.29518 7.38201 3.34438 7.26615 3.43026 7.18026C3.51615 7.09438 3.63201 7.04518 3.75345 7.04304C3.87489 7.0409 3.99242 7.08598 4.08128 7.16878L10 13.0867L15.9188 7.16878C16.0076 7.08598 16.1252 7.0409 16.2466 7.04304C16.368 7.04518 16.4839 7.09438 16.5698 7.18026C16.6557 7.26615 16.7049 7.38201 16.707 7.50345C16.7092 7.62489 16.6641 7.74242 16.5813 7.83128Z",fill:e.unref(r)},null,8,ut)])],16,ct))}}),pt=["width","height"],mt={opacity:"0.7"},ft=["fill"],ht=e.defineComponent({__name:"icon-chevron-up",props:{width:{default:24},height:{default:24},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("g",mt,[e.createElementVNode("path",{d:"M2.73508 9.73495L7.73508 4.73495C7.80539 4.66473 7.9007 4.62528 8.00008 4.62528C8.09945 4.62528 8.19476 4.66473 8.26508 4.73495L13.2651 9.73495C13.3313 9.80604 13.3674 9.90006 13.3657 9.99722C13.364 10.0944 13.3246 10.1871 13.2559 10.2558C13.1872 10.3245 13.0945 10.3638 12.9973 10.3655C12.9002 10.3673 12.8062 10.3312 12.7351 10.265L8.00008 5.53058L3.26508 10.265C3.19399 10.3312 3.09997 10.3673 3.00282 10.3655C2.90566 10.3638 2.81297 10.3245 2.74427 10.2558C2.67556 10.1871 2.6362 10.0944 2.63449 9.99722C2.63277 9.90006 2.66884 9.80604 2.73508 9.73495Z",fill:e.unref(r)},null,8,ft)])],16,pt))}}),vt={class:"mb-0 text-body-3xs font-medium text-orange-500"},yt=e.defineComponent({__name:"hint",props:{hint:{}},setup(o){return(l,t)=>(e.openBlock(),e.createElementBlock("p",vt,e.toDisplayString(l.hint),1))}}),Ct={key:0,class:"mb-0 text-body-2xs font-normal text-heading-text"},gt={key:0,class:"text-orange-required"},bt=["aria-expanded","aria-controls","aria-disabled","aria-activedescendant"],_t={class:"flex items-center gap-2"},kt={class:"flex items-center gap-2"},xt={key:0,class:"inline-block h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin"},Vt=["aria-label"],wt={key:0,class:"px-4 pt-2 pb-1"},Bt=["placeholder"],Nt=["onClick","id","aria-selected"],Et={class:"mb-0 text-body-2xs font-medium"},T=e.defineComponent({__name:"select",props:{options:{default:()=>[]},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""},placeholder:{default:"Select an option"},hasSearch:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},validationError:{default:""},label:{default:""},hint:{default:""},required:{type:Boolean,default:!1},itemImageType:{default:null}},emits:["update:modelValue","change"],setup(o,{emit:l}){const t=o,a=l,n=e.ref(!1),r=e.ref(t.defaultValue??t.modelValue??""),c=e.ref([...t.options]),i=e.ref(-1),d=e.ref(null),s=e.ref(null),m=e.ref(null),f=e.computed(()=>t.modelValue!==void 0);e.watch(()=>t.modelValue,u=>{f.value&&(r.value=u??"")}),e.watch(()=>t.options,u=>{c.value=[...u]},{immediate:!0});const p=e.computed(()=>{const u=f.value?t.modelValue:r.value;return t.options.find(v=>v.value===u)??null}),k=e.computed(()=>{var u;return((u=p.value)==null?void 0:u.label)||t.placeholder||(t.label?`Select ${t.label}`:"Select an option")});function g(){if(t.disabled||n.value)return;c.value=[...t.options];const u=p.value?Math.max(0,t.options.findIndex(v=>v.value===p.value.value)):0;i.value=u,n.value=!0,e.nextTick(()=>{t.hasSearch&&m.value&&(m.value.focus(),m.value.select())})}function _(){n.value&&(n.value=!1,i.value=-1)}function A(){t.disabled||(n.value?_():g())}function h(u){if(!n.value)return;const v=u.target,C=d.value,y=s.value;C&&!C.contains(v)&&y&&!y.contains(v)&&_()}e.watch(n,u=>{u?document.addEventListener("mousedown",h):document.removeEventListener("mousedown",h)}),e.onBeforeUnmount(()=>document.removeEventListener("mousedown",h));function E(u){f.value||(r.value=u),a("update:modelValue",u),a("change",u),_()}function $(u){const v=u.target.value.toLowerCase(),C=t.options.filter(y=>y.label.toLowerCase().includes(v));c.value=C,i.value=C.length?0:-1}function w(u){if(!t.disabled)switch(u.key){case"Enter":case" ":case"Spacebar":case"ArrowDown":u.preventDefault(),n.value?D(1):g();break;case"ArrowUp":u.preventDefault(),n.value?D(-1):g();break;case"Escape":n.value&&(u.preventDefault(),_());break}}function S(u){switch(u.key){case"ArrowDown":u.preventDefault(),D(1);break;case"ArrowUp":u.preventDefault(),D(-1);break;case"Home":u.preventDefault(),i.value=c.value.length?0:-1,P(0);break;case"End":u.preventDefault(),i.value=c.value.length-1,P(c.value.length-1);break;case"Enter":if(u.preventDefault(),i.value>=0){const v=c.value[i.value];v&&E(v.value)}break;case"Escape":u.preventDefault(),_();break;case"Tab":_();break}}function D(u){if(!c.value.length)return;const v=c.value.length-1,C=i.value<0?0:Math.min(v,Math.max(0,i.value+u));i.value=C,P(C)}function P(u){var y;const v=s.value;if(!v)return;const C=v.querySelectorAll("[data-option]");u>=0&&u<C.length&&((y=C[u])==null||y.scrollIntoView({block:"nearest"}))}const G=e.computed(()=>t.disabled?"bg-grey-100 cursor-not-allowed":"bg-white"),W=e.computed(()=>t.validationError?"border-red-300 bg-red-50":"border-grey-100 bg-white"),{options:Ho,placeholder:Uo,hasSearch:J,disabled:X,loading:Q,validationError:H,label:L,hint:U,required:ee,itemImageType:z,className:te}=t;return(u,v)=>{var C;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-2 relative",e.unref(te)])},[e.unref(L)?(e.openBlock(),e.createElementBlock("p",Ct,[e.createTextVNode(e.toDisplayString(e.unref(L))+" ",1),e.unref(ee)?(e.openBlock(),e.createElementBlock("span",gt," *")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"triggerRef",ref:d,class:e.normalizeClass(["border-c rounded-md flex items-center justify-between h-12 cursor-pointer px-3 py-2",G.value,W.value]),role:"combobox","aria-haspopup":"listbox","aria-expanded":n.value,"aria-controls":n.value?"select-menu":void 0,"aria-disabled":e.unref(X)||void 0,"aria-activedescendant":n.value&&i.value>=0?`option-${i.value}`:void 0,tabindex:"0",onClick:A,onKeydown:w},[e.createElementVNode("div",_t,[e.renderSlot(u.$slots,"prefix"),e.createElementVNode("div",kt,[p.value&&e.unref(z)==="country"&&p.value.countryCode?(e.openBlock(),e.createBlock(x,{key:0,src:`https://flagcdn.com/w40/${p.value.countryCode.toLowerCase()}.png`,alt:p.value.countryCode,width:28,customClass:"rounded-lg"},null,8,["src","alt"])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:e.normalizeClass(["text-body-2xs font-normal mb-0",(C=p.value)!=null&&C.label?"text-sub-copy":"text-grey-500"])},e.toDisplayString(k.value),3)])]),e.unref(Q)?(e.openBlock(),e.createElementBlock("span",xt)):n.value?(e.openBlock(),e.createBlock(ht,{key:1,color:"#8FAECA"})):(e.openBlock(),e.createBlock(dt,{key:2,color:"#8FAECA"}))],42,bt),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"menuRef",ref:s,id:"select-menu",class:"border-c bg-white rounded-md border-grey-border text-body-xs font-normal text-input-grey w-full mt-2 max-h-22rem overflow-y-auto",role:"listbox","aria-label":e.unref(L)||"Options",style:{position:"absolute",top:"100%",zIndex:10},onKeydown:S},[e.unref(J)?(e.openBlock(),e.createElementBlock("div",wt,[e.createElementVNode("input",{ref_key:"searchRef",ref:m,type:"text",placeholder:`Search ${e.unref(L)||"options"}`,class:"bg-transparent outline-none border-b pb-2 w-full focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal",onInput:$},null,40,Bt)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(y,F)=>{var j;return e.openBlock(),e.createElementBlock("div",{key:y.value,onClick:zo=>E(y.value),id:`option-${F}`,"data-option":"",role:"option","aria-selected":((j=p.value)==null?void 0:j.value)===y.value,class:e.normalizeClass(["px-4 py-3 first:pt-0 hover:bg-gray-100 flex items-center gap-2 cursor-pointer",F===i.value?"bg-gray-100":""])},[e.unref(z)==="country"&&y.countryCode?(e.openBlock(),e.createBlock(x,{key:0,src:`https://flagcdn.com/w40/${y.countryCode.toLowerCase()}.png`,alt:y.countryCode,width:28,customClass:"rounded-lg"},null,8,["src","alt"])):e.createCommentVNode("",!0),e.createElementVNode("p",Et,e.toDisplayString(y.label),1)],10,Nt)}),128))],40,Vt)):e.createCommentVNode("",!0),e.unref(U)?(e.openBlock(),e.createBlock(yt,{key:2,hint:e.unref(U)},null,8,["hint"])):e.createCommentVNode("",!0),e.unref(H)?(e.openBlock(),e.createBlock(Z,{key:3,errorMessage:e.unref(H)},null,8,["errorMessage"])):e.createCommentVNode("",!0)],2)}}}),$t={class:"flex flex-col gap-6"},St={key:0,class:"grid grid-cols-2 gap-6 overflow-y-auto"},Dt={class:"col-span-2"},Lt={key:1,class:"grid grid-cols-2 gap-6 overflow-y-auto",style:{"max-height":"320px"}},Mt={class:"col-span-2"},Tt={class:"col-span-2"},At=e.defineComponent({__name:"pay-by-card",setup(o){const l=e.ref(0);return(t,a)=>(e.openBlock(),e.createElementBlock("div",$t,[l.value===0?(e.openBlock(),e.createElementBlock("div",St,[e.createVNode(b,{label:"First Name",required:!0}),e.createVNode(b,{label:"Last Name",required:!0}),e.createVNode(b,{label:"Email",required:!0}),e.createVNode(b,{label:"Phone Number",required:!0}),e.createVNode(T,{label:"Select Country",required:!0,options:[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"}]}),e.createVNode(T,{label:"Select State",required:!0,options:[{label:"California",value:"CA"},{label:"Texas",value:"TX"},{label:"New York",value:"NY"}]}),e.createVNode(b,{label:"City",required:!0}),e.createVNode(b,{label:"Postal Code",required:!0}),e.createElementVNode("div",Dt,[e.createVNode(b,{label:"Street Address",required:!0})])])):l.value===1?(e.openBlock(),e.createElementBlock("div",Lt,[e.createElementVNode("div",Mt,[e.createVNode(b,{label:"Card Name",required:!0})]),e.createElementVNode("div",Tt,[e.createVNode(b,{label:"Card Number",required:!0})]),e.createVNode(b,{label:"Expiry Date",required:!0}),e.createVNode(b,{label:"CVV",required:!0})])):e.createCommentVNode("",!0),e.createVNode(V,{label:l.value===0?"Proceed":"Pay",type:"primary",customClass:"w-full",onClick:a[0]||(a[0]=n=>l.value===0&&(l.value=1))},null,8,["label"])]))}}),Pt={class:"flex flex-col gap-10"},It={class:"text-sub-copy text-sm font-semibold text-center"},Ht={class:"bg-[#EFF7FF] p-4 rounded-lg flex flex-col gap-6"},Ut={class:"flex items-center justify-between"},zt={class:"flex items-center justify-between"},Ft={class:"w-2/3 mx-auto text-center text-body-2xs font-medium text-sub-copy"},jt={class:"text-orange-500"},qt={class:"flex flex-col gap-4"},Kt=e.defineComponent({__name:"pay-by-transfer",props:{amountDisplay:{default:"NGN 200,500.00"},bankName:{default:"Teerus MFB"},accountNumber:{default:"0001928940"},initialSeconds:{default:30*60}},emits:["confirm","cancel"],setup(o,{emit:l}){const t=o,a=l,n=e.ref(t.initialSeconds),r=e.ref(null),c=e.computed(()=>{const i=Math.max(0,n.value),d=Math.floor(i/60),s=i%60;return`${String(d).padStart(2,"0")}:${String(s).padStart(2,"0")}`});return e.onMounted(()=>{r.value=window.setInterval(()=>{n.value-=1},1e3)}),e.onBeforeUnmount(()=>{r.value&&(clearInterval(r.value),r.value=null)}),e.watch(n,i=>{i<0&&r.value&&(clearInterval(r.value),r.value=null)}),(i,d)=>(e.openBlock(),e.createElementBlock("div",Pt,[e.createElementVNode("p",It," Amount to Pay "+e.toDisplayString(i.amountDisplay),1),e.createElementVNode("div",Ht,[e.createVNode(B,{label:"Bank Name",value:i.bankName,type:"horizontal"},null,8,["value"]),e.createElementVNode("div",Ut,[e.createVNode(B,{label:"Account Number",value:i.accountNumber,type:"horizontal"},null,8,["value"]),e.createVNode(N,{color:"#9DBFDE",copyText:i.accountNumber},null,8,["copyText"])]),e.createElementVNode("div",zt,[e.createVNode(B,{label:"Amount",value:i.amountDisplay,type:"horizontal"},null,8,["value"]),e.createVNode(N,{color:"#9DBFDE",copyText:i.amountDisplay},null,8,["copyText"])])]),e.createElementVNode("p",Ft,[d[2]||(d[2]=e.createTextVNode(" This account is for this transaction only and expires in ",-1)),e.createElementVNode("span",jt,e.toDisplayString(n.value>=0?c.value:"00:00"),1)]),e.createElementVNode("div",qt,[e.createVNode(V,{label:"I have paid the money",type:"primary",customClass:"w-full",onClick:d[0]||(d[0]=s=>a("confirm"))}),e.createElementVNode("button",{type:"button",onClick:d[1]||(d[1]=s=>a("cancel")),class:"text-heading-text text-body-2xs font-medium text-center py-2 cursor-pointer"}," Cancel Payment ")])]))}}),Rt=["width","height"],Zt={"clip-path":"url(#clip0_10908_387048)"},Ot=["fill"],Yt={id:"clip0_10908_387048"},Gt=["fill"],Wt=e.defineComponent({__name:"icon-usdc",props:{width:{default:28},height:{default:28},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("g",Zt,[e.createElementVNode("path",{d:"M14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0ZM16.933 4.865C16.7195 4.76 16.506 4.865 16.4535 5.07762C16.4001 5.131 16.4001 5.18438 16.4001 5.29025V6.034L16.4089 6.125C16.4546 6.30501 16.5652 6.46177 16.7195 6.56512C20.8792 8.05262 23.0125 12.6726 21.4655 16.7615C20.6657 18.9928 18.9061 20.6911 16.7195 21.4883C16.506 21.5941 16.4001 21.7534 16.4001 22.0194V22.7631L16.4045 22.8401C16.4128 22.9241 16.4479 23.0033 16.5047 23.0658C16.5614 23.1284 16.6367 23.171 16.7195 23.1875C16.7729 23.1875 16.8796 23.1875 16.933 23.135C18.1331 22.7602 19.2473 22.1517 20.2113 21.3446C21.1753 20.5375 21.9701 19.5476 22.5499 18.432C23.1298 17.3164 23.4833 16.0972 23.59 14.8444C23.6967 13.5917 23.5546 12.3302 23.1718 11.1326C22.2128 8.10512 19.866 5.8205 16.933 4.865ZM11.2805 4.8125C11.2271 4.8125 11.1204 4.8125 11.067 4.865C9.86688 5.23978 8.75274 5.84826 7.78874 6.6554C6.82475 7.46254 6.02993 8.4524 5.45006 9.56797C4.87019 10.6836 4.51673 11.9028 4.41001 13.1556C4.30329 14.4083 4.44543 15.6698 4.82825 16.8674C5.78725 19.8424 8.08062 22.1261 11.067 23.0816C11.2805 23.1875 11.494 23.0816 11.5465 22.869C11.5999 22.8165 11.5999 22.7622 11.5999 22.6564V21.9126L11.5911 21.8426C11.5544 21.6947 11.417 21.5259 11.2805 21.4349C7.12075 19.9474 4.9875 15.3274 6.5345 11.2385C7.33425 9.00725 9.09388 7.30887 11.2805 6.51175C11.494 6.40587 11.5999 6.24663 11.5999 5.98063V5.23688L11.5955 5.15987C11.5872 5.07585 11.5521 4.99673 11.4954 4.93418C11.4386 4.87163 11.3633 4.82898 11.2805 4.8125ZM14.3736 7.574H13.573L13.496 7.581C13.321 7.616 13.1933 7.7665 13.146 7.99925V9.22075L12.9649 9.24875C11.4704 9.51475 10.5341 10.5464 10.5341 11.823C10.5341 13.5748 11.5999 14.2651 13.8399 14.5311C15.3335 14.7963 15.813 15.1156 15.813 15.9653C15.813 16.814 15.0666 17.3985 14.0534 17.3985C12.6665 17.3985 12.187 16.8149 12.0269 16.0177C11.9744 15.806 11.8134 15.6992 11.6532 15.6992H10.7467L10.6776 15.7054C10.5913 15.7193 10.513 15.7641 10.4572 15.8313C10.4014 15.8985 10.3718 15.9838 10.374 16.0711V16.1236L10.4029 16.2811C10.6566 17.5271 11.5106 18.4187 13.2003 18.6734V19.9483L13.2072 20.0252C13.2422 20.1985 13.3936 20.3263 13.6273 20.3726H14.427L14.504 20.3656C14.679 20.3306 14.8067 20.1801 14.854 19.9483V18.6725L15.0351 18.6375C16.534 18.3207 17.5201 17.2366 17.5201 15.8576C17.5201 13.9991 16.4001 13.3621 14.1601 13.0961C12.5598 12.8835 12.2404 12.4591 12.2404 11.7154C12.2404 10.9716 12.7741 10.4939 13.8399 10.4939C14.7998 10.4939 15.3335 10.8124 15.5995 11.6095C15.6272 11.6866 15.6779 11.7533 15.7447 11.8007C15.8115 11.8481 15.8912 11.8739 15.9731 11.8746H16.8262L16.8954 11.8694C16.982 11.8556 17.0606 11.8108 17.1166 11.7434C17.1726 11.6759 17.2022 11.5904 17.1999 11.5027V11.4503L17.1675 11.2989C17.0361 10.755 16.7366 10.2664 16.3115 9.90255C15.8864 9.53872 15.3574 9.31821 14.7997 9.27238V7.99925L14.7928 7.92225C14.7578 7.74812 14.6073 7.62038 14.3736 7.574Z",fill:e.unref(r)},null,8,Ot)]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Yt,[e.createElementVNode("rect",{width:"28",height:"28",fill:e.unref(r)},null,8,Gt)])])],16,Rt))}}),Jt=["width","height"],Xt={"clip-path":"url(#clip0_10908_387045)"},Qt=["fill"],eo={id:"clip0_10908_387045"},to=["fill"],oo=e.defineComponent({__name:"icon-usdt",props:{width:{default:28},height:{default:28},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("g",Xt,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28ZM15.6818 12.0689V9.99863H20.419V6.84162H7.52063V9.99863H12.2579V12.068C8.40787 12.2447 5.5125 13.0077 5.5125 13.9212C5.5125 14.8347 8.40787 15.5969 12.2579 15.7745V22.4088H15.6818V15.7727C19.5256 15.596 22.414 14.8339 22.414 13.9212C22.414 13.0086 19.5256 12.2465 15.6818 12.0689ZM15.6818 15.2101V15.2084C15.5855 15.2154 15.0894 15.2451 13.9825 15.2451C13.0987 15.2451 12.4766 15.2189 12.2579 15.2084V15.211C8.85587 15.0614 6.31662 14.469 6.31662 13.7602C6.31662 13.0524 8.85587 12.46 12.2579 12.3077V14.6212C12.4801 14.637 13.1171 14.6746 13.9974 14.6746C15.0535 14.6746 15.5829 14.6309 15.6818 14.6221V12.3095C19.0768 12.4609 21.6099 13.0532 21.6099 13.7602C21.6099 14.469 19.0768 15.0596 15.6818 15.2101Z",fill:e.unref(r)},null,8,Qt)]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",eo,[e.createElementVNode("rect",{width:"28",height:"28",fill:e.unref(r)},null,8,to)])])],16,Jt))}}),lo={key:1,class:"flex items-center gap-1"},I=e.defineComponent({__name:"currency-amount",props:{currency:{},amount:{},textClass:{default:""},iconColorClass:{default:""},iconWidth:{default:16},iconHeight:{default:16}},setup(o){const l=o,t=e.computed(()=>{var a;return(a=l.currency)==null?void 0:a.toUpperCase()});return(a,n)=>t.value!=="USDT"&&t.value!=="USDC"?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(a.textClass)},e.toDisplayString(e.unref(M)(a.amount,t.value)),3)):(e.openBlock(),e.createElementBlock("div",lo,[t.value==="USDT"?(e.openBlock(),e.createBlock(oo,{key:0,width:a.iconWidth,height:a.iconHeight,color:a.iconColorClass},null,8,["width","height","color"])):e.createCommentVNode("",!0),t.value==="USDC"?(e.openBlock(),e.createBlock(Wt,{key:1,width:a.iconWidth,height:a.iconHeight,color:a.iconColorClass},null,8,["width","height","color"])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:e.normalizeClass(a.textClass)},e.toDisplayString(e.unref(M)(a.amount)),3)]))}}),no=["width","height"],ao=["fill"],ro=["fill"],so=["fill"],co=["fill"],io=e.defineComponent({__name:"icon-arrow-swap",props:{width:{default:16},height:{default:17},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M10.3265 14.1948C10.1998 14.1948 10.0731 14.1481 9.97313 14.0481C9.77979 13.8548 9.77979 13.5348 9.97313 13.3414L13.3131 10.0014C13.5065 9.80811 13.8265 9.80811 14.0198 10.0014C14.2131 10.1948 14.2131 10.5148 14.0198 10.7081L10.6798 14.0481C10.5798 14.1414 10.4531 14.1948 10.3265 14.1948Z",fill:e.unref(r)},null,8,ao),e.createElementVNode("path",{d:"M13.6668 10.8477H2.3335C2.06016 10.8477 1.8335 10.621 1.8335 10.3477C1.8335 10.0743 2.06016 9.84766 2.3335 9.84766H13.6668C13.9402 9.84766 14.1668 10.0743 14.1668 10.3477C14.1668 10.621 13.9402 10.8477 13.6668 10.8477Z",fill:e.unref(r)},null,8,ro),e.createElementVNode("path",{d:"M2.33329 6.86079C2.20663 6.86079 2.07996 6.81413 1.97996 6.71413C1.78663 6.52079 1.78663 6.20079 1.97996 6.00746L5.31996 2.66746C5.51329 2.47413 5.83329 2.47413 6.02663 2.66746C6.21996 2.86079 6.21996 3.18079 6.02663 3.37413L2.68663 6.71413C2.59329 6.80746 2.45996 6.86079 2.33329 6.86079Z",fill:e.unref(r)},null,8,so),e.createElementVNode("path",{d:"M13.6668 6.86133H2.3335C2.06016 6.86133 1.8335 6.63466 1.8335 6.36133C1.8335 6.08799 2.06016 5.86133 2.3335 5.86133H13.6668C13.9402 5.86133 14.1668 6.08799 14.1668 6.36133C14.1668 6.63466 13.9402 6.86133 13.6668 6.86133Z",fill:e.unref(r)},null,8,co)],16,no))}}),uo={class:"flex flex-col gap-6"},po={class:"grid grid-cols-1 gap-6"},mo={key:1,class:"flex flex-col gap-6"},fo={class:"mx-auto"},ho={class:"flex flex-col gap-6 border-c border-grey-100 p-4 rounded-2xl bg-light-white-50"},vo={class:"border-b border-grey-border pb-4 flex flex-col gap-2"},yo={class:"flex justify-between"},Co={class:"flex flex-col gap-1"},go={class:"flex items-center gap-2"},bo={class:"pb-4 flex flex-col gap-2"},_o={class:"flex justify-between"},ko={class:"flex flex-col gap-2"},xo={class:"flex items-center justify-between border-b border-grey-border py-3"},Vo={class:"flex items-center justify-between py-4"},wo={class:"flex flex-col gap-6"},Bo=e.defineComponent({__name:"pay-by-stable-coin",emits:["proceed"],setup(o,{emit:l}){const t=l,a=e.ref(0);function n(){a.value=1,t("proceed")}return(r,c)=>(e.openBlock(),e.createElementBlock("div",uo,[a.value===0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",po,[e.createVNode(T,{label:"Select Crypto",required:!0,options:[{label:"USDT",value:"USDT"},{label:"USDC",value:"USDC"},{label:"BUSD",value:"BUSD"}]}),e.createVNode(T,{label:"Select Network",required:!0,options:[{label:"Ethereum",value:"ETH"},{label:"Binance Smart Chain",value:"BSC"},{label:"Polygon",value:"MATIC"}]})]),e.createVNode(V,{label:"Pay",type:"primary",customClass:"w-full",onClick:n})],64)):(e.openBlock(),e.createElementBlock("div",mo,[e.createElementVNode("div",fo,[e.createVNode(x,{src:"../../../assets/images/stable-coin-qr-code.png",alt:"QR Code",width:122,height:122,customClass:"mb-1"}),c[0]||(c[0]=e.createElementVNode("p",{class:"mb-0 text-body-4xs text-light-copy font-normal text-center"}," USDC ",-1))]),e.createElementVNode("div",ho,[e.createElementVNode("div",vo,[c[4]||(c[4]=e.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"},"Network",-1)),e.createElementVNode("div",yo,[e.createElementVNode("div",Co,[c[3]||(c[3]=e.createElementVNode("p",{class:"mb-0 text-body-2xs font-medium text-sub-copy"}," BNB Smart Chain (BEP20) ",-1)),e.createElementVNode("div",go,[c[1]||(c[1]=e.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"}," *Est. arrival = 3 mins ",-1)),c[2]||(c[2]=e.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"},"|",-1)),e.createVNode(I,{currency:"USDC",amount:10,textClass:"mb-0 text-body-3xs text-light-copy font-normal",iconColorClass:"#557591",iconWidth:12,iconHeight:12})])]),e.createVNode(io)])]),e.createElementVNode("div",bo,[c[6]||(c[6]=e.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"}," Deposit Address > ",-1)),e.createElementVNode("div",_o,[c[5]||(c[5]=e.createElementVNode("p",{class:"mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words"}," 0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6 ",-1)),e.createVNode(N,{copyText:"0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6"})])])]),e.createElementVNode("div",ko,[e.createElementVNode("div",xo,[c[7]||(c[7]=e.createElementVNode("p",{class:"mb-0 text-body-2xs font-medium text-primary-black"}," Network fee ",-1)),e.createVNode(I,{currency:"USDC",amount:12,textClass:"mb-0 text-body-2xs font-extrabold text-primary-black",iconColorClass:"#231F20"})]),e.createElementVNode("div",Vo,[c[8]||(c[8]=e.createElementVNode("p",{class:"mb-0 text-body-lg font-semibold text-primary-black"},"Pay",-1)),e.createVNode(I,{currency:"USDC",amount:15,textClass:"mb-0 text-body-lg font-extrabold text-primary-black",iconColorClass:"#231F20",iconWidth:20,iconHeight:20})])]),e.createElementVNode("div",wo,[e.createVNode(V,{label:"Confirm Payment",type:"primary",customClass:"w-full"})])]))]))}}),No={class:"grid grid-cols-3"},Eo={key:0,class:"bg-[#EFF7FF] px-6 py-8 flex flex-col gap-5 col-span-1 rounded-l-xl"},$o={class:"col-span-2"},So={key:0},Do={key:0,class:"flex items-center justify-between px-12 py-8"},Lo={key:1,class:"bg-heading-text rounded flex flex-col justify-center",style:{width:"52px",height:"52px"}},Mo={class:"flex flex-col gap-1"},To={class:"text-body-2xs font-regular text-sub-copy text-right"},Ao={class:"text-orange-500 font-extrabold"},Po={class:"overflow-y-scroll px-10 pb-10 pt-2"},Io=e.defineComponent({__name:"checkout-card",props:{secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})},options:{default:void 0}},setup(o){const l=o,t=e.ref("PAYMENT"),a=e.ref([{label:"Card",value:"CARD"},{label:"Bank Transfer",value:"BANK_TRANSFER"},{label:"Stable Coin",value:"STABLE_COIN"}]),n=e.computed(()=>l.paymentObject.currency==="NGN"?a.value.filter(d=>d.value!=="STABLE_COIN"):a.value.filter(d=>d.value!=="BANK_TRANSFER")),r=e.ref(a.value[0].value);function c(d){r.value=d}const i=e.computed(()=>M(l.paymentObject.amount||0,l.paymentObject.currency||"NGN"));return(d,s)=>(e.openBlock(),e.createBlock(Se,{showBackButton:t.value==="STABLE_COIN_PAYMENT",onBack:s[2]||(s[2]=m=>t.value="PAYMENT")},{default:e.withCtx(()=>{var m;return[e.createElementVNode("div",No,[t.value==="PAYMENT"?(e.openBlock(),e.createElementBlock("div",Eo,[s[3]||(s[3]=e.createElementVNode("p",{class:"text-heading-text text-body-xs font-semibold"},"Pay with",-1)),e.createVNode(Pe,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=f=>r.value=f),options:n.value,onSelectedChange:c},null,8,["modelValue","options"])])):e.createCommentVNode("",!0),e.createElementVNode("div",$o,[t.value==="PAYMENT"||t.value==="STABLE_COIN_PAYMENT"?(e.openBlock(),e.createElementBlock("div",So,[t.value==="PAYMENT"?(e.openBlock(),e.createElementBlock("div",Do,[(m=d.options)!=null&&m.imageUrl?(e.openBlock(),e.createBlock(x,{key:0,src:d.options.imageUrl,alt:"Merchant Logo",width:52,height:52,customClass:"rounded-lg"},null,8,["src"])):(e.openBlock(),e.createElementBlock("div",Lo,[...s[4]||(s[4]=[e.createElementVNode("p",{class:"text-white text-center text-body-2xs font-medium"}," Logo ",-1)])])),e.createElementVNode("div",Mo,[s[6]||(s[6]=e.createElementVNode("p",{class:"text-body-2xs font-regular text-sub-copy text-right"}," Raymahni Merchant LLC ",-1)),e.createElementVNode("p",To,[s[5]||(s[5]=e.createTextVNode(" Pay: ",-1)),e.createElementVNode("span",Ao,e.toDisplayString(i.value),1)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",Po,[r.value==="CARD"?(e.openBlock(),e.createBlock(At,{key:0})):r.value==="BANK_TRANSFER"?(e.openBlock(),e.createBlock(Kt,{key:1})):(e.openBlock(),e.createBlock(Bo,{key:2,onProceed:s[1]||(s[1]=f=>t.value="STABLE_COIN_PAYMENT")}))])])):t.value==="SUCCESS"?(e.openBlock(),e.createBlock(tt,{key:1})):e.createCommentVNode("",!0)])])]}),_:1},8,["showBackButton"]))}});exports.BzpCheckoutButton=ve;exports.BzpCheckoutCard=Io;exports.BzpCheckoutIframe=Y;exports.createMidenPG=oe;exports.useMidenPG=le;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),q=Symbol("MidenPGConfig");function oe(o){if(!(o!=null&&o.publishableKey))throw new Error("[@miden-npm/vue] publishableKey is required");return{install(l){l.provide(q,o)}}}function le(){const o=e.inject(q);if(!o)throw new Error("[@miden-npm/vue] Missing provider. Did you forget to app.use(createMidenPG(...))?");return o}const K=o=>o==null||typeof o!="object"?!1:Object.values(o).every(Boolean),ne=o=>o==="sandbox"?"https://sandbox-api.midencards.io/payment-gateway-api":"",ae=o=>o==="USD"?"$":o==="NGN"?"₦":o==="EUR"?"€":o==="GBP"?"£":o==="JPY"||o==="CNY"?"¥":o==="USDC"||o==="usdc"?"$⧫":o==="USDT"||o==="usdt"?"₮":"$",M=(o,l)=>{const t=typeof o=="string"?parseFloat(o):o;return isNaN(t)?"0":`${l?ae(l):""} ${t==null?void 0:t.toLocaleString("en-US")}`},re=(o,l)=>o.length<=l?o:o.slice(0,l)+"...",se=o=>{const l=["Backspace","Tab","ArrowLeft","ArrowRight","Delete","Home","End","."];(o.ctrlKey||o.metaKey)&&["a","c","v","x"].includes(o.key.toLowerCase())||(!l.includes(o.key)&&!/^\d$/.test(o.key)&&o.preventDefault(),o.key==="."&&o.target.value.includes(".")&&o.preventDefault())},ce=["width","height"],ie=["stroke"],ue=["fill"],R=e.defineComponent({__name:"icon-loader",props:{size:{default:24},color:{default:"currentColor"},className:{default:""}},setup(o){const l=o,t=e.useAttrs(),{size:a,color:n,className:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({class:["animate-spin",e.unref(r)],xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:e.unref(a),height:e.unref(a),role:"img","aria-label":"loading"},e.unref(t)),[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:e.unref(n),"stroke-width":"4"},null,8,ie),e.createElementVNode("path",{class:"opacity-75",fill:e.unref(n),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,8,ue)],16,ce))}}),de=["disabled"],pe={key:1},w=e.defineComponent({__name:"button",props:{label:{default:""},type:{default:"neutral"},size:{default:"de"},paddingClassX:{default:"px-8"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},customClass:{default:""}},emits:["click"],setup(o,{emit:l}){const t=o,a=l,n=e.computed(()=>t.disabled||t.loading);function r(){n.value||a("click")}function c(s,m){if(m)return"bg-gray-200 text-gray-400 cursor-not-allowed border-gray-200";switch(s){case"primary":return"bg-primary text-white hover:bg-primary-black hover:border-primary-black border-primary";case"secondary":return"bg-gray-200 border-gray-200 hover:bg-gray-300 text-heading-text";case"danger":return"bg-red-500 border-red-500 text-white hover:bg-red-600";case"neutral":default:return"bg-off-white border-grey-border hover:bg-gray-100"}}function i(s){switch(s){case"de":return"h-68px rounded-xl";case"md":return"h-42px rounded-lg";case"sm":return"h-32px rounded-md";default:return"h-68px rounded-xl"}}function d(s){switch(s){case"de":case"md":case"sm":return"text-body-2xs font-normal";default:return"text-body-xs font-normal"}}return(s,m)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["flex items-center justify-center gap-2 py-3 border font-normal text-input-grey transition-colors duration-300 ease-in-out",c(s.type,n.value),i(s.size),s.paddingClassX,s.customClass]),type:"button",disabled:n.value,onClick:r},[e.renderSlot(s.$slots,"prefix"),s.loading?(e.openBlock(),e.createBlock(R,{key:0})):(e.openBlock(),e.createElementBlock("div",pe,[s.label?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["mb-0",d(s.size)])},e.toDisplayString(s.label),3)):e.renderSlot(s.$slots,"default",{key:1})])),e.renderSlot(s.$slots,"suffix")],10,de))}}),me={class:"mb-0 text-body-3xs font-normal text-red-500"},Z=e.defineComponent({__name:"input-error",props:{errorMessage:{}},setup(o){return(l,t)=>(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(l.errorMessage),1))}});async function O(o,l,t){try{const a=ne(l);return await(await fetch(`${a}/api/v1/checkout/generate-payment-link2`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",merchantId:t},body:JSON.stringify({...o,LinkName:`${Date.now()}-Link`})})).json()}catch{}}const fe={key:0,class:"w-full h-48 flex flex-col justify-center items-center"},Y=e.defineComponent({__name:"checkout-iframe",props:{style:{default:()=>({width:"100%",height:"100vh",border:"0",borderRadius:"6px",overflow:"hidden"})},url:{default:void 0},secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})}},setup(o){const l=o,t=e.computed(()=>({...l.style})),a=e.ref(null),n=e.ref(null),r=e.ref(""),c=e.ref(!1);function i(){n.value&&n.value.parentNode&&n.value.parentNode.removeChild(n.value),n.value=null}function d(m){if(!a.value)return;i();const f=document.createElement("iframe");f.src=m;const p=l.style;p.width&&(f.style.width=p.width),p.height&&(f.style.height=p.height),p.border&&(f.style.border=p.border),p.borderRadius&&(f.style.borderRadius=p.borderRadius),p.overflow&&(f.style.overflow=p.overflow),a.value.appendChild(f),n.value=f}async function s(){if(l.url){d(l.url);return}if(!l.secretKey){r.value="Secret key is required.";return}if(!K(l.paymentObject)){r.value="Kindly ensure you are passing all the required data.";return}c.value=!0,r.value="";try{const m=await O(l.paymentObject,l.environment,l.secretKey);m!=null&&m.isSuccessful&&m.launchUrl?(r.value="Payment link created successfully",d(m.launchUrl)):r.value="Failed to create payment link"}catch(m){r.value=(m==null?void 0:m.message)||"Failed to create payment link"}finally{c.value=!1}}return e.onMounted(()=>{s()}),e.watch(()=>l.url,m=>{m&&d(m)}),e.onBeforeUnmount(()=>{i()}),(m,f)=>c.value?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(R)])):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"containerRef",ref:a,style:e.normalizeStyle(t.value)},null,4))}}),he={key:1},ye=e.defineComponent({__name:"checkout-button",props:{secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})},mode:{default:"redirect"}},setup(o){const l=o,t=e.ref(""),a=e.ref(""),n=e.ref(!1);async function r(){if(!l.secretKey){t.value="Secret key is required.";return}if(!K(l.paymentObject)){t.value="Kindly ensure you are passing all the required data.";return}n.value=!0,t.value="";try{const s=await O(l.paymentObject,l.environment,l.secretKey);s!=null&&s.isSuccessful&&s.launchUrl?(a.value=s.launchUrl,t.value="Payment link created successfully",l.mode==="redirect"&&window.open(s.launchUrl,"_blank","noopener,noreferrer")):t.value="Failed to create payment link"}catch(s){t.value=(s==null?void 0:s.message)||"Failed to create payment link"}finally{n.value=!1}}const{secretKey:c,environment:i,mode:d}=l;return(s,m)=>a.value&&e.unref(d)==="iframe"?(e.openBlock(),e.createBlock(Y,{key:0,url:a.value,secretKey:e.unref(c),environment:e.unref(i)},null,8,["url","secretKey","environment"])):(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(w,{label:"Pay",type:"primary",customClass:"w-full",loading:n.value,onClick:r},null,8,["loading"]),e.createVNode(Z,{errorMessage:t.value},null,8,["errorMessage"])]))}}),ve=["width","height"],Ce=["fill"],ge=e.defineComponent({__name:"icon-chevron-left",props:{width:{default:17},height:{default:17},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M10.5 14.28C10.3734 14.28 10.2467 14.2333 10.1467 14.1333L5.80002 9.78668C5.09335 9.08001 5.09335 7.92001 5.80002 7.21335L10.1467 2.86668C10.34 2.67335 10.66 2.67335 10.8534 2.86668C11.0467 3.06001 11.0467 3.38001 10.8534 3.57335L6.50669 7.92001C6.18669 8.24001 6.18669 8.76001 6.50669 9.08001L10.8534 13.4267C11.0467 13.62 11.0467 13.94 10.8534 14.1333C10.7534 14.2267 10.6267 14.28 10.5 14.28Z",fill:e.unref(r)},null,8,Ce)],16,ve))}}),be=e.defineComponent({__name:"back",emits:["back"],setup(o,{emit:l}){return(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 cursor-pointer",onClick:a[0]||(a[0]=n=>t.$emit("back"))},[e.createVNode(ge),a[1]||(a[1]=e.createElementVNode("p",{class:"mb-0 text-body-xs font-normal"},"Back",-1))]))}}),_e=["width","height"],ke=["fill"],xe=e.defineComponent({__name:"icon-buzapay-icon",props:{width:{default:15},height:{default:13},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M9.97919 0.5C10.8854 0.5 11.6276 0.585938 12.2057 0.757812C12.7891 0.924479 13.2188 1.22396 13.4948 1.65625C13.7761 2.08333 13.9167 2.6901 13.9167 3.47656C13.9167 4.1849 13.7526 4.77083 13.4245 5.23438C13.0964 5.69792 12.5938 5.95312 11.9167 6C12.8021 6.08854 13.4401 6.40625 13.8307 6.95312C14.2214 7.49479 14.4167 8.17708 14.4167 9C14.4167 9.71354 14.3334 10.2995 14.1667 10.7578C14.0052 11.2161 13.7318 11.5729 13.3464 11.8281C12.961 12.0781 12.4375 12.2526 11.7761 12.3516C11.1198 12.4505 10.2995 12.5 9.31512 12.5H0.416687V0.5H9.97919ZM2.91669 7.77344H5.97235V11.167L10.2497 5.22754H7.19501V1.83398L2.91669 7.77344ZM5.97235 6.07617H8.2702L7.19501 7.57324V6.9248H4.89716L5.97235 5.42676V6.07617Z",fill:e.unref(r)},null,8,ke)],16,_e))}}),we={class:"checkout-card w-full h-screen flex flex-col items-center justify-center text-white"},Ve={class:"flex w-1/2"},Be={class:"flex gap-2 w-full"},Ne={class:"flex flex-col gap-8 w-full"},Ee={class:"bg-off-white rounded-xl"},$e={class:"flex items-center gap-2 justify-center"},Se=e.defineComponent({__name:"card",props:{showBackButton:{type:Boolean,default:!1}},emits:["back","close"],setup(o,{emit:l}){const t=l;return(a,n)=>(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",Ve,[a.showBackButton?(e.openBlock(),e.createBlock(be,{key:0,onBack:n[0]||(n[0]=r=>t("back"))})):e.createCommentVNode("",!0),e.createElementVNode("div",Be,[e.createElementVNode("div",Ne,[e.createElementVNode("div",Ee,[e.renderSlot(a.$slots,"default")]),e.createElementVNode("div",$e,[n[2]||(n[2]=e.createElementVNode("p",{class:"text-light-white-100 text-body-2xs font-regular"}," Powered by Buzapay ",-1)),e.createVNode(xe,{color:"#E8F4FF"})])]),e.createElementVNode("div",{class:"close-icon flex flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",onClick:n[1]||(n[1]=r=>t("close")),role:"button","aria-label":"Close"},[...n[3]||(n[3]=[e.createElementVNode("p",{class:"text-white"},"x",-1)])])])])]))}}),De=["src","height","alt"],k=e.defineComponent({__name:"image",props:{src:{},height:{default:50},width:{default:50},alt:{default:"Image"},customClass:{default:""},isFullWidth:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:l}){const t=o,a=l,{src:n,height:r,width:c,alt:i,customClass:d,isFullWidth:s}=t;return(m,f)=>(e.openBlock(),e.createElementBlock("img",{src:e.unref(n),height:e.unref(r),alt:e.unref(i),class:e.normalizeClass([e.unref(d),e.unref(s)?"w-full":""]),style:e.normalizeStyle({width:e.unref(s)?"100%":e.unref(c)+"px"}),onClick:f[0]||(f[0]=p=>a("click"))},null,14,De))}}),Le=["aria-orientation"],Me=["aria-checked","onClick"],Te={key:0,class:"bg-white w-2 h-2 rounded-full"},Ae={class:"mb-0 text-body-2xs font-medium text-heading-text"},Pe=e.defineComponent({__name:"radio-group",props:{options:{default:()=>[]},type:{default:"vertical"},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""}},emits:["update:modelValue","selectedChange"],setup(o,{emit:l}){const t=o,a=l,n=e.computed(()=>t.modelValue!==void 0),r=e.ref("");e.onMounted(()=>{if(n.value)return;const p=t.defaultValue??(t.options.length?t.options[0].value:"");r.value=p,p&&(a("update:modelValue",p),a("selectedChange",p))}),e.watch(()=>t.modelValue,p=>{n.value&&(r.value=p??"")},{immediate:!0});const c=e.computed(()=>n.value?t.modelValue??"":r.value);function i(p){n.value||(r.value=p),a("update:modelValue",p),a("selectedChange",p)}const d=e.computed(()=>t.type==="horizontal"?"flex-row gap-5":"flex-col gap-6"),{options:s,type:m,className:f}=t;return(p,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex",d.value,e.unref(f)]),role:"radiogroup","aria-orientation":e.unref(m)==="horizontal"?"horizontal":"vertical",tabindex:"0"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),g=>(e.openBlock(),e.createElementBlock("div",{key:g.value,role:"radio","aria-checked":c.value===g.value,tabindex:"-1",onClick:_=>i(g.value),class:"flex items-center gap-2 cursor-pointer transition-colors duration-200"},[e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full border flex items-center justify-center",c.value===g.value?"bg-orange-500 border-orange-500":"bg-white border-grey-200"])},[c.value===g.value?(e.openBlock(),e.createElementBlock("div",Te)):e.createCommentVNode("",!0)],2),e.createElementVNode("p",Ae,e.toDisplayString(g.label),1)],8,Me))),128))],10,Le))}}),Ie=["width","height"],He=["fill"],Ue=["fill"],ze=["fill"],je=e.defineComponent({__name:"icon-copy-success",props:{width:{default:16},height:{default:17},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M11.4002 1.6875H8.60016C5.9935 1.6875 4.8335 2.8475 4.8335 5.45417V6.1875C4.8335 6.46083 5.06016 6.6875 5.3335 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V11.5208C10.1668 11.7942 10.3935 12.0208 10.6668 12.0208H11.4002C14.0068 12.0208 15.1668 10.8608 15.1668 8.25417V5.45417C15.1668 2.8475 14.0068 1.6875 11.4002 1.6875ZM5.8335 5.6875V5.45417C5.8335 3.3875 6.5335 2.6875 8.60016 2.6875H11.4002C13.4668 2.6875 14.1668 3.3875 14.1668 5.45417V8.25417C14.1668 10.3208 13.4668 11.0208 11.4002 11.0208H11.1668V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875H5.8335Z",fill:e.unref(r)},null,8,He),e.createElementVNode("path",{d:"M7.40016 5.6875H4.60016C1.9935 5.6875 0.833496 6.8475 0.833496 9.45417V12.2542C0.833496 14.8608 1.9935 16.0208 4.60016 16.0208H7.40016C10.0068 16.0208 11.1668 14.8608 11.1668 12.2542V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875ZM4.60016 15.0208C2.5335 15.0208 1.8335 14.3208 1.8335 12.2542V9.45417C1.8335 7.3875 2.5335 6.6875 4.60016 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V12.2542C10.1668 14.3208 9.46683 15.0208 7.40016 15.0208H4.60016Z",fill:e.unref(r)},null,8,Ue),e.createElementVNode("path",{d:"M5.35302 12.6542C5.22635 12.6542 5.09969 12.6075 4.99969 12.5075L3.69969 11.2075C3.50635 11.0142 3.50635 10.6942 3.69969 10.5008C3.89302 10.3075 4.21302 10.3075 4.40635 10.5008L5.35302 11.4475L7.59302 9.2075C7.78635 9.01417 8.10635 9.01417 8.29969 9.2075C8.49302 9.40083 8.49302 9.72083 8.29969 9.91417L5.69969 12.5075C5.60635 12.6008 5.47969 12.6542 5.35302 12.6542Z",fill:e.unref(r)},null,8,ze)],16,Ie))}}),N=e.defineComponent({__name:"copy",props:{copyText:{},color:{}},setup(o){const l=o;function t(n){return navigator.clipboard.writeText(n)}function a(){t(l.copyText).then(()=>{}).catch(n=>{console.error("Copy failed:",n)})}return(n,r)=>(e.openBlock(),e.createBlock(je,{class:"cursor-pointer",color:n.color,onClick:a},null,8,["color"]))}}),Fe={class:"flex items-center gap-1"},qe={key:1,class:"flex items-center justify-between"},Ke={class:"flex items-center gap-1"},B=e.defineComponent({__name:"label-info",props:{type:{default:"vertical"},label:{default:""},labelCustomClass:{default:"text-body-4xs font-medium text-light-copy"},valueImageSrc:{default:""},valueImageCustomClass:{default:""},valueImagePosition:{default:"prefix"},hasValueCopy:{type:Boolean,default:!1},value:{default:""},valueCustomClass:{default:"text-body-2xs font-medium text-sub-copy"},alignRight:{type:Boolean,default:!1}},setup(o){const l=o,t=e.computed(()=>(l.label??"").toUpperCase()),a=e.computed(()=>!!l.valueImageSrc&&l.valueImagePosition==="prefix"),n=e.computed(()=>!!l.valueImageSrc&&l.valueImagePosition==="suffix"),r=e.computed(()=>re(l.value,40)),{type:c,labelCustomClass:i,valueImageSrc:d,valueImageCustomClass:s,hasValueCopy:m,value:f,valueCustomClass:p,alignRight:x}=l;return(g,_)=>e.unref(c)==="vertical"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex flex-col gap-1",e.unref(x)?"text-right items-end":""])},[e.createElementVNode("p",{class:e.normalizeClass(e.unref(i))},e.toDisplayString(t.value),3),e.createElementVNode("div",Fe,[a.value?(e.openBlock(),e.createBlock(k,{key:0,src:e.unref(d),alt:e.unref(f),width:22,customClass:e.unref(s)},null,8,["src","alt","customClass"])):e.createCommentVNode("",!0),e.unref(m)?(e.openBlock(),e.createElementBlock("p",{key:2,class:e.normalizeClass([e.unref(p),"truncate"])},e.toDisplayString(r.value),3)):(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(f)),3)),e.unref(m)?(e.openBlock(),e.createBlock(N,{key:3,copyText:e.unref(f),color:"#9DBFDE"},null,8,["copyText"])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(k,{key:4,src:e.unref(d),alt:e.unref(f),width:22,customClass:e.unref(s)},null,8,["src","alt","customClass"])):e.createCommentVNode("",!0)])],2)):(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("p",{class:e.normalizeClass(e.unref(i))},e.toDisplayString(t.value),3),e.createElementVNode("div",Ke,[a.value?(e.openBlock(),e.createBlock(k,{key:0,src:e.unref(d),alt:e.unref(f),width:22,customClass:e.unref(s)},null,8,["src","alt","customClass"])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(f)),3),e.unref(m)?(e.openBlock(),e.createBlock(N,{key:1,copyText:e.unref(f),color:"#9DBFDE"},null,8,["copyText"])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(k,{key:2,src:e.unref(d),alt:e.unref(f),width:22,customClass:e.unref(s)},null,8,["src","alt","customClass"])):e.createCommentVNode("",!0)])]))}}),Re=["width","height"],Ze=["fill"],Oe=e.defineComponent({__name:"icon-check-circle",props:{width:{default:67},height:{default:67},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 67 67",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M33.6705 0.0820312C15.2758 0.0820312 0.36377 14.9941 0.36377 33.3888C0.36377 51.7846 15.2758 66.6956 33.6705 66.6956C52.0663 66.6956 66.9773 51.7846 66.9773 33.3888C66.9773 14.9941 52.0663 0.0820312 33.6705 0.0820312ZM33.6705 62.5978C17.6011 62.5978 4.52712 49.4583 4.52712 33.3887C4.52712 17.3192 17.6011 4.24525 33.6705 4.24525C49.74 4.24525 62.814 17.3193 62.814 33.3887C62.814 49.4581 49.74 62.5978 33.6705 62.5978ZM46.9631 21.2016L27.4213 40.8662L18.621 32.0659C17.8081 31.253 16.4904 31.253 15.6765 32.0659C14.8636 32.8788 14.8636 34.1965 15.6765 35.0094L25.9797 45.3137C26.7926 46.1255 28.1103 46.1255 28.9243 45.3137C29.0179 45.22 29.0981 45.1179 29.171 45.0118L49.9086 24.1461C50.7205 23.3332 50.7205 22.0155 49.9086 21.2016C49.0947 20.3888 47.777 20.3888 46.9631 21.2016Z",fill:e.unref(r)},null,8,Ze)],16,Re))}}),Ye={class:"flex flex-col gap-8 p-16"},Ge={class:"flex flex-col gap-8"},We={class:"flex flex-col gap-8"},Je={class:"flex flex-col"},Xe={class:"py-4 border-b border-grey-100"},Qe={class:"py-4"},et={class:"mx-auto",style:{width:"80%"}},tt=e.defineComponent({__name:"success",setup(o){return(l,t)=>(e.openBlock(),e.createElementBlock("div",Ye,[e.createElementVNode("div",Ge,[e.createElementVNode("div",We,[e.createVNode(Oe,{color:"#F47A1F",class:"mx-auto"}),t[0]||(t[0]=e.createElementVNode("div",{class:"flex flex-col text-center",style:{gap:"2px"}},[e.createElementVNode("p",{class:"text-heading-text font-medium text-header-2xl"},"₦2,500.00"),e.createElementVNode("p",{class:"text-sub-copy font-regular text-body-3xs"}," Has been paid successfully ")],-1))]),e.createElementVNode("div",Je,[e.createElementVNode("div",Xe,[e.createVNode(B,{type:"horizontal",label:"Order ID",value:"9900009000-8890-8829hd7"})]),e.createElementVNode("div",Qe,[e.createVNode(B,{type:"horizontal",label:"Payment date",value:"July 24, 2025"})])])]),e.createElementVNode("div",et,[e.createVNode(w,{label:"Return to Merchant Website",type:"secondary",customClass:"w-full"})])]))}}),ot={key:0,class:"mb-0 text-body-2xs font-normal text-heading-text"},lt={key:0,class:"text-orange-required"},nt=["type","value","disabled","placeholder","inputmode"],at={key:1,class:"animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full"},rt={key:1,class:"text-body-3xs text-light-copy"},st={key:2,class:"text-body-3xs text-red-500"},b=e.defineComponent({__name:"input",props:{label:{default:""},type:{default:"text"},placeholder:{default:void 0},validationError:{default:""},hint:{default:""},mask:{default:""},rules:{default:()=>[]},isAmountInput:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},showCopyIcon:{type:Boolean,default:!1},modelValue:{default:void 0},defaultValue:{default:""},className:{default:""}},emits:["update:modelValue","blur","copied"],setup(o,{emit:l}){const t=o,a=l,n=e.computed(()=>t.modelValue!==void 0),r=e.ref(t.modelValue??t.defaultValue??""),c=e.ref(""),i=e.ref(""),d=e.ref(null);e.watch(()=>t.modelValue,h=>{n.value&&(r.value=h??"")});const s=e.computed(()=>t.isAmountInput?M(r.value.replace(/,/g,"")):r.value);function m(h){const $=h.target.value.replace(/,/g,"");n.value||(r.value=$),a("update:modelValue",$),e.nextTick(()=>{const V=d.value;if(V){const S=V.value.length;V.setSelectionRange(S,S)}})}function f(){a("blur",r.value)}function p(h){t.rules.includes("numeric")&&se(h)}const x=e.computed(()=>t.disabled?"bg-grey-50 cursor-not-allowed":"bg-white"),g=e.computed(()=>t.validationError||i.value?"border-red-300 bg-red-50":"border-grey-100");function _(h){return navigator.clipboard.writeText(h)}function A(){_(r.value).then(()=>{i.value="",c.value="Text copied to clipboard",a("copied")}).catch(()=>{c.value="",i.value="Failed to copy text to clipboard"})}return(h,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-2",h.className])},[h.label?(e.openBlock(),e.createElementBlock("p",ot,[e.createTextVNode(e.toDisplayString(h.label)+" ",1),h.required?(e.openBlock(),e.createElementBlock("span",lt," *")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["border-c px-3 py-2 flex items-center justify-between rounded-md h-12",x.value,g.value])},[e.renderSlot(h.$slots,"prefix"),e.createElementVNode("input",{ref_key:"inputEl",ref:d,type:h.type,value:s.value,disabled:h.disabled,placeholder:h.placeholder??(h.label?`Enter ${h.label.toLowerCase()}`:void 0),inputmode:h.isAmountInput?"decimal":void 0,class:"search-input bg-transparent outline-none border-none focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal w-full",onInput:m,onBlur:f,onKeydown:p},null,40,nt),h.loading?(e.openBlock(),e.createElementBlock("div",at)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(h.$slots,"suffix"),h.showCopyIcon&&r.value.trim()!==""?(e.openBlock(),e.createBlock(k,{key:0,src:"assets/images/copyIcon.svg",alt:"copy",width:16,height:16,customClass:"cursor-pointer hover:opacity-70 transition-opacity",onClick:A})):e.createCommentVNode("",!0)],64))],2),h.hint||c.value?(e.openBlock(),e.createElementBlock("p",rt,e.toDisplayString(c.value||h.hint),1)):e.createCommentVNode("",!0),h.validationError||i.value?(e.openBlock(),e.createElementBlock("p",st,e.toDisplayString(i.value||h.validationError),1)):e.createCommentVNode("",!0)],2))}}),ct=["width","height"],it={opacity:"0.6"},ut=["fill"],dt=e.defineComponent({__name:"icon-chevron-down",props:{width:{default:24},height:{default:24},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("g",it,[e.createElementVNode("path",{d:"M16.5813 7.83128L10.3313 14.0813C10.2434 14.1691 10.1242 14.2184 10 14.2184C9.87581 14.2184 9.75667 14.1691 9.66878 14.0813L3.41878 7.83128C3.33598 7.74242 3.2909 7.62489 3.29304 7.50345C3.29518 7.38201 3.34438 7.26615 3.43026 7.18026C3.51615 7.09438 3.63201 7.04518 3.75345 7.04304C3.87489 7.0409 3.99242 7.08598 4.08128 7.16878L10 13.0867L15.9188 7.16878C16.0076 7.08598 16.1252 7.0409 16.2466 7.04304C16.368 7.04518 16.4839 7.09438 16.5698 7.18026C16.6557 7.26615 16.7049 7.38201 16.707 7.50345C16.7092 7.62489 16.6641 7.74242 16.5813 7.83128Z",fill:e.unref(r)},null,8,ut)])],16,ct))}}),pt=["width","height"],mt={opacity:"0.7"},ft=["fill"],ht=e.defineComponent({__name:"icon-chevron-up",props:{width:{default:24},height:{default:24},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("g",mt,[e.createElementVNode("path",{d:"M2.73508 9.73495L7.73508 4.73495C7.80539 4.66473 7.9007 4.62528 8.00008 4.62528C8.09945 4.62528 8.19476 4.66473 8.26508 4.73495L13.2651 9.73495C13.3313 9.80604 13.3674 9.90006 13.3657 9.99722C13.364 10.0944 13.3246 10.1871 13.2559 10.2558C13.1872 10.3245 13.0945 10.3638 12.9973 10.3655C12.9002 10.3673 12.8062 10.3312 12.7351 10.265L8.00008 5.53058L3.26508 10.265C3.19399 10.3312 3.09997 10.3673 3.00282 10.3655C2.90566 10.3638 2.81297 10.3245 2.74427 10.2558C2.67556 10.1871 2.6362 10.0944 2.63449 9.99722C2.63277 9.90006 2.66884 9.80604 2.73508 9.73495Z",fill:e.unref(r)},null,8,ft)])],16,pt))}}),yt={class:"mb-0 text-body-3xs font-medium text-orange-500"},vt=e.defineComponent({__name:"hint",props:{hint:{}},setup(o){return(l,t)=>(e.openBlock(),e.createElementBlock("p",yt,e.toDisplayString(l.hint),1))}}),Ct={key:0,class:"mb-0 text-body-2xs font-normal text-heading-text"},gt={key:0,class:"text-orange-required"},bt=["aria-expanded","aria-controls","aria-disabled","aria-activedescendant"],_t={class:"flex items-center gap-2"},kt={class:"flex items-center gap-2"},xt={key:0,class:"inline-block h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin"},wt=["aria-label"],Vt={key:0,class:"px-4 pt-2 pb-1"},Bt=["placeholder"],Nt=["onClick","id","aria-selected"],Et={class:"mb-0 text-body-2xs font-medium"},T=e.defineComponent({__name:"select",props:{options:{default:()=>[]},modelValue:{default:void 0},defaultValue:{default:void 0},className:{default:""},placeholder:{default:"Select an option"},hasSearch:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},validationError:{default:""},label:{default:""},hint:{default:""},required:{type:Boolean,default:!1},itemImageType:{default:null}},emits:["update:modelValue","change"],setup(o,{emit:l}){const t=o,a=l,n=e.ref(!1),r=e.ref(t.defaultValue??t.modelValue??""),c=e.ref([...t.options]),i=e.ref(-1),d=e.ref(null),s=e.ref(null),m=e.ref(null),f=e.computed(()=>t.modelValue!==void 0);e.watch(()=>t.modelValue,u=>{f.value&&(r.value=u??"")}),e.watch(()=>t.options,u=>{c.value=[...u]},{immediate:!0});const p=e.computed(()=>{const u=f.value?t.modelValue:r.value;return t.options.find(y=>y.value===u)??null}),x=e.computed(()=>{var u;return((u=p.value)==null?void 0:u.label)||t.placeholder||(t.label?`Select ${t.label}`:"Select an option")});function g(){if(t.disabled||n.value)return;c.value=[...t.options];const u=p.value?Math.max(0,t.options.findIndex(y=>y.value===p.value.value)):0;i.value=u,n.value=!0,e.nextTick(()=>{t.hasSearch&&m.value&&(m.value.focus(),m.value.select())})}function _(){n.value&&(n.value=!1,i.value=-1)}function A(){t.disabled||(n.value?_():g())}function h(u){if(!n.value)return;const y=u.target,C=d.value,v=s.value;C&&!C.contains(y)&&v&&!v.contains(y)&&_()}e.watch(n,u=>{u?document.addEventListener("mousedown",h):document.removeEventListener("mousedown",h)}),e.onBeforeUnmount(()=>document.removeEventListener("mousedown",h));function E(u){f.value||(r.value=u),a("update:modelValue",u),a("change",u),_()}function $(u){const y=u.target.value.toLowerCase(),C=t.options.filter(v=>v.label.toLowerCase().includes(y));c.value=C,i.value=C.length?0:-1}function V(u){if(!t.disabled)switch(u.key){case"Enter":case" ":case"Spacebar":case"ArrowDown":u.preventDefault(),n.value?D(1):g();break;case"ArrowUp":u.preventDefault(),n.value?D(-1):g();break;case"Escape":n.value&&(u.preventDefault(),_());break}}function S(u){switch(u.key){case"ArrowDown":u.preventDefault(),D(1);break;case"ArrowUp":u.preventDefault(),D(-1);break;case"Home":u.preventDefault(),i.value=c.value.length?0:-1,P(0);break;case"End":u.preventDefault(),i.value=c.value.length-1,P(c.value.length-1);break;case"Enter":if(u.preventDefault(),i.value>=0){const y=c.value[i.value];y&&E(y.value)}break;case"Escape":u.preventDefault(),_();break;case"Tab":_();break}}function D(u){if(!c.value.length)return;const y=c.value.length-1,C=i.value<0?0:Math.min(y,Math.max(0,i.value+u));i.value=C,P(C)}function P(u){var v;const y=s.value;if(!y)return;const C=y.querySelectorAll("[data-option]");u>=0&&u<C.length&&((v=C[u])==null||v.scrollIntoView({block:"nearest"}))}const G=e.computed(()=>t.disabled?"bg-grey-100 cursor-not-allowed":"bg-white"),W=e.computed(()=>t.validationError?"border-red-300 bg-red-50":"border-grey-100 bg-white"),{options:Ho,placeholder:Uo,hasSearch:J,disabled:X,loading:Q,validationError:H,label:L,hint:U,required:ee,itemImageType:z,className:te}=t;return(u,y)=>{var C;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-2 relative",e.unref(te)])},[e.unref(L)?(e.openBlock(),e.createElementBlock("p",Ct,[e.createTextVNode(e.toDisplayString(e.unref(L))+" ",1),e.unref(ee)?(e.openBlock(),e.createElementBlock("span",gt," *")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"triggerRef",ref:d,class:e.normalizeClass(["border-c rounded-md flex items-center justify-between h-12 cursor-pointer px-3 py-2",G.value,W.value]),role:"combobox","aria-haspopup":"listbox","aria-expanded":n.value,"aria-controls":n.value?"select-menu":void 0,"aria-disabled":e.unref(X)||void 0,"aria-activedescendant":n.value&&i.value>=0?`option-${i.value}`:void 0,tabindex:"0",onClick:A,onKeydown:V},[e.createElementVNode("div",_t,[e.renderSlot(u.$slots,"prefix"),e.createElementVNode("div",kt,[p.value&&e.unref(z)==="country"&&p.value.countryCode?(e.openBlock(),e.createBlock(k,{key:0,src:`https://flagcdn.com/w40/${p.value.countryCode.toLowerCase()}.png`,alt:p.value.countryCode,width:28,customClass:"rounded-lg"},null,8,["src","alt"])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:e.normalizeClass(["text-body-2xs font-normal mb-0",(C=p.value)!=null&&C.label?"text-sub-copy":"text-grey-500"])},e.toDisplayString(x.value),3)])]),e.unref(Q)?(e.openBlock(),e.createElementBlock("span",xt)):n.value?(e.openBlock(),e.createBlock(ht,{key:1,color:"#8FAECA"})):(e.openBlock(),e.createBlock(dt,{key:2,color:"#8FAECA"}))],42,bt),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"menuRef",ref:s,id:"select-menu",class:"border-c bg-white rounded-md border-grey-border text-body-xs font-normal text-input-grey w-full mt-2 max-h-22rem overflow-y-auto",role:"listbox","aria-label":e.unref(L)||"Options",style:{position:"absolute",top:"100%",zIndex:10},onKeydown:S},[e.unref(J)?(e.openBlock(),e.createElementBlock("div",Vt,[e.createElementVNode("input",{ref_key:"searchRef",ref:m,type:"text",placeholder:`Search ${e.unref(L)||"options"}`,class:"bg-transparent outline-none border-b pb-2 w-full focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal",onInput:$},null,40,Bt)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(v,j)=>{var F;return e.openBlock(),e.createElementBlock("div",{key:v.value,onClick:zo=>E(v.value),id:`option-${j}`,"data-option":"",role:"option","aria-selected":((F=p.value)==null?void 0:F.value)===v.value,class:e.normalizeClass(["px-4 py-3 first:pt-0 hover:bg-gray-100 flex items-center gap-2 cursor-pointer",j===i.value?"bg-gray-100":""])},[e.unref(z)==="country"&&v.countryCode?(e.openBlock(),e.createBlock(k,{key:0,src:`https://flagcdn.com/w40/${v.countryCode.toLowerCase()}.png`,alt:v.countryCode,width:28,customClass:"rounded-lg"},null,8,["src","alt"])):e.createCommentVNode("",!0),e.createElementVNode("p",Et,e.toDisplayString(v.label),1)],10,Nt)}),128))],40,wt)):e.createCommentVNode("",!0),e.unref(U)?(e.openBlock(),e.createBlock(vt,{key:2,hint:e.unref(U)},null,8,["hint"])):e.createCommentVNode("",!0),e.unref(H)?(e.openBlock(),e.createBlock(Z,{key:3,errorMessage:e.unref(H)},null,8,["errorMessage"])):e.createCommentVNode("",!0)],2)}}}),$t={class:"flex flex-col gap-6"},St={key:0,class:"grid grid-cols-2 gap-6 overflow-y-auto"},Dt={class:"col-span-2"},Lt={key:1,class:"grid grid-cols-2 gap-6 overflow-y-auto",style:{"max-height":"320px"}},Mt={class:"col-span-2"},Tt={class:"col-span-2"},At=e.defineComponent({__name:"pay-by-card",setup(o){const l=e.ref(0);return(t,a)=>(e.openBlock(),e.createElementBlock("div",$t,[l.value===0?(e.openBlock(),e.createElementBlock("div",St,[e.createVNode(b,{label:"First Name",required:!0}),e.createVNode(b,{label:"Last Name",required:!0}),e.createVNode(b,{label:"Email",required:!0}),e.createVNode(b,{label:"Phone Number",required:!0}),e.createVNode(T,{label:"Select Country",required:!0,options:[{label:"United States",value:"US"},{label:"Canada",value:"CA"},{label:"United Kingdom",value:"UK"}]}),e.createVNode(T,{label:"Select State",required:!0,options:[{label:"California",value:"CA"},{label:"Texas",value:"TX"},{label:"New York",value:"NY"}]}),e.createVNode(b,{label:"City",required:!0}),e.createVNode(b,{label:"Postal Code",required:!0}),e.createElementVNode("div",Dt,[e.createVNode(b,{label:"Street Address",required:!0})])])):l.value===1?(e.openBlock(),e.createElementBlock("div",Lt,[e.createElementVNode("div",Mt,[e.createVNode(b,{label:"Card Name",required:!0})]),e.createElementVNode("div",Tt,[e.createVNode(b,{label:"Card Number",required:!0})]),e.createVNode(b,{label:"Expiry Date",required:!0}),e.createVNode(b,{label:"CVV",required:!0})])):e.createCommentVNode("",!0),e.createVNode(w,{label:l.value===0?"Proceed":"Pay",type:"primary",customClass:"w-full",onClick:a[0]||(a[0]=n=>l.value===0&&(l.value=1))},null,8,["label"])]))}}),Pt={class:"flex flex-col gap-10"},It={class:"text-sub-copy text-sm font-semibold text-center"},Ht={class:"bg-[#EFF7FF] p-4 rounded-lg flex flex-col gap-6"},Ut={class:"flex items-center justify-between"},zt={class:"flex items-center justify-between"},jt={class:"w-2/3 mx-auto text-center text-body-2xs font-medium text-sub-copy"},Ft={class:"text-orange-500"},qt={class:"flex flex-col gap-4"},Kt=e.defineComponent({__name:"pay-by-transfer",props:{amountDisplay:{default:"NGN 200,500.00"},bankName:{default:"Teerus MFB"},accountNumber:{default:"0001928940"},initialSeconds:{default:30*60}},emits:["confirm","cancel"],setup(o,{emit:l}){const t=o,a=l,n=e.ref(t.initialSeconds),r=e.ref(null),c=e.computed(()=>{const i=Math.max(0,n.value),d=Math.floor(i/60),s=i%60;return`${String(d).padStart(2,"0")}:${String(s).padStart(2,"0")}`});return e.onMounted(()=>{r.value=window.setInterval(()=>{n.value-=1},1e3)}),e.onBeforeUnmount(()=>{r.value&&(clearInterval(r.value),r.value=null)}),e.watch(n,i=>{i<0&&r.value&&(clearInterval(r.value),r.value=null)}),(i,d)=>(e.openBlock(),e.createElementBlock("div",Pt,[e.createElementVNode("p",It," Amount to Pay "+e.toDisplayString(i.amountDisplay),1),e.createElementVNode("div",Ht,[e.createVNode(B,{label:"Bank Name",value:i.bankName,type:"horizontal"},null,8,["value"]),e.createElementVNode("div",Ut,[e.createVNode(B,{label:"Account Number",value:i.accountNumber,type:"horizontal"},null,8,["value"]),e.createVNode(N,{color:"#9DBFDE",copyText:i.accountNumber},null,8,["copyText"])]),e.createElementVNode("div",zt,[e.createVNode(B,{label:"Amount",value:i.amountDisplay,type:"horizontal"},null,8,["value"]),e.createVNode(N,{color:"#9DBFDE",copyText:i.amountDisplay},null,8,["copyText"])])]),e.createElementVNode("p",jt,[d[2]||(d[2]=e.createTextVNode(" This account is for this transaction only and expires in ",-1)),e.createElementVNode("span",Ft,e.toDisplayString(n.value>=0?c.value:"00:00"),1)]),e.createElementVNode("div",qt,[e.createVNode(w,{label:"I have paid the money",type:"primary",customClass:"w-full",onClick:d[0]||(d[0]=s=>a("confirm"))}),e.createElementVNode("button",{type:"button",onClick:d[1]||(d[1]=s=>a("cancel")),class:"text-heading-text text-body-2xs font-medium text-center py-2 cursor-pointer"}," Cancel Payment ")])]))}}),Rt=["width","height"],Zt={"clip-path":"url(#clip0_10908_387048)"},Ot=["fill"],Yt={id:"clip0_10908_387048"},Gt=["fill"],Wt=e.defineComponent({__name:"icon-usdc",props:{width:{default:28},height:{default:28},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("g",Zt,[e.createElementVNode("path",{d:"M14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0ZM16.933 4.865C16.7195 4.76 16.506 4.865 16.4535 5.07762C16.4001 5.131 16.4001 5.18438 16.4001 5.29025V6.034L16.4089 6.125C16.4546 6.30501 16.5652 6.46177 16.7195 6.56512C20.8792 8.05262 23.0125 12.6726 21.4655 16.7615C20.6657 18.9928 18.9061 20.6911 16.7195 21.4883C16.506 21.5941 16.4001 21.7534 16.4001 22.0194V22.7631L16.4045 22.8401C16.4128 22.9241 16.4479 23.0033 16.5047 23.0658C16.5614 23.1284 16.6367 23.171 16.7195 23.1875C16.7729 23.1875 16.8796 23.1875 16.933 23.135C18.1331 22.7602 19.2473 22.1517 20.2113 21.3446C21.1753 20.5375 21.9701 19.5476 22.5499 18.432C23.1298 17.3164 23.4833 16.0972 23.59 14.8444C23.6967 13.5917 23.5546 12.3302 23.1718 11.1326C22.2128 8.10512 19.866 5.8205 16.933 4.865ZM11.2805 4.8125C11.2271 4.8125 11.1204 4.8125 11.067 4.865C9.86688 5.23978 8.75274 5.84826 7.78874 6.6554C6.82475 7.46254 6.02993 8.4524 5.45006 9.56797C4.87019 10.6836 4.51673 11.9028 4.41001 13.1556C4.30329 14.4083 4.44543 15.6698 4.82825 16.8674C5.78725 19.8424 8.08062 22.1261 11.067 23.0816C11.2805 23.1875 11.494 23.0816 11.5465 22.869C11.5999 22.8165 11.5999 22.7622 11.5999 22.6564V21.9126L11.5911 21.8426C11.5544 21.6947 11.417 21.5259 11.2805 21.4349C7.12075 19.9474 4.9875 15.3274 6.5345 11.2385C7.33425 9.00725 9.09388 7.30887 11.2805 6.51175C11.494 6.40587 11.5999 6.24663 11.5999 5.98063V5.23688L11.5955 5.15987C11.5872 5.07585 11.5521 4.99673 11.4954 4.93418C11.4386 4.87163 11.3633 4.82898 11.2805 4.8125ZM14.3736 7.574H13.573L13.496 7.581C13.321 7.616 13.1933 7.7665 13.146 7.99925V9.22075L12.9649 9.24875C11.4704 9.51475 10.5341 10.5464 10.5341 11.823C10.5341 13.5748 11.5999 14.2651 13.8399 14.5311C15.3335 14.7963 15.813 15.1156 15.813 15.9653C15.813 16.814 15.0666 17.3985 14.0534 17.3985C12.6665 17.3985 12.187 16.8149 12.0269 16.0177C11.9744 15.806 11.8134 15.6992 11.6532 15.6992H10.7467L10.6776 15.7054C10.5913 15.7193 10.513 15.7641 10.4572 15.8313C10.4014 15.8985 10.3718 15.9838 10.374 16.0711V16.1236L10.4029 16.2811C10.6566 17.5271 11.5106 18.4187 13.2003 18.6734V19.9483L13.2072 20.0252C13.2422 20.1985 13.3936 20.3263 13.6273 20.3726H14.427L14.504 20.3656C14.679 20.3306 14.8067 20.1801 14.854 19.9483V18.6725L15.0351 18.6375C16.534 18.3207 17.5201 17.2366 17.5201 15.8576C17.5201 13.9991 16.4001 13.3621 14.1601 13.0961C12.5598 12.8835 12.2404 12.4591 12.2404 11.7154C12.2404 10.9716 12.7741 10.4939 13.8399 10.4939C14.7998 10.4939 15.3335 10.8124 15.5995 11.6095C15.6272 11.6866 15.6779 11.7533 15.7447 11.8007C15.8115 11.8481 15.8912 11.8739 15.9731 11.8746H16.8262L16.8954 11.8694C16.982 11.8556 17.0606 11.8108 17.1166 11.7434C17.1726 11.6759 17.2022 11.5904 17.1999 11.5027V11.4503L17.1675 11.2989C17.0361 10.755 16.7366 10.2664 16.3115 9.90255C15.8864 9.53872 15.3574 9.31821 14.7997 9.27238V7.99925L14.7928 7.92225C14.7578 7.74812 14.6073 7.62038 14.3736 7.574Z",fill:e.unref(r)},null,8,Ot)]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Yt,[e.createElementVNode("rect",{width:"28",height:"28",fill:e.unref(r)},null,8,Gt)])])],16,Rt))}}),Jt=["width","height"],Xt={"clip-path":"url(#clip0_10908_387045)"},Qt=["fill"],eo={id:"clip0_10908_387045"},to=["fill"],oo=e.defineComponent({__name:"icon-usdt",props:{width:{default:28},height:{default:28},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("g",Xt,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28ZM15.6818 12.0689V9.99863H20.419V6.84162H7.52063V9.99863H12.2579V12.068C8.40787 12.2447 5.5125 13.0077 5.5125 13.9212C5.5125 14.8347 8.40787 15.5969 12.2579 15.7745V22.4088H15.6818V15.7727C19.5256 15.596 22.414 14.8339 22.414 13.9212C22.414 13.0086 19.5256 12.2465 15.6818 12.0689ZM15.6818 15.2101V15.2084C15.5855 15.2154 15.0894 15.2451 13.9825 15.2451C13.0987 15.2451 12.4766 15.2189 12.2579 15.2084V15.211C8.85587 15.0614 6.31662 14.469 6.31662 13.7602C6.31662 13.0524 8.85587 12.46 12.2579 12.3077V14.6212C12.4801 14.637 13.1171 14.6746 13.9974 14.6746C15.0535 14.6746 15.5829 14.6309 15.6818 14.6221V12.3095C19.0768 12.4609 21.6099 13.0532 21.6099 13.7602C21.6099 14.469 19.0768 15.0596 15.6818 15.2101Z",fill:e.unref(r)},null,8,Qt)]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",eo,[e.createElementVNode("rect",{width:"28",height:"28",fill:e.unref(r)},null,8,to)])])],16,Jt))}}),lo={key:1,class:"flex items-center gap-1"},I=e.defineComponent({__name:"currency-amount",props:{currency:{},amount:{},textClass:{default:""},iconColorClass:{default:""},iconWidth:{default:16},iconHeight:{default:16}},setup(o){const l=o,t=e.computed(()=>{var a;return(a=l.currency)==null?void 0:a.toUpperCase()});return(a,n)=>t.value!=="USDT"&&t.value!=="USDC"?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(a.textClass)},e.toDisplayString(e.unref(M)(a.amount,t.value)),3)):(e.openBlock(),e.createElementBlock("div",lo,[t.value==="USDT"?(e.openBlock(),e.createBlock(oo,{key:0,width:a.iconWidth,height:a.iconHeight,color:a.iconColorClass},null,8,["width","height","color"])):e.createCommentVNode("",!0),t.value==="USDC"?(e.openBlock(),e.createBlock(Wt,{key:1,width:a.iconWidth,height:a.iconHeight,color:a.iconColorClass},null,8,["width","height","color"])):e.createCommentVNode("",!0),e.createElementVNode("p",{class:e.normalizeClass(a.textClass)},e.toDisplayString(e.unref(M)(a.amount)),3)]))}}),no=["width","height"],ao=["fill"],ro=["fill"],so=["fill"],co=["fill"],io=e.defineComponent({__name:"icon-arrow-swap",props:{width:{default:16},height:{default:17},color:{default:"currentColor"}},setup(o){const l=o,t=e.useAttrs(),{width:a,height:n,color:r}=l;return(c,i)=>(e.openBlock(),e.createElementBlock("svg",e.mergeProps({width:e.unref(a),height:e.unref(n),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.unref(t)),[e.createElementVNode("path",{d:"M10.3265 14.1948C10.1998 14.1948 10.0731 14.1481 9.97313 14.0481C9.77979 13.8548 9.77979 13.5348 9.97313 13.3414L13.3131 10.0014C13.5065 9.80811 13.8265 9.80811 14.0198 10.0014C14.2131 10.1948 14.2131 10.5148 14.0198 10.7081L10.6798 14.0481C10.5798 14.1414 10.4531 14.1948 10.3265 14.1948Z",fill:e.unref(r)},null,8,ao),e.createElementVNode("path",{d:"M13.6668 10.8477H2.3335C2.06016 10.8477 1.8335 10.621 1.8335 10.3477C1.8335 10.0743 2.06016 9.84766 2.3335 9.84766H13.6668C13.9402 9.84766 14.1668 10.0743 14.1668 10.3477C14.1668 10.621 13.9402 10.8477 13.6668 10.8477Z",fill:e.unref(r)},null,8,ro),e.createElementVNode("path",{d:"M2.33329 6.86079C2.20663 6.86079 2.07996 6.81413 1.97996 6.71413C1.78663 6.52079 1.78663 6.20079 1.97996 6.00746L5.31996 2.66746C5.51329 2.47413 5.83329 2.47413 6.02663 2.66746C6.21996 2.86079 6.21996 3.18079 6.02663 3.37413L2.68663 6.71413C2.59329 6.80746 2.45996 6.86079 2.33329 6.86079Z",fill:e.unref(r)},null,8,so),e.createElementVNode("path",{d:"M13.6668 6.86133H2.3335C2.06016 6.86133 1.8335 6.63466 1.8335 6.36133C1.8335 6.08799 2.06016 5.86133 2.3335 5.86133H13.6668C13.9402 5.86133 14.1668 6.08799 14.1668 6.36133C14.1668 6.63466 13.9402 6.86133 13.6668 6.86133Z",fill:e.unref(r)},null,8,co)],16,no))}}),uo={class:"flex flex-col gap-6"},po={class:"grid grid-cols-1 gap-6"},mo={key:1,class:"flex flex-col gap-6"},fo={class:"mx-auto"},ho={class:"flex flex-col gap-6 border-c border-grey-100 p-4 rounded-2xl bg-light-white-50"},yo={class:"border-b border-grey-border pb-4 flex flex-col gap-2"},vo={class:"flex justify-between"},Co={class:"flex flex-col gap-1"},go={class:"flex items-center gap-2"},bo={class:"pb-4 flex flex-col gap-2"},_o={class:"flex justify-between"},ko={class:"flex flex-col gap-2"},xo={class:"flex items-center justify-between border-b border-grey-border py-3"},wo={class:"flex items-center justify-between py-4"},Vo={class:"flex flex-col gap-6"},Bo=e.defineComponent({__name:"pay-by-stable-coin",emits:["proceed"],setup(o,{emit:l}){const t=l,a=e.ref(0);function n(){a.value=1,t("proceed")}return(r,c)=>(e.openBlock(),e.createElementBlock("div",uo,[a.value===0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",po,[e.createVNode(T,{label:"Select Crypto",required:!0,options:[{label:"USDT",value:"USDT"},{label:"USDC",value:"USDC"},{label:"BUSD",value:"BUSD"}]}),e.createVNode(T,{label:"Select Network",required:!0,options:[{label:"Ethereum",value:"ETH"},{label:"Binance Smart Chain",value:"BSC"},{label:"Polygon",value:"MATIC"}]})]),e.createVNode(w,{label:"Pay",type:"primary",customClass:"w-full",onClick:n})],64)):(e.openBlock(),e.createElementBlock("div",mo,[e.createElementVNode("div",fo,[e.createVNode(k,{src:"../../../assets/images/stable-coin-qr-code.png",alt:"QR Code",width:122,height:122,customClass:"mb-1"}),c[0]||(c[0]=e.createElementVNode("p",{class:"mb-0 text-body-4xs text-light-copy font-normal text-center"}," USDC ",-1))]),e.createElementVNode("div",ho,[e.createElementVNode("div",yo,[c[4]||(c[4]=e.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"},"Network",-1)),e.createElementVNode("div",vo,[e.createElementVNode("div",Co,[c[3]||(c[3]=e.createElementVNode("p",{class:"mb-0 text-body-2xs font-medium text-sub-copy"}," BNB Smart Chain (BEP20) ",-1)),e.createElementVNode("div",go,[c[1]||(c[1]=e.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"}," *Est. arrival = 3 mins ",-1)),c[2]||(c[2]=e.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"},"|",-1)),e.createVNode(I,{currency:"USDC",amount:10,textClass:"mb-0 text-body-3xs text-light-copy font-normal",iconColorClass:"#557591",iconWidth:12,iconHeight:12})])]),e.createVNode(io)])]),e.createElementVNode("div",bo,[c[6]||(c[6]=e.createElementVNode("p",{class:"mb-0 text-body-3xs text-light-copy font-normal"}," Deposit Address > ",-1)),e.createElementVNode("div",_o,[c[5]||(c[5]=e.createElementVNode("p",{class:"mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words"}," 0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6 ",-1)),e.createVNode(N,{copyText:"0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6"})])])]),e.createElementVNode("div",ko,[e.createElementVNode("div",xo,[c[7]||(c[7]=e.createElementVNode("p",{class:"mb-0 text-body-2xs font-medium text-primary-black"}," Network fee ",-1)),e.createVNode(I,{currency:"USDC",amount:12,textClass:"mb-0 text-body-2xs font-extrabold text-primary-black",iconColorClass:"#231F20"})]),e.createElementVNode("div",wo,[c[8]||(c[8]=e.createElementVNode("p",{class:"mb-0 text-body-lg font-semibold text-primary-black"},"Pay",-1)),e.createVNode(I,{currency:"USDC",amount:15,textClass:"mb-0 text-body-lg font-extrabold text-primary-black",iconColorClass:"#231F20",iconWidth:20,iconHeight:20})])]),e.createElementVNode("div",Vo,[e.createVNode(w,{label:"Confirm Payment",type:"primary",customClass:"w-full"})])]))]))}}),No={class:"grid grid-cols-3"},Eo={key:0,class:"bg-[#EFF7FF] px-6 py-8 flex flex-col gap-5 col-span-1 rounded-l-xl"},$o={class:"col-span-2"},So={key:0},Do={key:0,class:"flex items-center justify-between px-12 py-8"},Lo={key:1,class:"bg-heading-text rounded flex flex-col justify-center",style:{width:"52px",height:"52px"}},Mo={class:"flex flex-col gap-1"},To={class:"text-body-2xs font-regular text-sub-copy text-right"},Ao={class:"text-orange-500 font-extrabold"},Po={class:"overflow-y-scroll px-10 pb-10 pt-2"},Io=e.defineComponent({__name:"checkout-card",props:{secretKey:{},environment:{default:"sandbox"},paymentObject:{default:()=>({amount:0,currency:"",email:"",phoneNumber:"",narration:"",redirectUrl:""})},options:{default:void 0}},setup(o){const l=o,t=e.ref("PAYMENT"),a=e.ref([{label:"Card",value:"CARD"},{label:"Bank Transfer",value:"BANK_TRANSFER"},{label:"Stable Coin",value:"STABLE_COIN"}]),n=e.computed(()=>l.paymentObject.currency==="NGN"?a.value.filter(d=>d.value!=="STABLE_COIN"):a.value.filter(d=>d.value!=="BANK_TRANSFER")),r=e.ref(a.value[0].value);function c(d){r.value=d}const i=e.computed(()=>M(l.paymentObject.amount||0,l.paymentObject.currency||"NGN"));return(d,s)=>(e.openBlock(),e.createBlock(Se,{showBackButton:t.value==="STABLE_COIN_PAYMENT",onBack:s[2]||(s[2]=m=>t.value="PAYMENT")},{default:e.withCtx(()=>{var m;return[e.createElementVNode("div",No,[t.value==="PAYMENT"?(e.openBlock(),e.createElementBlock("div",Eo,[s[3]||(s[3]=e.createElementVNode("p",{class:"text-heading-text text-body-xs font-semibold"},"Pay with",-1)),e.createVNode(Pe,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=f=>r.value=f),options:n.value,onSelectedChange:c},null,8,["modelValue","options"])])):e.createCommentVNode("",!0),e.createElementVNode("div",$o,[t.value==="PAYMENT"||t.value==="STABLE_COIN_PAYMENT"?(e.openBlock(),e.createElementBlock("div",So,[t.value==="PAYMENT"?(e.openBlock(),e.createElementBlock("div",Do,[(m=d.options)!=null&&m.imageUrl?(e.openBlock(),e.createBlock(k,{key:0,src:d.options.imageUrl,alt:"Merchant Logo",width:52,height:52,customClass:"rounded-lg"},null,8,["src"])):(e.openBlock(),e.createElementBlock("div",Lo,[...s[4]||(s[4]=[e.createElementVNode("p",{class:"text-white text-center text-body-2xs font-medium"}," Logo ",-1)])])),e.createElementVNode("div",Mo,[s[6]||(s[6]=e.createElementVNode("p",{class:"text-body-2xs font-regular text-sub-copy text-right"}," Raymahni Merchant LLC ",-1)),e.createElementVNode("p",To,[s[5]||(s[5]=e.createTextVNode(" Pay: ",-1)),e.createElementVNode("span",Ao,e.toDisplayString(i.value),1)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",Po,[r.value==="CARD"?(e.openBlock(),e.createBlock(At,{key:0})):r.value==="BANK_TRANSFER"?(e.openBlock(),e.createBlock(Kt,{key:1})):(e.openBlock(),e.createBlock(Bo,{key:2,onProceed:s[1]||(s[1]=f=>t.value="STABLE_COIN_PAYMENT")}))])])):t.value==="SUCCESS"?(e.openBlock(),e.createBlock(tt,{key:1})):e.createCommentVNode("",!0)])])]}),_:1},8,["showBackButton"]))}});exports.BzpCheckoutButton=ye;exports.BzpCheckoutCard=Io;exports.BzpCheckoutIframe=Y;exports.createMidenPG=oe;exports.useMidenPG=le;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|